-
Notifications
You must be signed in to change notification settings - Fork 315
Context API beforeFinish Migration
#9422
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
Open
zarirhamza
wants to merge
31
commits into
master
Choose a base branch
from
zarir/context-api-finish
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,151
−768
Open
Changes from 20 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
796b57e
Implement APIGW Inferred Proxy Spans (#8336)
jordan-wong e8c2baf
feat(serverless): Fix gateway inferred span design
PerfectSlayer 737e783
init commit of instrumentations
zarirhamza c9a2e21
fix tests
zarirhamza a0ecac7
round 2 of context migration
zarirhamza 2ef3dc7
netty changes
zarirhamza a14848f
tomcat changes
zarirhamza 112ec20
liberty changes
zarirhamza 909d174
store span
zarirhamza c883e8d
jetty
zarirhamza b847401
grizzly
zarirhamza bebe637
Merge branch 'master' into zarir/context-api-finish
zarirhamza f76415f
fix grizzly instrumentation
zarirhamza 8f4a6ee
Merge branch 'master' into zarir/context-api-finish
zarirhamza 762c233
remove serverless
zarirhamza c8c9ece
fixes part 1
zarirhamza f715d62
fix undertow tests
zarirhamza 7fe9c70
remove span within request
zarirhamza 0f0f228
fix tests
zarirhamza ecc5049
fix tests
zarirhamza 4bd005d
implement fixes part 1
zarirhamza 9b4d887
fix tests
zarirhamza a3bb790
merge main fixing merge conflicts
zarirhamza ee71b23
address jetty comments
zarirhamza dd4c4c0
Merge branch 'master' into zarir/context-api-finish
zarirhamza 7fd52d8
Merge branch 'master' into zarir/context-api-finish
zarirhamza 2c27431
use context scope
zarirhamza 6e950a0
fix netty tests
zarirhamza 5f20aee
Merge branch 'master' into zarir/context-api-finish
zarirhamza fd11e7a
fix baggage context usage
zarirhamza 0c4ab54
Merge branch 'master' into zarir/context-api-finish
zarirhamza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,7 +92,7 @@ public static void setupCallback( | |
| final AgentSpan span = scope.span(); | ||
| if (throwable != null) { | ||
| DECORATE.onError(span, throwable); | ||
| DECORATE.beforeFinish(span); | ||
| DECORATE.beforeFinish(scope.context()); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing here, may need to migrate to |
||
| span.finish(); | ||
| scope.close(); | ||
| return; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
❔ question: Can this one be removed then? It will prevent other decorator to override it and never being called.
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.
Cannot, WebSocketDecorator and its related instrumentation still call it. Needs to be a separate mini-migration
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.
Is that the only one blocker? Because the
WebSocketDecoratoris calling the emptyBaseDecorator.beforeFinish()and has no override... So technically, the call is doing nothing :/So we can move it from
BaseDecoratortoWebSocketDecoratorand migrate it in a second pass.@amarziali What's the effort to migrate the WebSocket instrumentation to context rather than span?
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.
Another place where this is called is within the Mule Instrumentation as well via the
MuleDecoratorin mule-4.Moved the empty call to
WebSocketDecoratorandMuleDecoratorthus allowing me to remove the function fromBaseDecorator.I assume the actual span -> context functionality will be taken care of later for both WebSockets and Mule.
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 take it back, I'm not sure how the tests aren't catching it but the
ClientDecoratoralso usesbeforeFinish(span)via theBaseDecorator. This seems to indicate that we need to invest time into looking through all decorators and confirming their reliance on beforeFinish. To save time, for now we can focus just onHttpServerDecoratorrelated instrumentation