-
Notifications
You must be signed in to change notification settings - Fork 882
Synchronous gauge can not send out immediately when be called. #6455
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
Comments
Not sure what problem you're seeing. A synchronous gauge recording will happen immediately, but the export will still only happen on the configured interval for export. Are you expecting the exporter to immediately send the gauge value when recorded? Also, please be aware that a synchronous gauge is aggregated with the "last value" aggregation, so only the last one recorded will ever be sent. |
Hi @jkwatson What's the difference between Synchronous gauge and Asynchronous gauge? I am not sure whether I misunderstand it or not, I think Synchronous gauge should send out the metric data imediately(Synchronously), for example ,when call the below codes the exporter should recieve 10 numbers(1,2,3....10), but actually only received 1 number(10).
|
@tongshushan The "Synchronous" vs. "Asynchronous" refers to how the values for the instrument are intended to be recorded. "Asynchronous" instruments have their values recorded via an asynchronous callback, usually once per collection cycle. "Synchronous" instruments are used "synchronous" with (for example) request code. The reporting of the values is independent of the recording of them, and is handled by the exporter/aggregation configuration, not at the API level, where the distinction exists. If this isn't clear, I recommend reading the specification documents about how these instruments are intended to be used. Hope that helps! |
Closing. Please re-open if you think this warrants additional discussion. |
@jkwatson I see, thanks. |
Describe the bug
Hello ,
Refer to #5506 , I find the Synchronous gauge can not be sent out immediately when called, also sent out Periodically(interaval: 1minute)
I am not sure whether it works as designed or it's a bug.
Steps to reproduce
Call rest api: /testSendSynchronizedGauge as below:
io.opentelemetry: 1.37.0
What did you expect to see?
Expect to see the metrics immeditely in otlp exporters.
What did you see instead?
Metrics delayed.
Additional context
Full code: #6378
The text was updated successfully, but these errors were encountered: