Skip to content

Document need of opentelemetry::global::shutdown_tracer_provider()? #122

Open
@alexpdp7

Description

@alexpdp7

Feature Request

Motivation

I was playing with tracing and OpenTelemetry and I was noticing that under some conditions, my test applications were not sending traces at all.

Looking at one of the examples, I saw opentelemetry::global::shutdown_tracer_provider(). Adding this at the end of my program made things work reliably (apparently!).

I think this is related to very short programs that run quickly. Somehow accumulated traces are lost on exit.

Proposal

While this is documented in the opentelemetry crate, and I found it in the examples, I think users of this crate would appreciate some nudging towards this.

Alternatives

Or perhaps, the shutdown can happen automatically? That would be even better.

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