Exclude OTLP header and Datadog key configs from telemetry - #3961
Exclude OTLP header and Datadog key configs from telemetry#3961bm1549 wants to merge 10 commits into
Conversation
|
Benchmarks [ tracer ]Benchmark execution time: 2026-08-01 01:32:27 Comparing candidate commit ea536a1 in PR branch Found 3 performance improvements and 3 performance regressions! Performance is the same for 187 metrics, 1 unstable metrics.
|
b468a83 to
b5e01e5
Compare
Benchmarks [ profiler ]Benchmark execution time: 2026-08-01 00:29:23 Comparing candidate commit ea536a1 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
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>
16486c5 to
ea536a1
Compare
Description
Stops configuration telemetry from reporting
DD_API_KEYor OTLP exporter header values.DD_API_KEYnow uses a sensitivity flag carried through ZAI config metadata. The OTLP header configs remain in supported-config metadata withsensitive: true, but are rejected at the PHP whitelist and native ingestion boundaries.DD_TRACE_ENABLEDremains omitted separately because its shutdown-time value is not meaningful.The metadata generator now reads sensitivity from all config headers and uses comment/string-aware parsing. Its CI self-test covers parser edge cases. Runtime coverage checks the native bypass path and a future OTLP traces header variant, with safe configs as positive controls.
Reviewer checklist