Update prom client with support for UTF-8
To avoid a breaking change
- a new flag has been introduced to opt-in to UTF-8 support:
otel.exporter.prometheus.utf8-> this is wrong - we should use translation_strategy instead
- see https://github.com/open-telemetry/opentelemetry-specification/issues/4634
- requires https://github.com/prometheus/client_java/pull/1557
Codecov Report
:x: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 89.98%. Comparing base (63d4617) to head (4c214e3).
:warning: Report is 2 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...ry/exporter/prometheus/PrometheusMetricReader.java | 66.66% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #7588 +/- ##
============================================
- Coverage 89.99% 89.98% -0.01%
- Complexity 7079 7081 +2
============================================
Files 803 803
Lines 21412 21428 +16
Branches 2086 2087 +1
============================================
+ Hits 19269 19282 +13
- Misses 1479 1482 +3
Partials 664 664
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@jkwatson please have a look
no longer blocked by the spec?
no longer blocked by the spec?
We talked in the spec meeting that it's up to the SDKs to decide if __ should be converted to _ or not.
So from that point of view, we're free to keep __ as is.
However, I didn't want to introduce a breaking change (which is also SDK decision) - so I added a setting to enable UTF-8.
If
otel.exporter.prometheus.utf8isfalse, we shorten__to_(and%%becomes__and then_)otel.exporter.prometheus.utf8istrue, the SDK passes all chars as is to the prom client - expecting that the user wants to keep that as is in the entire pipeline
We can decide that we're OK with the breaking change - and then we don't need this property.