Background and Motivation
I cross-posted some of my motivation for this proposal here in the OpenTelemetry repository:
Motiviation: not all application context can be propagated or consumed the same way. In the world of capturing this through OpenTracing we had the ability to create custom
IScope objects - this allowed applications like mine (actor-based) to manage scope using actor-static variables, rather than
AsyncLocal which wouldn't work in our case.
I'd suggest adding something akin to an
IScopeManager from OpenTracing to help resolve this - call it the
IActivityScopeManager. I'd pair the
IScopeManager with a specific
ActivitySource so it doesn't change the scope of all created
Activity objects globally.