-
Notifications
You must be signed in to change notification settings - Fork 598
Open
Description
The logs specification requires that the exporter implements force_flush as described here: - https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#forceflush-2. This function can be asynchronous, but if so, the exporter should offer a way to inform the provider of its status.
Apart from that, the force_flush() interface are different for traces and metrics:
Traces:
| fn force_flush(&mut self) -> BoxFuture<'static, ExportResult> { |
Metrics:
| async fn force_flush(&self) -> MetricResult<()>; |
Looking closer, both interfaces are indeed asynchronous. For traces, the interface returns a Future, making it naturally async, while for metrics, it’s defined using async fn. Although the difference isn’t major, the async fn approach in metrics does look cleaner, more straightforward interface.
Metadata
Metadata
Assignees
Labels
No labels