-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(prometheus_remote_write source, prometheus_remote_write sink): add support for Prometheus native histograms #25220
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
Open
sanjams2
wants to merge
6
commits into
vectordotdev:master
Choose a base branch
from
sanjams2:native-histograms-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2735d71
feat(prometheus): add support for Prometheus native histograms
l1n 496fe1a
fix(clippy): allow result_large_err in remap test helper
l1n 4dcc340
Add NativeHistogram to Arbitrary generators for property-based tests
l1n 233a07f
Remove dead unused-suppression line in emit_native_histogram fallback
l1n 04ccfa0
Regenerate static_metrics.cue docs for NativeHistogram variant
l1n 4e96d87
fix(prometheus): correct native histogram proto field, zero-threshold…
sanjams2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| Added support for Prometheus native histograms (sparse/exponential histograms). | ||
|
|
||
| The `prometheus_remote_write` source now accepts native histograms sent via the | ||
| Prometheus remote write protocol, preserving their full resolution and sparse | ||
| bucket representation. The `prometheus_remote_write` sink emits native histograms | ||
| directly, enabling lossless pass-through of native histogram data between | ||
| Prometheus-compatible systems. | ||
|
|
||
| For sinks that do not natively support this format (such as the | ||
| `prometheus_exporter` text exposition format, InfluxDB, GreptimeDB, and Datadog), | ||
| native histograms are automatically converted to classic aggregated histograms. | ||
| This conversion is lossy but allows existing pipelines to continue operating. | ||
|
|
||
| authors: l1n sanjams2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a request contains both classic histogram samples (e.g.
*_bucket,*_sum,*_count) and a native histogram for the same metric family, this branch replaces the existingGroupKind::Histogramentry with a newGroupKind::NativeHistogrammap. Becauseself.0is keyed only by metric name, the replacement drops all previously parsed classic histogram points for that family, leading to silent data loss in mixed-encoding remote-write payloads.Useful? React with 👍 / 👎.