Skip to content

Configuration to Disable APM Tracing #8219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4356eda
Fix org.json iast instrumentation test for latest dependency
jandro996 Feb 6, 2025
f149563
fix codenarc
jandro996 Feb 6, 2025
08dd68f
add new instrumentation and cover more constructors
jandro996 Feb 7, 2025
05e6525
fix muzzle and check previous latest version
jandro996 Feb 10, 2025
a2eafb2
add new config property apm sampling enabled and move to _dd.p.ts
jandro996 Jan 16, 2025
def470b
rename productTs
jandro996 Feb 4, 2025
e05d1ad
rename productTs in PTagsFactory
jandro996 Feb 4, 2025
7fe3d34
Fix AtomicInteger wrong use
jandro996 Feb 6, 2025
dc2155c
remove unnecessary refactor
jandro996 Feb 10, 2025
2f82fc4
keep it alphabetically
jandro996 Feb 10, 2025
b2d4922
Add meaningful constant UNSET to ProductTraceSource 0
jandro996 Feb 10, 2025
8bdff19
Improve javadoc
jandro996 Feb 10, 2025
13aaa1e
remove deprecated datadog.trace.api.sampling.PrioritySampling
jandro996 Feb 10, 2025
32f7b6e
lowercase the trace source tag value
jandro996 Feb 11, 2025
31f9ae0
refactor to traceSource and addTraceSource
jandro996 Feb 11, 2025
50763f1
fix rebased compilation errors
jandro996 Feb 11, 2025
fed37e5
fix spotless
jandro996 Feb 11, 2025
7f32632
fixTracingPropagatorTest
jandro996 Feb 11, 2025
497c568
more meaningful constant changes and renaming Ts with TraceSource
jandro996 Feb 11, 2025
2d4965b
Update dd-trace-core/src/test/groovy/datadog/trace/core/propagation/D…
jandro996 Feb 11, 2025
a0edcc0
typo
jandro996 Feb 11, 2025
b7c425d
change decision maker to default for ApmTracingDisabledSampler
jandro996 Feb 11, 2025
3dc7926
Revert "fix muzzle and check previous latest version"
jandro996 Feb 11, 2025
6d00e1e
Revert "add new instrumentation and cover more constructors"
jandro996 Feb 11, 2025
8149451
Revert "fix codenarc"
jandro996 Feb 11, 2025
3c2f068
Revert "Fix org.json iast instrumentation test for latest dependency"
jandro996 Feb 11, 2025
f994bac
product trace source should generate two-character case-insensitive h…
jandro996 Feb 11, 2025
92ff472
special standalone sampler should only be used when tracing is disabl…
jandro996 Feb 12, 2025
4867759
fix merge issues
jandro996 Feb 12, 2025
b5f1b22
rename updatePropagatedTraceSource method
jandro996 Feb 14, 2025
8eb0d65
Revert "rename updatePropagatedTraceSource method"
jandro996 Feb 14, 2025
cb9a2d4
rename updatePropagatedTraceSource method
jandro996 Feb 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.datadog.iast.model.VulnerabilityBatch;
import com.datadog.iast.taint.TaintedObjects;
import datadog.trace.api.Config;
import datadog.trace.api.ProductTraceSource;
import datadog.trace.api.gateway.RequestContext;
import datadog.trace.api.gateway.RequestContextSlot;
import datadog.trace.api.internal.TraceSegment;
Expand Down Expand Up @@ -125,7 +126,7 @@ private VulnerabilityBatch getOrCreateVulnerabilityBatch(final AgentSpan span) {
// TODO: We need to check if we can have an API with more fine-grained semantics on why traces
// are kept.
segment.setTagTop(Tags.ASM_KEEP, true);
segment.setTagTop(Tags.PROPAGATED_APPSEC, true);
segment.setTagTop(Tags.PROPAGATED_TRACE_SOURCE, ProductTraceSource.ASM);
return batch;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.datadog.iast.model.Vulnerability
import com.datadog.iast.model.VulnerabilityBatch
import com.datadog.iast.model.VulnerabilityType
import datadog.trace.api.Config
import datadog.trace.api.ProductTraceSource
import datadog.trace.api.gateway.RequestContext
import datadog.trace.api.gateway.RequestContextSlot
import datadog.trace.api.internal.TraceSegment
Expand Down Expand Up @@ -85,7 +86,7 @@ class ReporterTest extends DDSpecification {
]
}''', batch.toString(), true)
1 * traceSegment.setTagTop('asm.keep', true)
1 * traceSegment.setTagTop('_dd.p.appsec', true)
1 * traceSegment.setTagTop('_dd.p.ts', ProductTraceSource.ASM)
1 * reqCtx.getOrCreateMetaStructTop('_dd.stack', _) >> { stackTraceBatch }
assertStackTrace(stackTraceBatch, v)
0 * _
Expand Down Expand Up @@ -135,7 +136,7 @@ class ReporterTest extends DDSpecification {
]
}''', batch.toString(), true)
1 * traceSegment.setTagTop('asm.keep', true)
1 * traceSegment.setTagTop('_dd.p.appsec', true)
1 * traceSegment.setTagTop('_dd.p.ts', ProductTraceSource.ASM)
0 * _
}

Expand Down Expand Up @@ -206,7 +207,7 @@ class ReporterTest extends DDSpecification {
]
}''', batch.toString(), true)
1 * traceSegment.setTagTop('asm.keep', true)
1 * traceSegment.setTagTop('_dd.p.appsec', true)
1 * traceSegment.setTagTop('_dd.p.ts', ProductTraceSource.ASM)
assertStackTrace(stackTraceBatch, [v1, v2] as Vulnerability[])
0 * _
}
Expand Down Expand Up @@ -331,7 +332,7 @@ class ReporterTest extends DDSpecification {
1 * traceSegment.getDataTop('iast') >> null
1 * traceSegment.setDataTop('iast', _ as VulnerabilityBatch)
1 * traceSegment.setTagTop('asm.keep', true)
1 * traceSegment.setTagTop('_dd.p.appsec', true)
1 * traceSegment.setTagTop('_dd.p.ts', ProductTraceSource.ASM)
1 * traceSegment.setTagTop('_dd.iast.enabled', 1)
1 * reqCtx.getOrCreateMetaStructTop('_dd.stack', _) >> new ConcurrentHashMap<>()
0 * _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.datadog.appsec.report.AppSecEvent;
import com.datadog.appsec.report.AppSecEventWrapper;
import datadog.trace.api.Config;
import datadog.trace.api.ProductTraceSource;
import datadog.trace.api.UserIdCollectionMode;
import datadog.trace.api.gateway.Events;
import datadog.trace.api.gateway.Flow;
Expand Down Expand Up @@ -214,7 +215,7 @@ private Flow<Void> onUser(

// span with ASM data
segment.setTagTop(Tags.ASM_KEEP, true);
segment.setTagTop(Tags.PROPAGATED_APPSEC, true);
segment.setTagTop(Tags.PROPAGATED_TRACE_SOURCE, ProductTraceSource.ASM);

// skip event if we have an SDK one
if (mode != SDK) {
Expand Down Expand Up @@ -275,7 +276,7 @@ private Flow<Void> onLoginEvent(

// span with ASM data
segment.setTagTop(Tags.ASM_KEEP, true);
segment.setTagTop(Tags.PROPAGATED_APPSEC, true);
segment.setTagTop(Tags.PROPAGATED_TRACE_SOURCE, ProductTraceSource.ASM);

// update span tags
segment.setTagTop("appsec.events." + eventName + ".track", true, true);
Expand Down Expand Up @@ -789,7 +790,7 @@ private NoopFlow onRequestEnded(RequestContext ctx_, IGSpanInfo spanInfo) {
if (!collectedEvents.isEmpty()) {
// Set asm keep in case that root span was not available when events are detected
traceSeg.setTagTop(Tags.ASM_KEEP, true);
traceSeg.setTagTop(Tags.PROPAGATED_APPSEC, true);
traceSeg.setTagTop(Tags.PROPAGATED_TRACE_SOURCE, ProductTraceSource.ASM);
traceSeg.setTagTop("appsec.event", true);
traceSeg.setTagTop("network.client.ip", ctx.getPeerAddress());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import datadog.communication.monitor.Monitoring;
import datadog.trace.api.Config;
import datadog.trace.api.ProductActivation;
import datadog.trace.api.ProductTraceSource;
import datadog.trace.api.gateway.Flow;
import datadog.trace.api.telemetry.LogCollector;
import datadog.trace.api.telemetry.WafMetricCollector;
Expand Down Expand Up @@ -498,7 +499,9 @@ public void onDataAvailable(
// If APM is disabled, inform downstream services that the current
// distributed trace contains at least one ASM event and must inherit
// the given force-keep priority
activeSpan.getLocalRootSpan().setTag(Tags.PROPAGATED_APPSEC, true);
activeSpan
.getLocalRootSpan()
.setTag(Tags.PROPAGATED_TRACE_SOURCE, ProductTraceSource.ASM);
} else {
// If active span is not available the ASK_KEEP tag will be set in the GatewayBridge
// when the request ends
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.datadog.appsec.event.data.DataBundle
import com.datadog.appsec.event.data.KnownAddresses
import com.datadog.appsec.report.AppSecEvent
import com.datadog.appsec.report.AppSecEventWrapper
import datadog.trace.api.ProductTraceSource
import datadog.trace.api.UserIdCollectionMode
import datadog.trace.api.appsec.LoginEventCallback
import datadog.trace.api.function.TriConsumer
Expand Down Expand Up @@ -1112,7 +1113,7 @@ class GatewayBridgeSpecification extends DDSpecification {
1 * traceSegment.setTagTop('appsec.events.users.signup.track', true, true)
1 * traceSegment.setTagTop('appsec.events.users.signup', ['key1': 'value1', 'key2': 'value2'], true)
1 * traceSegment.setTagTop('asm.keep', true)
1 * traceSegment.setTagTop('_dd.p.appsec', true)
1 * traceSegment.setTagTop('_dd.p.ts', ProductTraceSource.ASM)
1 * eventDispatcher.publishDataEvent(nonEmptyDsInfo, ctx.data, _ as DataBundle, _ as GatewayContext) >> { a, b, DataBundle db, GatewayContext gw ->
if (mode == SDK) {
assert db.get(KnownAddresses.USER_ID) == expectedUser
Expand Down Expand Up @@ -1151,7 +1152,7 @@ class GatewayBridgeSpecification extends DDSpecification {
1 * traceSegment.setTagTop('appsec.events.users.login.success.track', true, true)
1 * traceSegment.setTagTop('appsec.events.users.login.success', ['key1': 'value1', 'key2': 'value2'], true)
1 * traceSegment.setTagTop('asm.keep', true)
1 * traceSegment.setTagTop('_dd.p.appsec', true)
1 * traceSegment.setTagTop('_dd.p.ts', ProductTraceSource.ASM)
1 * eventDispatcher.publishDataEvent(nonEmptyDsInfo, ctx.data, _ as DataBundle, _ as GatewayContext) >> { a, b, DataBundle db, GatewayContext gw ->
if (mode == SDK) {
assert db.get(KnownAddresses.USER_ID) == expectedUser
Expand Down Expand Up @@ -1192,7 +1193,7 @@ class GatewayBridgeSpecification extends DDSpecification {
1 * traceSegment.setTagTop('appsec.events.users.login.failure.usr.exists', false, true)
1 * traceSegment.setTagTop('appsec.events.users.login.failure', ['key1': 'value1', 'key2': 'value2'], true)
1 * traceSegment.setTagTop('asm.keep', true)
1 * traceSegment.setTagTop('_dd.p.appsec', true)
1 * traceSegment.setTagTop('_dd.p.ts', ProductTraceSource.ASM)
1 * eventDispatcher.publishDataEvent(nonEmptyDsInfo, ctx.data, _ as DataBundle, _ as GatewayContext) >> { a, b, DataBundle db, GatewayContext gw ->
if (mode == SDK) {
assert db.get(KnownAddresses.USER_ID) == expectedUser
Expand Down Expand Up @@ -1221,7 +1222,7 @@ class GatewayBridgeSpecification extends DDSpecification {
1 * traceSegment.setTagTop('appsec.events.my.event.track', true, true)
1 * traceSegment.setTagTop('appsec.events.my.event', ['key1': 'value1', 'key2': 'value2'], true)
1 * traceSegment.setTagTop('asm.keep', true)
1 * traceSegment.setTagTop('_dd.p.appsec', true)
1 * traceSegment.setTagTop('_dd.p.ts', ProductTraceSource.ASM)
0 * eventDispatcher.publishDataEvent
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package datadog.smoketest.asmstandalonebilling;
package datadog.smoketest.apmtracingdisabled;

import java.util.EnumSet;
import javax.servlet.ServletContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package datadog.smoketest.asmstandalonebilling;
package datadog.smoketest.apmtracingdisabled;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.opentracing.Span;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package datadog.smoketest.asmstandalonebilling;
package datadog.smoketest.apmtracingdisabled;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package datadog.smoketest.asmstandalonebilling
package datadog.smoketest.apmtracingdisabled

import datadog.smoketest.AbstractServerSmokeTest
import datadog.trace.api.sampling.PrioritySampling
import datadog.trace.test.agent.decoder.DecodedTrace

abstract class AbstractAsmStandaloneBillingSmokeTest extends AbstractServerSmokeTest {
abstract class AbstractApmTracingDisabledSmokeTest extends AbstractServerSmokeTest {

@Override
File createTemporaryFile(int processIndex) {
Expand Down Expand Up @@ -67,7 +67,7 @@ abstract class AbstractAsmStandaloneBillingSmokeTest extends AbstractServerSmoke
}

protected hasAppsecPropagationTag(DecodedTrace trace) {
return trace.spans[0].meta['_dd.p.appsec'] == "1"
return trace.spans[0].meta['_dd.p.ts'] == "02"
}

protected hasApmDisabledTag(DecodedTrace trace) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
package datadog.smoketest.asmstandalonebilling
package datadog.smoketest.apmtracingdisabled

import datadog.trace.api.sampling.PrioritySampling
import okhttp3.Request

class AsmStandaloneBillingMatrixSmokeTest extends AbstractAsmStandaloneBillingSmokeTest {
class ApmTracingDisabledMatrixSmokeTest extends AbstractApmTracingDisabledSmokeTest {

static final String STANDALONE_BILLING_SERVICE_NAME = "asm-standalone-billing-matrix-smoketest-app"
static final String STANDALONE_BILLING_SERVICE_NAME_2 = "asm-standalone-billing-matrix-smoketest-app2"
static final String APM_TRACING_DISABLED_SERVICE_NAME = "apm-tracing-disabled-matrix-smoketest-app"
static final String APM_TRACING_DISABLED_SERVICE_NAME_2 = "apm-tracing-disabled-matrix-smoketest-app2"
static final String APM_ENABLED_SERVICE_NAME = "apm-enabled-matrix-smoketest-app"
static final String ASM_ENABLED_SERVICE_NAME = "asm-enabled-matrix-smoketest-app"

static final String[] STANDALONE_BILLING_PROPERTIES = [
"-Ddd.experimental.appsec.standalone.enabled=true",
static final String[] APM_TRACING_DISABLED_PROPERTIES = [
"-Ddd.apm.tracing.enabled=false",
"-Ddd.iast.enabled=true",
"-Ddd.iast.detection.mode=FULL",
"-Ddd.iast.debug.enabled=true",
"-Ddd.trace.tracer.metrics.enabled=true",
"-Ddd.service.name=${STANDALONE_BILLING_SERVICE_NAME}",
"-Ddd.service.name=${APM_TRACING_DISABLED_SERVICE_NAME}",
]

static final String[] STANDALONE_BILLING_PROPERTIES_2 = [
"-Ddd.experimental.appsec.standalone.enabled=true",
static final String[] APM_TRACING_DISABLED_PROPERTIES_2 = [
"-Ddd.apm.tracing.enabled=false",
"-Ddd.iast.enabled=true",
"-Ddd.iast.detection.mode=FULL",
"-Ddd.iast.debug.enabled=true",
"-Ddd.trace.tracer.metrics.enabled=true",
"-Ddd.service.name=${STANDALONE_BILLING_SERVICE_NAME_2}",
"-Ddd.service.name=${APM_TRACING_DISABLED_SERVICE_NAME_2}",
]

static final String[] APM_ENABLED_PROPERTIES = ["-Ddd.service.name=${APM_ENABLED_SERVICE_NAME}", "-Ddd.trace.tracer.metrics.enabled=true",]
Expand All @@ -46,13 +46,13 @@ class AsmStandaloneBillingMatrixSmokeTest extends AbstractAsmStandaloneBillingSm
ProcessBuilder createProcessBuilder(int processIndex) {
switch (processIndex) {
case 0:
return createProcess(processIndex, STANDALONE_BILLING_PROPERTIES)
return createProcess(processIndex, APM_TRACING_DISABLED_PROPERTIES)
case 1:
return createProcess(processIndex, APM_ENABLED_PROPERTIES)
case 2:
return createProcess(processIndex, ASM_ENABLED_PROPERTIES)
case 3:
return createProcess(processIndex, STANDALONE_BILLING_PROPERTIES_2)
return createProcess(processIndex, APM_TRACING_DISABLED_PROPERTIES_2)
default:
throw new IllegalArgumentException("Invalid process index: ${processIndex}")
}
Expand Down Expand Up @@ -82,7 +82,7 @@ class AsmStandaloneBillingMatrixSmokeTest extends AbstractAsmStandaloneBillingSm
!hasApmDisabledTag (upstreamTrace)

and:"No ASM events, resulting in the local sampling decision"
def standAloneBillingTrace = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME)
def standAloneBillingTrace = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME)
isSampledBySampler(standAloneBillingTrace)
!hasAppsecPropagationTag (standAloneBillingTrace)
hasApmDisabledTag (standAloneBillingTrace)
Expand Down Expand Up @@ -118,7 +118,7 @@ class AsmStandaloneBillingMatrixSmokeTest extends AbstractAsmStandaloneBillingSm
!hasApmDisabledTag (upstreamTrace)

and:"ASM events"
def standAloneBillingTrace = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME)
def standAloneBillingTrace = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME)
checkRootSpanPrioritySampling(standAloneBillingTrace, PrioritySampling.USER_KEEP)
hasAppsecPropagationTag (standAloneBillingTrace)
hasApmDisabledTag (standAloneBillingTrace)
Expand Down Expand Up @@ -154,7 +154,7 @@ class AsmStandaloneBillingMatrixSmokeTest extends AbstractAsmStandaloneBillingSm
!hasApmDisabledTag (upstreamTrace)

and:"No ASM events, resulting in the local sampling decision"
def standAloneBillingTrace = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME)
def standAloneBillingTrace = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME)
isSampledBySampler(standAloneBillingTrace)
!hasAppsecPropagationTag (standAloneBillingTrace)
hasApmDisabledTag (standAloneBillingTrace)
Expand Down Expand Up @@ -184,13 +184,13 @@ class AsmStandaloneBillingMatrixSmokeTest extends AbstractAsmStandaloneBillingSm
waitForTraceCount(3)

and: "Upstream standalone ASM service having ASM events result in force keep and propagation of the tag"
def upstreamTrace = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME_2)
def upstreamTrace = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME_2)
checkRootSpanPrioritySampling(upstreamTrace, PrioritySampling.USER_KEEP)
hasAppsecPropagationTag (upstreamTrace)
hasApmDisabledTag (upstreamTrace)

and:"standalone service must keep the local trace with the local sampling priority"
def standAloneBillingTrace = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME)
def standAloneBillingTrace = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME)
checkRootSpanPrioritySampling(standAloneBillingTrace, PrioritySampling.USER_KEEP)
hasAppsecPropagationTag (standAloneBillingTrace)
hasApmDisabledTag (standAloneBillingTrace)
Expand Down Expand Up @@ -224,11 +224,11 @@ class AsmStandaloneBillingMatrixSmokeTest extends AbstractAsmStandaloneBillingSm
def upstreamTraceId = getServiceTrace(APM_ENABLED_SERVICE_NAME).spans[0].traceId

and: 'No ASM events, resulting in the local sampling decision'
def standAloneBillingTrace = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME)
def standAloneBillingTrace = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME)
isSampledBySampler(standAloneBillingTrace)
!hasAppsecPropagationTag (standAloneBillingTrace)
hasApmDisabledTag (standAloneBillingTrace)
def standAloneBillingTraceId = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME).spans[0].traceId
def standAloneBillingTraceId = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME).spans[0].traceId
upstreamTraceId == standAloneBillingTraceId //There is propagation

and: 'Propagation is stopped'
Expand All @@ -255,18 +255,18 @@ class AsmStandaloneBillingMatrixSmokeTest extends AbstractAsmStandaloneBillingSm
waitForTraceCount(3)

and: 'Upstream ASM events'
def upstreamTrace = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME_2)
def upstreamTrace = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME_2)
checkRootSpanPrioritySampling(upstreamTrace, PrioritySampling.USER_KEEP)
hasAppsecPropagationTag (upstreamTrace)
hasApmDisabledTag (upstreamTrace)
def upstreamTraceId = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME_2).spans[0].traceId
def upstreamTraceId = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME_2).spans[0].traceId

and: 'No ASM events, resulting in the local sampling decision'
def standAloneBillingTrace = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME)
def standAloneBillingTrace = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME)
checkRootSpanPrioritySampling(standAloneBillingTrace, PrioritySampling.USER_KEEP)
hasAppsecPropagationTag (standAloneBillingTrace)
hasApmDisabledTag (standAloneBillingTrace)
def standAloneBillingTraceId = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME).spans[0].traceId
def standAloneBillingTraceId = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME).spans[0].traceId
upstreamTraceId == standAloneBillingTraceId //There is propagation

and: 'Default APM distributed tracing behavior with'
Expand Down Expand Up @@ -300,11 +300,11 @@ class AsmStandaloneBillingMatrixSmokeTest extends AbstractAsmStandaloneBillingSm
def upstreamTraceId = getServiceTrace(APM_ENABLED_SERVICE_NAME).spans[0].traceId

and: 'ASM events, resulting in force keep and appsec propagation'
def standAloneBillingTrace = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME)
def standAloneBillingTrace = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME)
checkRootSpanPrioritySampling(standAloneBillingTrace, PrioritySampling.USER_KEEP)
hasAppsecPropagationTag (standAloneBillingTrace)
hasApmDisabledTag (standAloneBillingTrace)
def standAloneBillingTraceId = getServiceTrace(STANDALONE_BILLING_SERVICE_NAME).spans[0].traceId
def standAloneBillingTraceId = getServiceTrace(APM_TRACING_DISABLED_SERVICE_NAME).spans[0].traceId
upstreamTraceId == standAloneBillingTraceId //There is propagation

and: 'Default APM distributed tracing behavior with'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package datadog.smoketest.asmstandalonebilling
package datadog.smoketest.apmtracingdisabled

import datadog.trace.api.sampling.PrioritySampling
import datadog.trace.test.util.Flaky
import groovy.json.JsonSlurper
import okhttp3.Request

@Flaky
class AsmStandaloneBillingSamplingSmokeTest extends AbstractAsmStandaloneBillingSmokeTest {
class ApmTracingDisabledSamplingSmokeTest extends AbstractApmTracingDisabledSmokeTest {

@Override
ProcessBuilder createProcessBuilder(){
final String[] processProperties = [
"-Ddd.experimental.appsec.standalone.enabled=true",
"-Ddd.apm.tracing.enabled=false",
"-Ddd.iast.enabled=true",
"-Ddd.appsec.enabled=true",
"-Ddd.iast.detection.mode=FULL",
"-Ddd.iast.debug.enabled=true",
"-Ddd.service.name=asm-standalone-billing-sampling-spring-smoketest-app",
"-Ddd.service.name=apm-tracing-disabled-sampling-spring-smoketest-app",
]
return createProcess(processProperties)
}
Expand Down
Loading
Loading