- 
                Notifications
    
You must be signed in to change notification settings  - Fork 945
 
Description
Hi
I would like to know if there is a way to retrieve the parent span instance of the current active span ?
Context
I'm using opentelemetry with winston to save logs and traces in an app insights. We have implemented a sampling strategy in which we are keeping only 1% of logs/traces (it's more complicated but let's simplify like this)
In case of service crash I would like to be able to force the sampling of the active span AND the parent spans. For that, I am catching unhandledRejection and uncaughtException to set the traceFlags to 1 on the active span. But I never found how to apply the same rule over the parent spans. Is there any way to perform this kind of things ?
Tip: React with π to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.