-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActivityContextManger does not propagate parents across os_activities #590
Comments
Thanks @bryce-b for putting things up. I guess we want to make sure how ActivityContextManager will work when you have concurrent situation like this: Code block 1:
Code block 2:
Now both code blocks start in the same CPU cycle, can ActivityContextManager make sure each child of each block will have a proper parent? In our case, it was inconsistent. Are there any particular steps or instructions we have to follow to make sure regardless of where and when span creation comes it will guarantee the proper parenting? I also tried following way for concurrent scenario but didn’t help:
|
Hey @mamunto, are you calling |
By default a new created span (as the one created in a network request when it is instrumented) takes the active span of its execution context as the parent |
We resolved this during the SIG meeting. It was not an issue with the SDK. The issue was manually instrumenting network requests not using the build-in URLSessionInstrumentation. Note: you could resolve this by using |
Issue
When creating a span and setting it as the parent via the context manager it would be expected that a network request made during that parent span would be attributed to it as a child. This is not the case however.
It seems that os_activity will create a new activity when that network request is spawned, but the context is not propagated.
Discussion
Should the ActivityContextManger attempt to propagate context when a new os_activity is spawned setting a parent in the new context? Is there a way to determine if an os_activity is scoped from another?
@mamunto to add addition context.
The text was updated successfully, but these errors were encountered: