Conversation
…e a name Builds each metric family with the union of the label keys of all its data points. Previously, the exporter put the label values of later metrics in a family under the label keys of the first one, by position. Assisted-by: Claude Opus 5.5
|
Pull request dashboard statusWaiting on the author · refreshed 2026-09-25 17:13 UTC Move out of draft to request review. Status above doesn't look right?
|
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Builds each metric family with the union of the label keys of all its data points.
prometheus_clientsets the label names of a family when it creates the family.add_metricthen matches values to those names by position.collect()now creates each family only after it has all of that family's points."", as it already does for points within one metric. Each metric name keeps oneHELPand oneTYPEline, as in Fix duplicate HELP/TYPE declarations in Prometheus exporter #4869.collect()now yieldstarget_infodirectly, because the dict now holds_FamilyBuilderobjects, not finished families.HELP,TYPE, and series lines, as onmain.Fixes #5685
Type of change
How Has This Been Tested?
test_metrics_with_same_name_and_different_label_keys, which checks the full output in both record orders. It fails onmainand passes with the fix.test_multiple_data_points_with_different_label_setsstill passes.py312-test-opentelemetry-exporter-prometheus(38 tests),lint-opentelemetry-exporter-prometheus, andprecommitpass.Does This PR Require a Contrib Repo Change?
Checklist: