Skip to content

Commit 64b64cb

Browse files
authored
chore(trace-exporter): disable data pipeline when SSI is enabled (#7386)
## Summary of changes ## Reason for change To avoid any surprises. ## Implementation details Just like other checks we conditionally disable trace exporter for certain platforms and situations, disable trace exporter when SSI in works. ## Test coverage ## Other details Fixes https://datadoghq.atlassian.net/browse/APMSP-2197 <!-- ⚠️ Note: Where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. MergeQueue is NOT enabled in this repository. If you have write access to the repo, the PR has 1-2 approvals (see above), and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #apm-dotnet channel in Slack. -->
1 parent 303c4f9 commit 64b64cb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tracer/src/Datadog.Trace/Configuration/TracerSettings.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,17 @@ internal TracerSettings(IConfigurationSource? source, IConfigurationTelemetry te
453453

454454
_telemetry.Record(ConfigurationKeys.TraceDataPipelineEnabled, false, ConfigurationOrigins.Calculated);
455455
}
456+
457+
// SSI already utilizes libdatadog. To prevent unexpected behavior,
458+
// we proactively disable the data pipeline when SSI is enabled. Theoretically, this should not cause any issues,
459+
// but as a precaution, we are taking a conservative approach during the initial rollout phase.
460+
if (!string.IsNullOrEmpty(EnvironmentHelpers.GetEnvironmentVariable("DD_INJECTION_ENABLED")))
461+
{
462+
DataPipelineEnabled = false;
463+
Log.Warning(
464+
$"{ConfigurationKeys.TraceDataPipelineEnabled} is enabled, but SSI is enabled. Disabling data pipeline.");
465+
_telemetry.Record(ConfigurationKeys.TraceDataPipelineEnabled, false, ConfigurationOrigins.Calculated);
466+
}
456467
}
457468

458469
// We should also be writing telemetry for OTEL_LOGS_EXPORTER similar to OTEL_METRICS_EXPORTER, but we don't have a corresponding Datadog config

0 commit comments

Comments
 (0)