-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Issue with prometheus exporter while using delta temporality. [Throwing error - panic: invalid access to shared data] #29574
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hello @bhupeshpadiyar, thanks for filing this issue and including all of the information! ContextWhen metrics are ingested into collector components (the Prometheus exporter in this case), they're created in the Side note: Metrics are essentially copied by reference to each exporter consumer, so the same underlying data is being referenced by possibly multiple components or consumers. This is why we want to ensure that SolutionI believe we need to explicitly set the Related issues for backgroundopen-telemetry/opentelemetry-collector#6794 |
Another note, I learned in testing that this will only be hit if there are multiple exporters in your data pipeline. Metrics are set to |
Hi @crobert-1, Thanks for the updates. Is, it possible to fix this for multiple exporters since we need both logging/debug and prometheus at the same time? Thanks |
Hello @bhupeshpadiyar, the fix that I've submitted in PR #29608 will solve this issue for multiple exporters in the same pipeline. (My previous comment was pointing out that the bug was only hit when multiple exporters were in the data pipeline, so the bug and fix is only relevant for that situation. Sorry if it caused some confusion there!) |
Understood. Thanks @crobert-1 |
The prometheus exporter hit a panic when accumulating `Delta` metrics into `Cumulative` sums. This is because the exporter does not enable mutating data in its capability. This change enables the exporter to mutate data in a safe and supported way. Fixed #29574 **Testing** There are existing tests that hit the logic that was panicking, but the metrics are set to `StateMutable` in testing (which is the only way they can be created and setup for testing). I believe that means that before this change the tests were invalid (didn't represent reality), but after this change they'll properly represent the exporter's functionality.
Component(s)
exporter/prometheus
What happened?
Description
I am getting the following error in otel-collector while sending the metrics to the VictoriaMetrics database with delta temporality.
panic: invalid access to shared data
Steps to Reproduce
I have configured the temporality and delta in the SDK configuration as following
I am using Prometheus exporter in the otel-collector and VictoriaMetrics is my datasource. I am using vmagent to pull the metrics and push them to VictoriaMetrics database.
Here is my collector exporter config:
Expected Result
prometheus exporter must process the metrics seamlessly.
Actual Result
Getting the following error stack trace:
Collector version
0.89.0
Environment information
Environment
OS: (e.g., "MacOS 13.5 (22G74)")
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: