Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Method to reset the global tracer? #119

@ecourreges-orange

Description

@ecourreges-orange

Hello,
Is it a conscious choice not to have provided a ResetGlobal method or equivalent on the tracer?
I suppose the shared_ptr is cleaned up at global shutdown of an application, but that limits the opportunities for "controlled" init/cleanup of the singleton.

Would this be the preferred way to do it with the current opentracing code?

void closeOpenTracer() 
{ 
    opentracing::Tracer::Global()->Close();
    // How do we delete the global tracer pointer?
    // There is no public method to do so
    //std::shared_ptr<opentracing::Tracer> t;
    // Reinit with an empty shared pointer ?
    //opentracing::Tracer::InitGlobal(t);
}

Thank you,
Regards, Emmanuel.

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