diff --git a/packages/dd-trace/src/config.js b/packages/dd-trace/src/config.js index e4425a79c47..f4454a9e670 100644 --- a/packages/dd-trace/src/config.js +++ b/packages/dd-trace/src/config.js @@ -703,7 +703,7 @@ class Config { this._envUnprocessed['appsec.wafTimeout'] = DD_APPSEC_WAF_TIMEOUT this._setBoolean(env, 'clientIpEnabled', DD_TRACE_CLIENT_IP_ENABLED) this._setString(env, 'clientIpHeader', DD_TRACE_CLIENT_IP_HEADER) - this._setBoolean(env, 'crashtracking.enabled', coalesce(DD_CRASHTRACKING_ENABLED, !!DD_INJECTION_ENABLED)) + this._setBoolean(env, 'crashtracking.enabled', DD_CRASHTRACKING_ENABLED) this._setString(env, 'dbmPropagationMode', DD_DBM_PROPAGATION_MODE) this._setString(env, 'dogstatsd.hostname', DD_DOGSTATSD_HOSTNAME) this._setString(env, 'dogstatsd.port', DD_DOGSTATSD_PORT) @@ -1081,6 +1081,9 @@ class Config { if (iastEnabled || ['auto', 'true'].includes(profilingEnabled) || injectionIncludesProfiler) { this._setBoolean(calc, 'telemetry.logCollection', true) } + if (this._env.injectionEnabled?.length > 0) { + this._setBoolean(calc, 'crashtracking.enabled', true) + } } _applyRemote (options) {