-
Notifications
You must be signed in to change notification settings - Fork 453
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
Wrong Counter metric data when ExportFailed #2366
Comments
Could you update to the newest version of the crates? We won't be able to dig into the specific backend issues, so really appreciate if you can get a repro that we can investigate. |
yes, I will, and I will provide you in a separate crate the part of the code that I use related to the counter setup and usage, if this still doesn't work (however I posted this issue because I didn't see in the CHANGELOG any fix related to this in the last version).
Could you please elaborate what exactly you mean with this sentence? The issue is this:
In none of these cases I would expect a spike with no related INFO logs during a time interval when no requests were sent. Which is what is happening at the same time we got the In summary the backend seems to be working as expected, as well as the counter implementation, except when the metrics/traces cannot be exported. |
Need to get a repro application to investigate this. (Note we won't be able to look into your backend, so need to show either stdout or OTLP exporter with a local collector outputting debug so we can see what is emitted from the application itself). |
Related Problems?
We are using opentelemetry to send metric via an OTLP exporter that is setup as follow
In particular, we are interested in counting a particular occurrence, and we use a
Counter
to do the job, setup as follow:Everything seems to work as expected, and I can see on the metrics explorer (DataDog) the counter being increased as expected, and for each time a corresponding INFO log.
However, it has happened multiple times that we get huge spikes in the counter metric at times where there is no reason to suspect the counter has actually being changed (ie, no calls to
counter.add()
):As you can see in the above example there was a spike at 6am, however no INFO log was recorded for it (no other trace recorded the call to that part of the code). What happened instead is that, for some unknown reason (maybe related to this other issue?), we see a log at the exact same time of the spike, coming from the global error handler:
Describe the solution you'd like:
I would like the counter to report the correct number of times it has been increased, and that, in particular, in case of (unknown) connection refused errors, no wrong metrics will be reported.
If this is an error on my side (for example wrong setup or usage of the meter) please let me know.
Considered Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: