Sort by label keys before generating labels key and value lists#3698
Conversation
|
Can you please add a test case? |
exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py
Show resolved
Hide resolved
lzchen
left a comment
There was a problem hiding this comment.
Please add a changelog entry and a test for this.
|
@soundofspace this PR needs a test case, marking it as a draft until it has been added. |
xrmx
left a comment
There was a problem hiding this comment.
Given it's a trivial change and still an improvement compared to the actual code for some use cases LGTM
exporter/opentelemetry-exporter-prometheus/tests/test_prometheus_exporter.py
Outdated
Show resolved
Hide resolved
lzchen
left a comment
There was a problem hiding this comment.
LGTM. Please fix failing build.
|
@lzchen not really sure why that build is failing because of this pr, seems like something unrelated to this, and not really sure how to fix it. |
Probably we just need to update the contrib test SHA, no worries, I have done so. |
Description
Fixes bug where labels are wrongfully assigned to values because their order changed in input dictionary.
Fixes part of #3391. This does not fix missing labels, it only fixes the issue of labels being wrongfully assigned even if all labels are present (also empty string label values).
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Test metric:
Before:
After:
Does This PR Require a Contrib Repo Change?
Checklist: