Exclude OTLP header and Datadog key configs from telemetry#3961
Conversation
|
Benchmarks [ tracer ]Benchmark execution time: 2026-06-12 19:40:59 Comparing candidate commit b5e01e5 in PR branch Found 3 performance improvements and 7 performance regressions! Performance is the same for 184 metrics, 0 unstable metrics.
|
2f0534f to
b468a83
Compare
Add a `sensitive` flag to the configuration definition (zai_config_entry and its memoized entry) so a DD_* configuration can be marked in its CONFIG(...) declaration in ext/configuration.h. The configuration-telemetry enqueue loop over the DD_* config table skips entries whose flag is set; DD_API_KEY and DD_TRACE_ENABLED carry it. Remove the OTLP header configurations (OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_METRICS_HEADERS, OTEL_EXPORTER_OTLP_LOGS_HEADERS) from the OpenTelemetry SDK configuration whitelist so they are not tracked for telemetry. Derive the "sensitive": true markers in metadata/supported-configurations.json from the flag in ext/configuration.h, plus the OTLP header variants the generator lists. Add a .phpt test and extend the loader functional test to assert these configuration values do not appear in the enqueued configuration telemetry while non-sensitive configurations remain reported. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
b468a83 to
b5e01e5
Compare
Benchmarks [ profiler ]Benchmark execution time: 2026-06-12 18:37:47 Comparing candidate commit b5e01e5 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 28 metrics, 8 unstable metrics.
|
| #endif | ||
| if (cfg->names[0].len != sizeof("DD_TRACE_ENABLED") - 1 | ||
| || memcmp(cfg->names[0].ptr, "DD_TRACE_ENABLED", sizeof("DD_TRACE_ENABLED") - 1) != 0) { // DD_TRACE_ENABLED is meaningless: always off at rshutdown | ||
| if (!cfg->sensitive) { |
There was a problem hiding this comment.
While DD_TRACE_ENABLED isn't sensitive, it can be handled in the same way
Description
Excludes the OTLP exporter header configurations (
OTEL_EXPORTER_OTLP_HEADERS,OTEL_EXPORTER_OTLP_METRICS_HEADERS,OTEL_EXPORTER_OTLP_LOGS_HEADERS) andDD_API_KEYfrom configuration telemetry, via asensitiveflag on the configuration entry. The flag is set inext/configuration.hand surfaced assensitive: trueinmetadata/supported-configurations.jsonby the generator. Tests added undertests/ext/telemetry/.Reviewer checklist