You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This requires modifications to the model, particularly the MetricDefinition class of the Connector. The changes include:
Supporting the histogram type.
Adding buckets.
2. Collection of Histograms in the Connector (Mapping)
Example Mapping:
mapping:
type: histogram # table | histogram | singletonsource: ${source::T1}attributes:
id: $2http.method: $1http.path: $2metrics:
http.server.response_time: $3http.server.length:
description: "Measures the duration for an HTTP server to process a request and send a response."unit: bybuckets: []type: histogramvalue: $4
Required Actions:
Modify the Mapping class:
Add a type for the mapping (table (default), histogram, singleton).
Update the metrics section of the Mapping class to allow adding metadata and metric values directly without using metrics (description, unit, buckets, type, and value) defined in the top section of the YAML connector.
Update metricshub-engine (discovery and collect strategies) to interpret the new mapping type:
In the current mapping, a metric receives only one value. In histogram mapping, a metric will receive multiple values. We need to identify the monitor we are collecting to attribute the histogram metric. This can be done with an attribute key: id specified by the developer in the attributes section of the mapping, or with other attributes identified in the keys section of the job collect multi-instances.
Example:
collect:
type: multiInstancekeys:
- http.path
3. Update metricshub-agent to Implement an Observer on the Metric and Record All Values per Collect
Create a DoubleHistogramBuilder object with the correct buckets and record values at each collection.
The text was updated successfully, but these errors were encountered:
Use case
We want to be able to collect histogram metrics to represent statistics on summaries such as "how many HTTP responses take less than 30ms"
1. Definition of Histogram Metric in the Connector's Metrics Section
Example Metric Definition:
This requires modifications to the model, particularly the
MetricDefinition
class of the Connector. The changes include:2. Collection of Histograms in the Connector (Mapping)
Example Mapping:
Required Actions:
Mapping
class:Mapping
class to allow adding metadata and metric values directly without usingmetrics
(description, unit, buckets, type, and value) defined in the top section of the YAML connector.metricshub-engine
(discovery and collect strategies) to interpret the new mapping type:id
specified by the developer in the attributes section of the mapping, or with other attributes identified in the keys section of the job collect multi-instances.Example:
3. Update
metricshub-agent
to Implement an Observer on the Metric and Record All Values per CollectDoubleHistogramBuilder
object with the correct buckets and record values at each collection.The text was updated successfully, but these errors were encountered: