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
Optimize the addition of TraceSegmentRef #5925
Comments
What do you mean |
I mean that the corresponding TraceSegmentRef will be created in the extract() and continued() methods of TracingContext, and then bound through the ref() method. However, if the TraceSegmentRef exists, then it will create a useless TraceSegmentRef object? |
What do you mean useless? Ref is designed to be created. I can't see your point. |
I am still not following. This method belongs to TraceSegment, which is owned by TracingContext. What is the issue? |
Could you share the real use case? If you want to change source codes in your private usage, it is open to you. Feel free to do anything you like. In the upstream, I can't see the issue now. |
Please answer these questions before submitting your issue.
Question
when the extract() and continued() methods of TraceContext are called, TraceSegmentRef is created in the outer layer and then ref() is called to bind. If the corresponding TraceSegmentRef already exists, then no operation is done in the ref() method, here Will cause useless TraceSegmentRef object creation
Requirement or improvement
I think some common fields of ContextCarrier and ContextSnapshot can be extracted and defined as the parent class, and then provide a method to create TraceSegmentRef based on the parent class. In the ref() method of TraceSegment, the parameter is defined as the parent class, and then the ref() method returns TraceSegmentRef for external use
The text was updated successfully, but these errors were encountered: