Repository navigation
[EXPORTER] Prometheus exporter: fix attribute serialization, label collision, and empty point guards - #4738
Open
dashpole wants to merge 1 commit into
Open
[EXPORTER] Prometheus exporter: fix attribute serialization, label collision, and empty point guards#4738dashpole wants to merge 1 commit into
dashpole wants to merge 1 commit into
Conversation
…llision, and empty point guards Fix pre-existing bugs in PrometheusExporterUtils: - Serialize array-valued OwnedAttributeValue alternatives as JSON arrays in AttributeValueToString per the OpenTelemetry attribute specification. - Merge generated otel_scope_name and otel_scope_version labels with colliding point attributes in SetMetricBasic using ';' concatenation ordered by original key. - Fix SetMetricBasic early return so metrics with empty point attributes and null resource still receive scope labels when scope is non-null. - Guard against empty point_data_attr_ in TranslateToPrometheus before accessing front().
dashpole
force-pushed
the
prom-exporter-bugfixes
branch
from
October 26, 2026 18:31
f07a4f4 to
b5ef319
Compare
dashpole
marked this pull request as ready for review
October 26, 2026 18:36
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4738 +/- ##
==========================================
- Coverage 86.69% 86.58% -0.10%
==========================================
Files 527 527
Lines 20902 21014 +112
==========================================
+ Hits 18119 18193 +74
- Misses 2783 2821 +38
🚀 New features to boost your workflow:
|
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.
Changes
Fix pre-existing bugs in
PrometheusExporterUtilssplit out from #4735 and #4736:OwnedAttributeValuealternatives (std::vector<bool>,std::vector<int>,std::vector<int64_t>,std::vector<unsigned int>,std::vector<uint64_t>,std::vector<double>,std::vector<std::string>) as JSON arrays inPrometheusExporterUtils::AttributeValueToStringper the OpenTelemetry Common Attribute Specification.otel_scope_nameandotel_scope_versionlabels with colliding point attributes inPrometheusExporterUtils::SetMetricBasicusing;concatenation in lexicographical order of original keys.PrometheusExporterUtils::SetMetricBasicso metrics with empty point attributes and a null resource pointer still receiveotel_scope_*labels whenscopeis non-null.point_data_attr_inPrometheusExporterUtils::TranslateToPrometheusbefore accessingfront().For full trivial changes below, please confirm you have:
clang-formatCHANGELOG.mdif applicable