Skip to content

Exporter::force_flush() interface missing for Logs  #2261

@lalitb

Description

@lalitb

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions