Repository navigation
reorder webflux error capture - #4633
Open
jackshirazi wants to merge 1 commit into
Open
jackshirazi wants to merge 1 commit into
jackshirazi wants to merge 1 commit into
Conversation
🤖 GitHub commentsJust comment with:
|
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the WebFlux change intended to preserve HTTP context on error events.
No open issues 🎉
What changed in this PR
This PR addresses #4632 by reordering HTTP context population in the Elastic APM Java agent’s WebFlux instrumentation so error events retain request and response details.
Changes:
- Populate request context before dispatch for non-servlet transactions.
- Populate response context before capturing completion errors, while preserving servlet-owned transaction handling.
- Add regression coverage for HTTP context on unmapped 404 errors in sampled and unsampled requests.
| File | Description |
|---|---|
| apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/AbstractServerInstrumentationTest.java | Verify error sampling state, request method, URL, and response status. |
| apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxHelper.java | Populate HTTP context earlier so it is available when errors are captured. |
Review effort: Balanced
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fixes #4632