Use Metrics
Metrics Access
Metrics can be presented on the final output stage within the emit select
statement using a well formed metric query structure.
Declaratively
Users defined a metric query within the select statement with the results being added to the output event. The below example performs a metric lookup based upon the passed symbol
value.
Example
Query Structure
The declarative query structure is formed of three required components and an optional override output alias.
metric-family
This is the logical name of the group of metrics, which should correspond to a metric name declared within the compute section.
metrics
A comma delimited list of metrics or asterisk. Any defined metric needs to correspond the query projection attributes.
predicate
Matching and filtering statement using standard SQL. This is used to extract only those records that fulfill a specified condition.
Examples
Query Interface
Metrics can be used within custom processors my using the Metric Query API, see API documentation for details on how to leverage this capability.
Last updated