Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement OTLP Histogram #604

Merged
merged 1 commit into from
Jan 11, 2023
Merged

Implement OTLP Histogram #604

merged 1 commit into from
Jan 11, 2023

Conversation

leoparente
Copy link
Contributor

Implemented based on Prometheus and guides provided by OpenTelemetry

Histograms
A Prometheus Histogram MUST be converted to an OTLP Histogram. Multiple Prometheus histogram metrics MUST be merged together into a single OTLP Histogram:
1, The le label on non-suffixed metrics is used to identify and order histogram bucket boundaries. Each Prometheus line produces one bucket count on the resulting histogram. Each value for the le label except +Inf produces one bucket boundary.
2, Lines with _count and _sum suffixes are used to determine the histogram’s count and sum.
3, If _count is not present, the metric MUST be dropped.
4, If _sum is not present, the histogram’s sum MUST be unset.

@leoparente leoparente requested a review from weyrick January 10, 2023 20:19
@leoparente leoparente self-assigned this Jan 10, 2023
@leoparente
Copy link
Contributor Author

Tested with exporter

Metric #5
Descriptor:
     -> Name: netprobe_response_histogram_us
     -> Description: Net Probe histogram in microseconds
     -> Unit: 
     -> DataType: Histogram
     -> AggregationTemporality: Unspecified
HistogramDataPoints #0
Data point attributes:
     -> handler: Str(default2-default_netprobe-net)
     -> policy: Str(default2)
     -> tap: Str(default_netprobe)
     -> target: Str(outlook)
StartTimestamp: 2023-01-10 20:42:12.399318495 +0000 UTC
Timestamp: 1970-01-01 00:00:00 +0000 UTC
Count: 1923
ExplicitBounds #0: 100000.000000
ExplicitBounds #1: 113646.000000
Buckets #0, Count: 1339
Buckets #1, Count: 1923

@leoparente leoparente merged commit db72392 into develop Jan 11, 2023
@leoparente leoparente deleted the feature/pkt-65-hist-otlp branch January 11, 2023 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants