Skip to content

Commit 5f82fb0

Browse files
committed
cleanup
Signed-off-by: sezen.leblay <sezen.leblay@datadoghq.com>
1 parent 2824138 commit 5f82fb0

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

dd-java-agent/appsec/src/main/java/com/datadog/appsec/gateway/GatewayBridge.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,7 @@ private NoopFlow onRequestEnded(RequestContext ctx_, IGSpanInfo spanInfo) {
863863
// If detected any events - mark span at appsec.event
864864
if (!collectedEvents.isEmpty()) {
865865
if (ctx.isManuallyKept()) {
866+
// Set asm keep in case that root span was not available when events are detected
866867
traceSeg.setTagTop(Tags.ASM_KEEP, true);
867868
traceSeg.setTagTop(Tags.PROPAGATED_TRACE_SOURCE, ProductTraceSource.ASM);
868869
}

dd-trace-api/src/main/java/datadog/trace/api/DDTags.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ public class DDTags {
5959
/** Manually force tracer to drop the trace */
6060
public static final String MANUAL_DROP = "manual.drop";
6161

62-
/** ASM force tracer to keep the trace with sampler priority (SAMPLER_KEEP) */
63-
public static final String ASM_SAMPLER_KEEP = "asm.sampler.keep";
64-
6562
public static final String TRACE_START_TIME = "t0";
6663

6764
/* Tags below are for internal use only. */

dd-trace-core/src/main/java/datadog/trace/core/taginterceptor/TagInterceptor.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import static datadog.trace.api.DDTags.MEASURED;
55
import static datadog.trace.api.DDTags.ORIGIN_KEY;
66
import static datadog.trace.api.DDTags.SPAN_TYPE;
7-
import static datadog.trace.api.sampling.PrioritySampling.SAMPLER_KEEP;
87
import static datadog.trace.api.sampling.PrioritySampling.USER_DROP;
98
import static datadog.trace.api.sampling.PrioritySampling.USER_KEEP;
109
import static datadog.trace.bootstrap.instrumentation.api.Tags.HTTP_METHOD;
@@ -109,7 +108,6 @@ public boolean needsIntercept(String tag) {
109108
case DDTags.MANUAL_KEEP:
110109
case DDTags.MANUAL_DROP:
111110
case Tags.ASM_KEEP:
112-
case DDTags.ASM_SAMPLER_KEEP:
113111
case Tags.SAMPLING_PRIORITY:
114112
case Tags.PROPAGATED_TRACE_SOURCE:
115113
case Tags.PROPAGATED_DEBUG:
@@ -157,12 +155,6 @@ public boolean interceptTag(DDSpanContext span, String tag, Object value) {
157155
return true;
158156
}
159157
return false;
160-
case DDTags.ASM_SAMPLER_KEEP:
161-
if (asBoolean(value)) {
162-
span.setSamplingPriority(SAMPLER_KEEP, SamplingMechanism.APPSEC);
163-
return true;
164-
}
165-
return false;
166158
case Tags.SAMPLING_PRIORITY:
167159
return interceptSamplingPriority(span, value);
168160
case Tags.PROPAGATED_TRACE_SOURCE:

0 commit comments

Comments
 (0)