Implement HTTP resend spec for Reactor Netty (excl CONNECT spans)#8111
Merged
mateuszrzeszutek merged 10 commits intoJul 21, 2023
Merged
Conversation
Comment on lines
+117
to
126
| if (HttpClientResend.get(instrumentationContexts.getParentContext()) == 0) { | ||
| // TODO: emit connection error span | ||
|
|
||
| // FIXME: this branch requires lots of changes around the NettyConnectionInstrumenter | ||
| // currently it also creates that connection error span (when the connection telemetry is | ||
| // turned off), but without HTTP semantics - it does not have access to any HTTP information | ||
| // after all | ||
| // it should be possible to completely disable it, and just start and end the span here | ||
| // this requires lots of refactoring and pretty uninteresting changes in the netty code, so | ||
| // I'll do that in a separate PR - for better readability | ||
| } |
Member
Author
There was a problem hiding this comment.
Here's where the connection span will be added -- similar to the ConnectionErrorSpanInterceptor in the OkHttp instrumentation, it's only emitted on error and when there were no HTTP requests made.
02a4d2c to
51014a1
Compare
dd82a2e to
d1ff9c6
Compare
Member
Author
|
@open-telemetry/java-instrumentation-approvers please review this PR 🙏 |
breedx-splk
approved these changes
Jul 14, 2023
breedx-splk
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. A few small nits, otherwise looking good. Not having the error span in there makes the state a little weird, but I definitely prefer this incremental work. 👍🏻
| waitAndAssertTraces(traceComparator, Arrays.asList(assertions), true); | ||
| } | ||
|
|
||
| public final void waitAndAssertSortedTraces( |
trask
approved these changes
Jul 18, 2023
Comment on lines
+114
to
+116
| equalTo(SemanticAttributes.USER_AGENT_ORIGINAL, USER_AGENT), | ||
| equalTo(SemanticAttributes.HTTP_STATUS_CODE, 200), | ||
| equalTo(SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH, 0), |
Comment on lines
+112
to
+114
| // TODO: remove this test altogether? this scenario is (was) only implemented in reactor-netty, | ||
| // all other HTTP clients worked in a different way | ||
| // optionsBuilder.enableTestCallbackWithImplicitParent(); |
Comment on lines
+18
to
+19
| public String getUrlFull(HttpClientRequest request) { | ||
| return request.resourceUrl(); |
54e6780 to
70be753
Compare
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.
Part of #5722
Similar to #7652, it implements the resend spec in Reactor Netty. This PR does not include the connection error span implementation, since that requires some changes in the Netty instrumentation as well. It does prepare the code for the connection error changes though -- I'll just add them in a separate PR (based on this one) to make things easier to read.