Skip to content

Commit 24f8e54

Browse files
committed
fixing ambiguous overloading tests
1 parent 42190ea commit 24f8e54

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/HttpServerDecorator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ public Context extractContext(REQUEST_CARRIER carrier) {
542542
return Propagators.defaultPropagator().extract(Context.root(), carrier, getter);
543543
}
544544

545-
/** Deprecated. Use {@link #startSpan(String, Object, Context)} instead. */
545+
/** Deprecated. Use {@link #startSpanFromContext(String, Object, Context)} instead. */
546546
@Deprecated
547547
public AgentSpan startSpan(REQUEST_CARRIER carrier, AgentSpanContext.Extracted context) {
548548
return startSpan("http-server", carrier, context);
@@ -654,7 +654,8 @@ private AgentSpan startSpanWithInferredProxy(
654654
return apiGtwSpan;
655655
}
656656

657-
public AgentSpan startSpan(String instrumentationName, REQUEST_CARRIER carrier, Context context) {
657+
public AgentSpan startSpanFromContext(
658+
String instrumentationName, REQUEST_CARRIER carrier, Context context) {
658659
return startSpan(instrumentationName, carrier, getExtractedSpanContext(context));
659660
}
660661

dd-java-agent/instrumentation/tomcat-5.5/src/main/java/datadog/trace/instrumentation/tomcat/TomcatServerInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public static ContextScope onService(@Advice.Argument(0) org.apache.coyote.Reque
129129
req.setAttribute(
130130
DD_EXTRACTED_CONTEXT_ATTRIBUTE, DECORATE.getExtractedSpanContext(extractedContext));
131131

132-
final AgentSpan span = DECORATE.startSpan("http-server", req, extractedContext);
132+
final AgentSpan span = DECORATE.startSpanFromContext("http-server", req, extractedContext);
133133
final ContextScope scope = extractedContext.with(span).attach();
134134
// This span is finished when Request.recycle() is called by RequestInstrumentation.
135135
DECORATE.afterStart(span);

0 commit comments

Comments
 (0)