-
Notifications
You must be signed in to change notification settings - Fork 325
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
Add http url to span context #218
Add http url to span context #218
Conversation
Codecov Report
@@ Coverage Diff @@
## master #218 +/- ##
============================================
+ Coverage 73.52% 73.66% +0.13%
- Complexity 1112 1125 +13
============================================
Files 117 118 +1
Lines 4193 4218 +25
Branches 412 416 +4
============================================
+ Hits 3083 3107 +24
- Misses 911 912 +1
Partials 199 199
Continue to review full report at Codecov.
|
@@ -56,7 +56,7 @@ private static void onBeforeExecute(@Advice.Argument(0) HttpRoute route, | |||
return; | |||
} | |||
final AbstractSpan<?> parent = tracer.getActive(); | |||
span = HttpClientHelper.startHttpClientSpan(parent, request.getMethod(), route.getTargetHost().getHostName(), SPAN_TYPE_APACHE_HTTP_CLIENT); | |||
span = HttpClientHelper.startHttpClientSpan(parent, request.getMethod(), String.valueOf(request.getURI()), route.getTargetHost().getHostName(), SPAN_TYPE_APACHE_HTTP_CLIENT); |
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.
why do you use String.valueOf
here? Can the URI return null? In that case, it might be better to change the signature of startHttpClientSpan
to @Nullable URI
or @Nullable String
and only set if not 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.
According to HttpRequestWrapper
's constructor it can be set to null. You're right, better not to set a null string.
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.
only a minor comment and some non-formatted lines, otherwise LGTM
No description provided.