-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: add instrumentation for AsyncHttpClient version 1.8 #15195
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
base: main
Are you sure you want to change the base?
Conversation
|
I believe that some code could be shared between 1.8 and 1.9 instrumentations. |
Yes, but the code isn't extensive. There are a few differences in |
you could name the common module
You could pass a helper class to these that abstracts away the part that is different between async http client versions. |
|
🔧 The result from spotlessApply was committed to the PR branch. |
| instrumenter().end(data.getContext(), data.getRequest(), response, null); | ||
|
|
||
| Instrumenter<Request, Response> instrumenter = data.getInstrumenter(); | ||
| if (instrumenter != null) { |
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.
Can the instrumenter be null here? I'd push the span ending logic into AsyncHandlerData so you could just use return data.end(response, throwable);
| private static final Instrumenter<Request, Response> INSTRUMENTER; | ||
|
|
||
| static { | ||
| AsyncHttpClientHttpAttributesGetter httpAttributesGetter = |
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.
If you'd introduce a factory class that takes instrumentation name and the helper then you could keep the getter and header setter as package private
| jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") | ||
|
|
||
| systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean) | ||
| systemProperty("async.https.skip", "true") |
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.
what is this system property for?
No description provided.