Skip to content

Commit b44416f

Browse files
authored
Fixes and tests for telemetry (#4265)
* Add integration tests for telemetry metrics * Allow enabling metrics in CI * Try to reduce some flake * Fix config key used in tracer settings * Ensure we record profiler configuration in config * Add configuration key for enabling debug mode * Allow setting the debug flag on telemetry payloads
1 parent afc8cc0 commit b44416f

File tree

28 files changed

+263
-51
lines changed

28 files changed

+263
-51
lines changed

.azure-pipelines/steps/run-in-docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ steps:
7878
--env DD_LOGGER_SYSTEM_PULLREQUEST_SOURCEBRANCH \
7979
--env DD_LOGGER_DD_TAGS \
8080
--env DD_INTERNAL_TELEMETRY_V2_ENABLED \
81+
--env DD_TELEMETRY_METRICS_ENABLED \
8182
${{ parameters.extraArgs }} \
8283
dd-trace-dotnet/${{ parameters.baseImage }}-${{ parameters.target }} \
8384
dotnet /build/bin/Debug/_build.dll ${{ parameters.command }}

.azure-pipelines/ultimate-pipeline.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ variables:
117117
# Run code coverage on main branches only, on scheduled build only
118118
runCodeCoverage: $[or(eq(variables['run_code_coverage'], 'true'), and(eq(variables['Build.Reason'], 'Schedule'), or(in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/'))))]
119119
DD_INTERNAL_TELEMETRY_V2_ENABLED: $[eq(variables['enable_telemetry_v2'], 'true')]
120+
DD_TELEMETRY_METRICS_ENABLED: $[eq(variables['enable_metrics'], 'true')]
120121
DD_DOTNET_TRACER_MSBUILD:
121122
NugetPackageDirectory: $(System.DefaultWorkingDirectory)/packages
122123
relativeNugetPackageDirectory: packages

docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ services:
366366
- DD_LOGGER_SYSTEM_PULLREQUEST_SOURCEBRANCH
367367
- DD_LOGGER_DD_TAGS
368368
- DD_INTERNAL_TELEMETRY_V2_ENABLED
369+
- DD_TELEMETRY_METRICS_ENABLED
369370

370371
ProfilerIntegrationTests:
371372
build:
@@ -413,6 +414,7 @@ services:
413414
- DD_LOGGER_SYSTEM_PULLREQUEST_SOURCEBRANCH
414415
- DD_LOGGER_DD_TAGS
415416
- DD_INTERNAL_TELEMETRY_V2_ENABLED
417+
- DD_TELEMETRY_METRICS_ENABLED
416418
hostname: integrationtests
417419

418420
IntegrationTests:
@@ -487,6 +489,7 @@ services:
487489
- DD_LOGGER_SYSTEM_PULLREQUEST_SOURCEBRANCH
488490
- DD_LOGGER_DD_TAGS
489491
- DD_INTERNAL_TELEMETRY_V2_ENABLED
492+
- DD_TELEMETRY_METRICS_ENABLED
490493
hostname: integrationtests
491494
depends_on:
492495
- aerospike
@@ -557,6 +560,7 @@ services:
557560
- DD_LOGGER_SYSTEM_PULLREQUEST_SOURCEBRANCH
558561
- DD_LOGGER_DD_TAGS
559562
- DD_INTERNAL_TELEMETRY_V2_ENABLED
563+
- DD_TELEMETRY_METRICS_ENABLED
560564
hostname: integrationtests
561565

562566
IntegrationTests.Serverless:
@@ -611,6 +615,7 @@ services:
611615
- DD_LOGGER_SYSTEM_PULLREQUEST_SOURCEBRANCH
612616
- DD_LOGGER_DD_TAGS
613617
- DD_INTERNAL_TELEMETRY_V2_ENABLED
618+
- DD_TELEMETRY_METRICS_ENABLED
614619
hostname: integrationtests
615620

616621
ExplorationTests:
@@ -661,6 +666,7 @@ services:
661666
- DD_LOGGER_SYSTEM_PULLREQUEST_SOURCEBRANCH
662667
- DD_LOGGER_DD_TAGS
663668
- DD_INTERNAL_TELEMETRY_V2_ENABLED
669+
- DD_TELEMETRY_METRICS_ENABLED
664670

665671
StartDependencies:
666672
image: andrewlock/wait-for-dependencies
@@ -752,6 +758,7 @@ services:
752758
- DD_LOGGER_SYSTEM_PULLREQUEST_SOURCEBRANCH
753759
- DD_LOGGER_DD_TAGS
754760
- DD_INTERNAL_TELEMETRY_V2_ENABLED
761+
- DD_TELEMETRY_METRICS_ENABLED
755762
depends_on:
756763
- servicestackredis_arm64
757764
- stackexchangeredis_arm64
@@ -831,6 +838,7 @@ services:
831838
- DD_LOGGER_SYSTEM_PULLREQUEST_SOURCEBRANCH
832839
- DD_LOGGER_DD_TAGS
833840
- DD_INTERNAL_TELEMETRY_V2_ENABLED
841+
- DD_TELEMETRY_METRICS_ENABLED
834842

835843
start-test-agent:
836844
image: andrewlock/wait-for-dependencies

tracer/build/crank/Samples.AspNetCoreSimpleController.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ imports:
55
variables:
66
commit_hash: 0
77
telemetry_v2: 0
8+
enable_metrics: 0
89

910
jobs:
1011
server:

tracer/build/crank/Security.Samples.AspNetCoreSimpleController.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
variables:
66
commit_hash: 0
77
telemetry_v2: 0
8+
enable_metrics: 0
89

910
jobs:
1011
server:

tracer/build/crank/os.profiles.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ profiles:
2020
DD_TRACE_LOGGING_RATE: 6
2121
DD_TRACE_DEBUG: 0
2222
DD_INTERNAL_TELEMETRY_V2_ENABLED: "{{ telemetry_v2 }}"
23+
DD_TELEMETRY_METRICS_ENABLED: "{{ enable_metrics }}"
2324
options:
2425
requiredOperatingSystem: windows
2526
requiredArchitecture: x64
@@ -46,6 +47,7 @@ profiles:
4647
DD_TRACE_LOGGING_RATE: 6
4748
DD_TRACE_DEBUG: 0
4849
DD_INTERNAL_TELEMETRY_V2_ENABLED: "{{ telemetry_v2 }}"
50+
DD_TELEMETRY_METRICS_ENABLED: "{{ enable_metrics }}"
4951
options:
5052
requiredOperatingSystem: linux
5153
requiredArchitecture: x64
@@ -72,6 +74,7 @@ profiles:
7274
DD_TRACE_LOGGING_RATE: 6
7375
DD_TRACE_DEBUG: 0
7476
DD_INTERNAL_TELEMETRY_V2_ENABLED: "{{ telemetry_v2 }}"
77+
DD_TELEMETRY_METRICS_ENABLED: "{{ enable_metrics }}"
7578
DD_ENV: throughput-adhoc
7679
options:
7780
requiredOperatingSystem: linux
@@ -100,6 +103,7 @@ profiles:
100103
LD_PRELOAD: "{{ linuxProfilerPath }}/tracer-home-linux/linux-x64/Datadog.Linux.ApiWrapper.x64.so"
101104
DD_PROFILING_ENABLED: 1
102105
DD_INTERNAL_TELEMETRY_V2_ENABLED: "{{ telemetry_v2 }}"
106+
DD_TELEMETRY_METRICS_ENABLED: "{{ enable_metrics }}"
103107
options:
104108
requiredOperatingSystem: linux
105109
requiredArchitecture: x64
@@ -126,6 +130,7 @@ profiles:
126130
DD_TRACE_LOGGING_RATE: 6
127131
DD_TRACE_DEBUG: 0
128132
DD_INTERNAL_TELEMETRY_V2_ENABLED: "{{ telemetry_v2 }}"
133+
DD_TELEMETRY_METRICS_ENABLED: "{{ enable_metrics }}"
129134
options:
130135
requiredOperatingSystem: linux
131136
requiredArchitecture: arm64

0 commit comments

Comments
 (0)