@@ -28,6 +28,7 @@ class Collector;
2828class Logger ;
2929class SpanSampler ;
3030class TraceSampler ;
31+ class ErasedTraceSampler ;
3132
3233struct TracerConfig {
3334 // Set the service name.
@@ -80,6 +81,16 @@ struct TracerConfig {
8081 // `telemetry/configuration.h` By default, the telemetry module is enabled.
8182 telemetry::Configuration telemetry;
8283
84+ // `apm_tracing_enabled` indicates whether APM traces and APM trace metrics
85+ // are enabled. If `false`, APM-specific traces are dropped and APM trace
86+ // metrics are not computed. This allows other products (e.g., AppSec) to
87+ // operate independently.
88+ // This is distinct from `report_traces`, which controls whether any traces
89+ // are sent at all.
90+ // `apm_tracing_enabled` is overridden by the `DD_APM_TRACING_ENABLED`
91+ // environment variable. Defaults to `true`.
92+ Optional<bool > apm_tracing_enabled;
93+
8394 // `trace_sampler` configures trace sampling. Trace sampling determines which
8495 // traces are sent to Datadog. See `trace_sampler_config.h`.
8596 TraceSamplerConfig trace_sampler;
@@ -197,6 +208,7 @@ class FinalizedTracerConfig final {
197208 std::shared_ptr<Logger> logger;
198209 bool log_on_startup;
199210 bool generate_128bit_trace_ids;
211+ bool apm_tracing_enabled;
200212 Optional<RuntimeID> runtime_id;
201213 Clock clock;
202214 std::string integration_name;
0 commit comments