otlp MetricExporter in a custom event loop #3041
Unanswered
CrimsonAndRed
asked this question in
Q&A
Replies: 1 comment
-
Probably looking for ManualReader then.. it does not flush metrics on its own (it has no background job). Only time metrics is pushed are when you explicitly trigger via Flush(). Another option (it is experimental today) is to use periodic_reader that uses async tasks, so it'll integrate with tokio like runtimes instead of spawning own thread. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, folks! I am trying to use an OTEL exporter in a form:
which does a background work of metrics exporting and is working fine. Though I would like to move periodic jobs on my own event loop. Is it possible via current API? Looks like there are just 2 options available for MeterProviders - either use with_periodic_exporter(..) or with_reader(..). I assumed the latter one is an option for me, but can not "connect" reader to exporter.
Of course I can set gigantic duration for exporter, use with_periodic_exporter(..) and do provider.force_flush(), though I expect... more elegant solution.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions