Skip to content

Commit 81a9768

Browse files
committed
fixing ambiguous overloading tests
1 parent 99a6528 commit 81a9768

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
@@ -143,7 +143,7 @@ public Context extractContext(REQUEST_CARRIER carrier) {
143143
return Propagators.defaultPropagator().extract(Context.root(), carrier, getter);
144144
}
145145

146-
/** Deprecated. Use {@link #startSpan(String, Object, Context)} instead. */
146+
/** Deprecated. Use {@link #startSpanFromContext(String, Object, Context)} instead. */
147147
@Deprecated
148148
public AgentSpan startSpan(REQUEST_CARRIER carrier, AgentSpanContext.Extracted context) {
149149
return startSpan("http-server", carrier, context);
@@ -166,7 +166,8 @@ public AgentSpan startSpan(
166166
return span;
167167
}
168168

169-
public AgentSpan startSpan(String instrumentationName, REQUEST_CARRIER carrier, Context context) {
169+
public AgentSpan startSpanFromContext(
170+
String instrumentationName, REQUEST_CARRIER carrier, Context context) {
170171
return startSpan(instrumentationName, carrier, getExtractedSpanContext(context));
171172
}
172173

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)