-
Notifications
You must be signed in to change notification settings - Fork 811
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
chore: improve naming of span related context APIs #1749
chore: improve naming of span related context APIs #1749
Conversation
Rename [gs]etActiveSpan() to [gs]etSpan() as the span is not active anywhere, it's just referenced by the context. Rename setExtractedSpanContext() to setSpanContext() because any SpanContext may be set not only extracted ones. Rename getParentSpanContext() to getSpanContext() because it retrieves the context of the span which can be any span not only a parent.
Codecov Report
@@ Coverage Diff @@
## master #1749 +/- ##
==========================================
+ Coverage 92.07% 92.11% +0.03%
==========================================
Files 166 166
Lines 5593 5591 -2
Branches 1199 1198 -1
==========================================
Hits 5150 5150
+ Misses 443 441 -2
|
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 think they are heavy debate on the PR about the namespacing which belong to its issue. I'm fine with renaming the helpers and decide later where to export them
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 think they are heavy debate on the PR about the namespacing which belong to its issue. I'm fine with renaming the helpers and decide later where to export them
I agree with @vmarchaud the debate has not much to do with the substance of this PR and the name change is in general good.
@obecny i see you 👍 the comment but no approval yet |
I thought I approved |
Which problem is this PR solving?
Short description of the changes
Rename
[gs]etActiveSpan()
to[gs]etSpan()
as the span is not active anywhere, it's just referenced by the context.Rename
setExtractedSpanContext()
tosetSpanContext()
because anySpanContext
may be set not only extracted ones.Rename
getParentSpanContext()
to getSpanContext()` because it retrieves the context of the span which can be any span not only a parent.[sg]etSpanContext()
are quite simple wrappers and could be removed to reduce API surface if preferred. But I see not that much maintenance pain of keeping them so I left them in for now.