Skip to content

Commit 91e220c

Browse files
committed
Create activation origin config for telemetry
Signed-off-by: sezen.leblay <[email protected]>
1 parent 46d0949 commit 91e220c

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

dd-smoke-tests/dynamic-config/src/test/groovy/datadog/smoketest/DynamicServiceMappingSmokeTest.groovy

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class DynamicServiceMappingSmokeTest extends AbstractSmokeTest {
2323
processBuilder.directory(new File(buildDirectory))
2424
}
2525

26-
def "Updated service mapping observed"() {
26+
def "Remote config changes are sent via telemetry with correct origin"() {
2727
when:
2828
def newConfig = """
2929
{
@@ -41,5 +41,21 @@ class DynamicServiceMappingSmokeTest extends AbstractSmokeTest {
4141
then:
4242
assert testedProcess.waitFor(TIMEOUT_SECS, SECONDS)
4343
assert testedProcess.exitValue() == 0
44+
45+
// Verify that remote config was sent via telemetry
46+
def telemetry = waitForTelemetryFlat { it.request_type == "app-client-configuration-change" }
47+
assert telemetry != null
48+
49+
// Verify that the configuration contains remote config origin
50+
def configurations = telemetry.payload.configuration
51+
assert configurations != null
52+
assert configurations.any { it.origin == "remote_config" }
53+
54+
// Verify that the service mapping config is present with remote origin
55+
def serviceMappingConfig = configurations.find {
56+
it.name == "tracing_service_mapping" && it.origin == "remote_config"
57+
}
58+
assert serviceMappingConfig != null
59+
assert serviceMappingConfig.value != null
4460
}
4561
}

0 commit comments

Comments
 (0)