Skip to content

Commit c7533d0

Browse files
committed
Consistency: rename AgentScope.Continuation.getSpan() to AgentScope.Continuation.span()
1 parent 053a36f commit c7533d0

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/java/concurrent/ContinuationClaim.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public AgentScope activate() {
1818
}
1919

2020
@Override
21-
public AgentSpan getSpan() {
21+
public AgentSpan span() {
2222
throw new IllegalStateException();
2323
}
2424

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/java/concurrent/State.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void closeContinuation() {
6060
public AgentSpan getSpan() {
6161
AgentScope.Continuation continuation = CONTINUATION.get(this);
6262
if (null != continuation) {
63-
return continuation.getSpan();
63+
return continuation.span();
6464
}
6565
return null;
6666
}

dd-java-agent/instrumentation/undertow/src/main/java/datadog/trace/instrumentation/undertow/UndertowBlockingHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private static void commitBlockingResponse(
119119
private static void markAsEffectivelyBlocked(HttpServerExchange xchg) {
120120
AgentScope.Continuation continuation = xchg.getAttachment(DD_UNDERTOW_CONTINUATION);
121121
if (continuation != null) {
122-
continuation.getSpan().getRequestContext().getTraceSegment().effectivelyBlocked();
122+
continuation.span().getRequestContext().getTraceSegment().effectivelyBlocked();
123123
}
124124
}
125125
}

dd-java-agent/instrumentation/undertow/undertow-2.0/src/main/java/datadog/trace/instrumentation/undertow/ExchangeEndSpanListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void exchangeEvent(HttpServerExchange exchange, NextListener nextListener
2121
return;
2222
}
2323

24-
AgentSpan span = continuation.getSpan();
24+
AgentSpan span = continuation.span();
2525

2626
Throwable throwable = exchange.getAttachment(DefaultResponseListener.EXCEPTION);
2727
if (throwable != null) {

dd-java-agent/instrumentation/undertow/undertow-2.0/src/main/java/datadog/trace/instrumentation/undertow/HttpServerExchangeSenderInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static class GetResponseChannelAdvice {
6969
}
7070
xchg.putAttachment(IgnoreSendAttribute.IGNORE_SEND_KEY, IgnoreSendAttribute.INSTANCE);
7171

72-
AgentSpan span = continuation.getSpan();
72+
AgentSpan span = continuation.span();
7373
Flow<Void> flow =
7474
UndertowDecorator.DECORATE.callIGCallbackResponseAndHeaders(
7575
span, xchg, xchg.getStatusCode(), UndertowExtractAdapter.Response.GETTER);

dd-java-agent/instrumentation/undertow/undertow-2.0/src/main/java/datadog/trace/instrumentation/undertow/ServletInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static void enter(
6666
@Advice.Argument(1) final ServletRequestContext servletRequestContext) {
6767
AgentScope.Continuation continuation = exchange.getAttachment(DD_UNDERTOW_CONTINUATION);
6868
if (continuation != null) {
69-
AgentSpan undertowSpan = continuation.getSpan();
69+
AgentSpan undertowSpan = continuation.span();
7070
ServletRequest request = servletRequestContext.getServletRequest();
7171
request.setAttribute(DD_SPAN_ATTRIBUTE, undertowSpan);
7272
undertowSpan.setSpanName(SERVLET_REQUEST);

dd-java-agent/instrumentation/undertow/undertow-2.2/src/main/java/datadog/trace/instrumentation/undertow/JakartaServletInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static void enter(
5858
@Advice.Argument(1) final ServletRequestContext servletRequestContext) {
5959
AgentScope.Continuation continuation = exchange.getAttachment(DD_UNDERTOW_CONTINUATION);
6060
if (continuation != null) {
61-
AgentSpan undertowSpan = continuation.getSpan();
61+
AgentSpan undertowSpan = continuation.span();
6262
ServletRequest request = servletRequestContext.getServletRequest();
6363
request.setAttribute(DD_SPAN_ATTRIBUTE, undertowSpan);
6464
undertowSpan.setSpanName(SERVLET_REQUEST);

dd-trace-core/src/main/java/datadog/trace/core/scopemanager/ScopeContinuation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void cancelFromContinuedScopeClose() {
113113
}
114114

115115
@Override
116-
public AgentSpan getSpan() {
116+
public AgentSpan span() {
117117
return spanUnderScope;
118118
}
119119

internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/AgentScope.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ interface Continuation extends TraceScope.Continuation {
2222
AgentScope activate();
2323

2424
/** Provide access to the captured span */
25-
AgentSpan getSpan();
25+
AgentSpan span();
2626
}
2727
}

internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/NoopContinuation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public AgentScope activate() {
1616
}
1717

1818
@Override
19-
public AgentSpan getSpan() {
19+
public AgentSpan span() {
2020
return NoopSpan.INSTANCE;
2121
}
2222

0 commit comments

Comments
 (0)