open-telemetry / opentelemetry-rust

The Rust OpenTelemetry implementation
https://opentelemetry.io
Apache License 2.0
1.78k stars 411 forks source link

[Feature]: Support Metrics, BatchProcessor without async runtime #1437

Open cijothomas opened 8 months ago

cijothomas commented 8 months ago

Related Problems?

No response

Describe the solution you'd like:

Discussed originally here : https://github.com/open-telemetry/opentelemetry-rust/pull/1308#issuecomment-1774468050

We need to support metrics aggregation and batchprocessors for user who do not use any async runtimes. We might be able to spin up a dedicated background thread to achieve this.

Considered Alternatives

No response

Additional Context

No response

cijothomas commented 3 months ago

As tried here, the ticks are coming very unpredictably. It is always off by ~2-5 secs. I'll check if using a dedicated thread will improve accuracy, and enable Metrics to work without any async runtimes. (for those users who prefer that!)