Currently the monitoring API is limited to only publishing counter metrics using the following method
Metrics API
Every component within the Joule system has the ability to be monitored. This means any custom processor, transport or storage component inherits this feature within the component context.
Available Methods
// Increment a metric by 1voidincrementMetric(Metric metric)
// Increment a metric by a deltavoidincrementMetric(Metric metric,int delta)
// Decrement a metric by 1voiddecrementMetric(Metric metric)
// Increment a metric by a deltavoiddecrementMetric(Metric metric,int delta)
// Initialises a metric to a given start valuevoidsetMetric(Metric metric,long value)
Metric
This is an enum data type which represents various classes of metrics which can be tracked over time.
// ComponentRECEIVED("received"),PROCESSED("processed"),PROCESS_FAILED("process_failed"),DISCARDED("discard"),QUEUED_EVENT("queued_event"),AVG_LATENCY("averageLatency"),IGNORED("ignored"),// Data storesREAD_STORE("read"),WRITE_STORE("write"),BYTES_READ("bytes_read"),BYTES_WRITE("bytes_write"),// Processing streamSTART_TIME("start_time"),SHUTDOWN_TIME("stop_time")SUSPENDED_TIME("suspended_time"),RESUMED_TIME("resumed_time")
Example
Using the filter processor as an example on how metrics are applied