-
Notifications
You must be signed in to change notification settings - Fork 562
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
[bridges/prometheus] "unknown aggregation" error when transforming ScopeMetrics #5296
[bridges/prometheus] "unknown aggregation" error when transforming ScopeMetrics #5296
Comments
Thanks for reporting this. I believe the issue is that the prometheus bridge is properly translating the prometheus summary to an OTel summary, but the OTLP exporter doesn't support summary metrics (yet). I believe the error is coming from here: https://github.com/open-telemetry/opentelemetry-go/blob/a5172ab422f4b9e09e8cfeba0e986f5f90c26092/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/error.go#L76 Summary doesn't appear to be listed here: https://github.com/open-telemetry/opentelemetry-go/blob/a5172ab422f4b9e09e8cfeba0e986f5f90c26092/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/metricdata.go#L77 |
Thanks @dashpole, that makes total sense! I wasn't paying attention apparently! Why is the bridge not using |
A summary is similar to a histogram. Like a histogram, it has a The underlying issue for this metric is actually that the stats provided by the go runtime have quantiles (like a summary), rather than buckets (like a histogram): https://pkg.go.dev/runtime/debug#GCStats. I don't expect OpenTelemetry to add summary support to the API or SDK, as users should generally use Histograms (or even better, exponential histograms). But they may come from bridges. |
You can also see the fix here: open-telemetry/opentelemetry-go#5100 |
Description
I'm using Prometheus to instrument a large codebase. Instead of migrating to the OTel SDK, a simpler alternative (for now) seems to be using the Prometheus bridge.
While this works, I'm frequently seeing an error reported through the error handler set via
otel.SetErrorHandler
:The metric causing problems is from the "default" Prometheus Go Collector: https://github.com/prometheus/client_golang/blob/release-1.19/prometheus/go_collector.go#L266.
I'm creating the metric reader like this:
Environment
go.opentelemetry.io/contrib
version: v0.49.0 (go.opentelemetry.io/contrib/bridges/prometheus
)Steps To Reproduce
Still lacking a proper reproducer, will provide one ASAP.
Expected behaviour
I expected no error to be reported.
The text was updated successfully, but these errors were encountered: