WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 424147d

Browse files
committed
renaming DD_UNDERTOW_CONTINUATION to prevent confusing it as a config
1 parent 8b122a7 commit 424147d

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

buildSrc/src/main/kotlin/datadog/gradle/plugin/config/ConfigInversionLinter.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ private fun registerLogEnvVarUsages(target: Project, extension: SupportedTracerC
8282
val javaFiles = target.fileTree(target.projectDir) {
8383
include("**/src/main/java/**/*.java")
8484
exclude("**/build/**", "**/dd-smoke-tests/**")
85+
exclude("dd-java-agent/instrumentation/undertow/src/main/java/datadog/trace/instrumentation/undertow/UndertowDecorator.java")
8586
}
8687
inputs.files(javaFiles)
8788
outputs.upToDateWhen { true }

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package datadog.trace.instrumentation.undertow;
22

3-
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DD_UNDERTOW_CONTINUATION;
3+
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DATADOG_UNDERTOW_CONTINUATION;
44

55
import datadog.appsec.api.blocking.BlockingContentType;
66
import datadog.trace.api.gateway.Flow;
@@ -117,7 +117,7 @@ private static void commitBlockingResponse(
117117
}
118118

119119
private static void markAsEffectivelyBlocked(HttpServerExchange xchg) {
120-
AgentScope.Continuation continuation = xchg.getAttachment(DD_UNDERTOW_CONTINUATION);
120+
AgentScope.Continuation continuation = xchg.getAttachment(DATADOG_UNDERTOW_CONTINUATION);
121121
if (continuation != null) {
122122
continuation.span().getRequestContext().getTraceSegment().effectivelyBlocked();
123123
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class UndertowDecorator
2626
InstanceStore.of(AttachmentKey.class);
2727

2828
@SuppressWarnings("unchecked")
29-
public static final AttachmentKey<AgentScope.Continuation> DD_UNDERTOW_CONTINUATION =
29+
public static final AttachmentKey<AgentScope.Continuation> DATADOG_UNDERTOW_CONTINUATION =
3030
attachmentStore.putIfAbsent(
3131
"DD_UNDERTOW_CONTINUATION", () -> AttachmentKey.create(AgentScope.Continuation.class));
3232

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package datadog.trace.instrumentation.undertow;
22

33
import static datadog.trace.bootstrap.instrumentation.api.AgentSpan.fromContext;
4-
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DD_UNDERTOW_CONTINUATION;
4+
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DATADOG_UNDERTOW_CONTINUATION;
55
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DECORATE;
66

77
import datadog.context.Context;
@@ -18,7 +18,7 @@ private ExchangeEndSpanListener() {}
1818

1919
@Override
2020
public void exchangeEvent(HttpServerExchange exchange, NextListener nextListener) {
21-
AgentScope.Continuation continuation = exchange.getAttachment(DD_UNDERTOW_CONTINUATION);
21+
AgentScope.Continuation continuation = exchange.getAttachment(DATADOG_UNDERTOW_CONTINUATION);
2222
if (continuation == null) {
2323
return;
2424
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import static datadog.trace.bootstrap.instrumentation.api.Java8BytecodeBridge.spanFromContext;
66
import static datadog.trace.instrumentation.undertow.UndertowBlockingHandler.REQUEST_BLOCKING_DATA;
77
import static datadog.trace.instrumentation.undertow.UndertowBlockingHandler.TRACE_SEGMENT;
8-
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DD_UNDERTOW_CONTINUATION;
8+
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DATADOG_UNDERTOW_CONTINUATION;
99
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DECORATE;
1010
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
1111
import static net.bytebuddy.matcher.ElementMatchers.isPublic;
@@ -87,7 +87,7 @@ public static void onEnter(
8787
}
8888
}
8989

90-
AgentScope.Continuation continuation = exchange.getAttachment(DD_UNDERTOW_CONTINUATION);
90+
AgentScope.Continuation continuation = exchange.getAttachment(DATADOG_UNDERTOW_CONTINUATION);
9191
if (continuation != null) {
9292
// not yet complete, not ready to do final activation of continuation
9393
scope = continuation.span().attach();
@@ -101,7 +101,7 @@ public static void onEnter(
101101
DECORATE.afterStart(span);
102102
DECORATE.onRequest(span, exchange, exchange, parentContext);
103103

104-
exchange.putAttachment(DD_UNDERTOW_CONTINUATION, captureSpan(span));
104+
exchange.putAttachment(DATADOG_UNDERTOW_CONTINUATION, captureSpan(span));
105105

106106
exchange.addExchangeCompleteListener(ExchangeEndSpanListener.INSTANCE);
107107

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package datadog.trace.instrumentation.undertow;
22

33
import static datadog.trace.agent.tooling.bytebuddy.matcher.NameMatchers.named;
4-
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DD_UNDERTOW_CONTINUATION;
4+
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DATADOG_UNDERTOW_CONTINUATION;
55
import static net.bytebuddy.matcher.ElementMatchers.isPrivate;
66
import static net.bytebuddy.matcher.ElementMatchers.not;
77
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
@@ -62,7 +62,7 @@ static class GetResponseChannelAdvice {
6262
return false;
6363
}
6464

65-
AgentScope.Continuation continuation = xchg.getAttachment(DD_UNDERTOW_CONTINUATION);
65+
AgentScope.Continuation continuation = xchg.getAttachment(DATADOG_UNDERTOW_CONTINUATION);
6666
if (continuation == null) {
6767
return false;
6868
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import static datadog.trace.bootstrap.instrumentation.api.InstrumentationTags.SERVLET_PATH;
66
import static datadog.trace.bootstrap.instrumentation.decorator.HttpServerDecorator.DD_CONTEXT_ATTRIBUTE;
77
import static datadog.trace.bootstrap.instrumentation.decorator.http.HttpResourceDecorator.HTTP_RESOURCE_DECORATOR;
8-
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DD_UNDERTOW_CONTINUATION;
8+
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DATADOG_UNDERTOW_CONTINUATION;
99
import static datadog.trace.instrumentation.undertow.UndertowDecorator.SERVLET_REQUEST;
1010
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
1111

@@ -64,7 +64,7 @@ public static class DispatchAdvice {
6464
public static void enter(
6565
@Advice.Argument(0) final HttpServerExchange exchange,
6666
@Advice.Argument(1) final ServletRequestContext servletRequestContext) {
67-
AgentScope.Continuation continuation = exchange.getAttachment(DD_UNDERTOW_CONTINUATION);
67+
AgentScope.Continuation continuation = exchange.getAttachment(DATADOG_UNDERTOW_CONTINUATION);
6868
if (continuation != null) {
6969
AgentSpan undertowSpan = continuation.span();
7070
ServletRequest request = servletRequestContext.getServletRequest();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import static datadog.trace.bootstrap.instrumentation.api.InstrumentationTags.SERVLET_CONTEXT;
55
import static datadog.trace.bootstrap.instrumentation.api.InstrumentationTags.SERVLET_PATH;
66
import static datadog.trace.bootstrap.instrumentation.decorator.HttpServerDecorator.DD_CONTEXT_ATTRIBUTE;
7-
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DD_UNDERTOW_CONTINUATION;
7+
import static datadog.trace.instrumentation.undertow.UndertowDecorator.DATADOG_UNDERTOW_CONTINUATION;
88
import static datadog.trace.instrumentation.undertow.UndertowDecorator.SERVLET_REQUEST;
99
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
1010

@@ -56,7 +56,7 @@ public static class DispatchAdvice {
5656
public static void enter(
5757
@Advice.Argument(0) final HttpServerExchange exchange,
5858
@Advice.Argument(1) final ServletRequestContext servletRequestContext) {
59-
AgentScope.Continuation continuation = exchange.getAttachment(DD_UNDERTOW_CONTINUATION);
59+
AgentScope.Continuation continuation = exchange.getAttachment(DATADOG_UNDERTOW_CONTINUATION);
6060
if (continuation != null) {
6161
AgentSpan undertowSpan = continuation.span();
6262
ServletRequest request = servletRequestContext.getServletRequest();

0 commit comments

Comments
 (0)