-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update module github.com/prometheus/common to v0.62.0 and fix tests #6198
base: main
Are you sure you want to change the base?
Conversation
6e43f9a
to
5d677f1
Compare
@ywwg I found one potential breaking change with the prometheus/common underscore escaping logic. The current behavior OTel-Go implemented handles colliding keys by concatenating the values with a The diff from the unit test is: -foo_total{A_B="Q",C_D="Y",C_D="Z",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 24.3
+foo_total{A_B="Q",C_D="Y;Z",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 24.3 The unit test does this: opt := otelmetric.WithAttributes(
// exact match, value should be overwritten
attribute.Key("A.B").String("X"),
attribute.Key("A.B").String("Q"),
// unintended match due to sanitization, values should be concatenated
attribute.Key("C.D").String("Y"),
attribute.Key("C/D").String("Z"),
) It seems like there are a few paths forward (cc @ArthurSens):
I'm inclined to accept this change as-is and document how users can revert to prior behavior. I've had to work around this in our unit test for now. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6198 +/- ##
=======================================
- Coverage 82.3% 82.2% -0.1%
=======================================
Files 273 273
Lines 23735 23741 +6
=======================================
+ Hits 19534 19535 +1
- Misses 3853 3857 +4
- Partials 348 349 +1 |
The bench test is failing. Are you waiting on feedback before it is resolved? Should I hold off on reviewing this? |
working on fixing it |
4d83478
to
83a158b
Compare
83a158b
to
2bff18e
Compare
fixed |
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.
🚀
Supersedes #6171
The update to prometheus/common changes the default escaping scheme to NoEscaping. Use of underscores vs original UTF-8 is still determined by content negotiation.