-
Notifications
You must be signed in to change notification settings - Fork 773
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
Add DistributedContext implementation and Delete ITag* Types #366
Add DistributedContext implementation and Delete ITag* Types #366
Conversation
This change includes the following: - Add the missing implementation of the DistributedContext. - Change DistributedContextEntry to a struct to avoid allocations inside the DistributedContext. - Introducing DistributedContext carrier which will carry the current context during the execution - By default, DistributedContext will have Noop carrier for optimizing when the SDK is not loaded. - When SDK loaded, it should set the carrier to the async local carrier defined in the SDK - Removed all Tag* and ITag* types which not needed as DistributedContext should cover the required scenarios. - Modified the serialization to work with the DistributedContext. - Cleaned up the tests and added more DistributedContext specific tests.
@SergeyKanzhelev I'll try to follow up with the comments on this PR. I just want to say, there is opportunities to optimize more to provide more constructors overload to DistributedContext to have the caller avoid creating any collection. We may look at that later. |
I'll look at the failing tests |
@lmolkova @SergeyKanzhelev do you think the failing test is related to my changes here? https://dev.azure.com/opentelemetry/pipelines/_build/results?buildId=915
|
I don't :-( |
I've restarted the pipeline. You could also close and reopen PR, it re-triggers pipelines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly questions
@SergeyKanzhelev I have addressed some of your feedback. Regarding filtering the duplicate entries in the DistributedContext construction, I have kept the filtering but optimized more. The reason is not filtering will add more complexity in other functionality like Equality. Also, if we didn't filter it we'll have to filter every time the context get serialized which not good to do that for the same context every time you serialize it. Let's keep the filtering for now and we can optimize more later if needed. Thanks for the feedback. |
@tarekgh I appreciate you working on your vacation. I tend to accept this PR and follow up on changes later. @open-telemetry/dotnet-approvers any objections? |
I think this is good to accept. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll create issues on unresolved comments
…y#366) * Add StackExchangeRedis Instrumentation
This change includes the following: