Closed StarpTech closed 1 week ago
Workaround. Disabling exemplars for all
sdkmetric.WithExemplarFilter(exemplar.AlwaysOffFilter)
cc @dashpole
Related: https://github.com/prometheus/prometheus/issues/15259
To fix this, we need to sanitize exemplar keys here: https://github.com/open-telemetry/opentelemetry-go/blob/99c3c661e0ec3e484f9faf7bc7aa23f8c7b7f1d6/exporters/prometheus/exporter.go#L550
We should use the same approach used for label keys: https://github.com/open-telemetry/opentelemetry-go/blob/99c3c661e0ec3e484f9faf7bc7aa23f8c7b7f1d6/exporters/prometheus/exporter.go#L335
Fix out: #5995. @StarpTech are you able to verify that it fixes your issue?
@dashpole I'm gonna give it a try next week.
Description
After upgrading from
go.opentelemetry.io/otel/exporters/prometheus v0.50.0
togo.opentelemetry.io/otel/exporters/prometheus v0.53.0
I see the following errorexemplar label name \"wg.operation.hash\" is invalid
.We use a custom view to filter metric attributes with high cardinality. While the metric is definitely dropped in the view it seems the data is still exported on the prometheus exporter.
It is necessary to checkout https://github.com/open-telemetry/opentelemetry-go/commit/664a075380b9eb155512adb1213ca688bd1ed611 to not run into a different exemplar prometheus issue.
Stacktrace of the OTEL error
Environment
Expected behavior
It should be possible to filter attributes like before including prometheus exporter support