Open
Description
I'm trying to instrument some code that's used in a library that has very specific code flow. Keeping track of the spans and scopes myself is very tricky because I can't pass the spans/scopes. I have to store them in some locally managed storage.
In other tracing libraries (not c++), I've always just been able to do the equivalent of tracer->StartSpan()
, and then some time later tracer->CurrentSpan()->End()
or whatever. Is there advice on managing scopes if their lifetime is complicated? The only ways I see it working are global state, or polluting the types of all my functions to pass the scope around.