Do not set component in AWS instrumentation that later get rewritten anyway

This commit is contained in:
Nikolay Martynov 2018-11-15 12:32:11 -05:00
parent 6f05cff023
commit 465e237522
1 changed files with 2 additions and 4 deletions

View File

@ -56,11 +56,9 @@ public class TracingRequestHandler extends RequestHandler2 {
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public void beforeRequest(final Request<?> request) { public void beforeRequest(final Request<?> request) {
// Note: not setting Component tag here because it is always set by SpanDecorator
final Tracer.SpanBuilder spanBuilder = final Tracer.SpanBuilder spanBuilder =
tracer tracer.buildSpan("aws.command").withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_CLIENT);
.buildSpan("aws.command")
.withTag(Tags.COMPONENT.getKey(), "aws-sdk")
.withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_CLIENT);
if (parentContext != null) { if (parentContext != null) {
spanBuilder.asChildOf(parentContext); spanBuilder.asChildOf(parentContext);