Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tracer/build/_build/SmokeTests/SmokeTestScenario.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public abstract record SmokeTestScenario
protected const string DefaultSnapshotIgnoredAttrs =
"span_id" + ",trace_id" + ",parent_id" + ",duration" + ",start" + ",metrics.system.pid" + ",meta.runtime-id" + ","
+ "meta.network.client.ip" + ",meta.http.client_ip" + ",metrics.process_id" + ",meta._dd.p.dm" + ","
+ "meta._dd.p.tid" + ",meta._dd.parent_id" + ",meta._dd.tags.process" + ",meta._dd.appsec.s.req.params" + ","
+ "meta._dd.p.tid" + ",meta._dd.parent_id" + ",meta._dd.appsec.s.req.params" + ","
+ "meta._dd.appsec.s.res.body" + ",meta._dd.appsec.s.req.headers" + ","
+ "meta._dd.appsec.s.res.headers" + ",meta._dd.appsec.fp.http.endpoint" + ","
+ "meta._dd.appsec.fp.http.header" + ",meta._dd.appsec.fp.http.network";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"runtime-id": "05dff020-c9cc-4b50-9395-e1fe88603312",
"language": "dotnet",
"_dd.runtime_family": "dotnet",
"_dd.tags.process": "entrypoint.basedir:VALUE,entrypoint.name:VALUE,entrypoint.workdir:VALUE,svc.auto:VALUE",
"_dd.appsec.event_rules.version": "1.15.0",
"_dd.appsec.fp.http.endpoint": "http-get-7460da9d--",
"_dd.appsec.fp.http.header": "hdr-0000000000--3-98425651",
Expand Down Expand Up @@ -63,7 +62,6 @@
"_dd.p.tid": "67a4e73b00000000",
"runtime-id": "05dff020-c9cc-4b50-9395-e1fe88603312",
"language": "dotnet",
"_dd.tags.process": "entrypoint.basedir:VALUE,entrypoint.name:VALUE,entrypoint.workdir:VALUE,svc.auto:VALUE",
"_dd.base_service": "AspNetCoreSmokeTest",
"_dd.svc_src": "http-client"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"out.host": "localhost",
"runtime-id": "11c61d09-16bb-477f-87ab-4f81d656c5ca",
"span.kind": "client",
"_dd.tags.process": "entrypoint.basedir:VALUE,entrypoint.name:VALUE,entrypoint.workdir:VALUE,svc.auto:VALUE",
"_dd.base_service": "AspNetCoreSmokeTest",
"_dd.svc_src": "http-client"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"out.host": "localhost",
"runtime-id": "b34b2bed-9444-4597-87f6-b8202b03b1b8",
"span.kind": "client",
"_dd.tags.process": "entrypoint.basedir:VALUE,entrypoint.name:VALUE,entrypoint.workdir:VALUE,svc.auto:VALUE",
"_dd.base_service": "AspNetCoreSmokeTest",
"_dd.svc_src": "http-client"
},
Expand Down
4 changes: 2 additions & 2 deletions tracer/src/Datadog.Trace/Configuration/TracerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace Datadog.Trace.Configuration
public partial record TracerSettings
{
private static readonly IDatadogLogger Log = DatadogLogging.GetLoggerFor<TracerSettings>();
private static readonly HashSet<string> DefaultExperimentalFeatures = ["DD_TAGS"];
private static readonly HashSet<string> DefaultExperimentalFeatures = ["DD_TAGS", ConfigurationKeys.PropagateProcessTags];

private readonly Lazy<string> _fallbackApplicationName;

Expand Down Expand Up @@ -88,7 +88,7 @@ internal TracerSettings(IConfigurationSource? source, IConfigurationTelemetry te

PropagateProcessTags = config
.WithKeys(ConfigurationKeys.PropagateProcessTags)
.AsBool(true);
.AsBool(ExperimentalFeaturesEnabled.Contains(ConfigurationKeys.PropagateProcessTags)); // read it as "defaults to false"

GCPFunctionSettings = new ImmutableGCPFunctionSettings(source, telemetry);
IsRunningInGCPFunctions = GCPFunctionSettings.IsGCPFunction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -775,12 +775,12 @@ supportedConfigurations:
const_name: UseUnsafeEncoder
documentation: Use new unsafe encoder for the waf
DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED:
- implementation: B
- implementation: A
type: boolean
default: 'true'
default: 'false'
const_name: PropagateProcessTags
documentation: |-
Enables propagation of process-level tags across traces. Type: `boolean`. Default: `true`
Enables propagation of process-level tags across traces. Type: `boolean`. Default: `false`
DD_GIT_BRANCH:
- implementation: A
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ internal static partial class ConfigurationKeys
public const string Environment = "DD_ENV";

/// <summary>
/// Enables propagation of process-level tags across traces. Type: `boolean`. Default: `true`
/// Enables propagation of process-level tags across traces. Type: `boolean`. Default: `false`
/// </summary>
public const string PropagateProcessTags = "DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ internal static partial class ConfigurationKeys
public const string Environment = "DD_ENV";

/// <summary>
/// Enables propagation of process-level tags across traces. Type: `boolean`. Default: `true`
/// Enables propagation of process-level tags across traces. Type: `boolean`. Default: `false`
/// </summary>
public const string PropagateProcessTags = "DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ internal static partial class ConfigurationKeys
public const string Environment = "DD_ENV";

/// <summary>
/// Enables propagation of process-level tags across traces. Type: `boolean`. Default: `true`
/// Enables propagation of process-level tags across traces. Type: `boolean`. Default: `false`
/// </summary>
public const string PropagateProcessTags = "DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ internal static partial class ConfigurationKeys
public const string Environment = "DD_ENV";

/// <summary>
/// Enables propagation of process-level tags across traces. Type: `boolean`. Default: `true`
/// Enables propagation of process-level tags across traces. Type: `boolean`. Default: `false`
/// </summary>
public const string PropagateProcessTags = "DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public static IEnumerable<object[]> GetEnabledConfig()
public async Task SubmitsDsmMetrics(string packageVersion, string metadataSchemaVersion)
{
SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.Enabled, "1");
SetEnvironmentVariable(ConfigurationKeys.PropagateProcessTags, "0");
SetEnvironmentVariable("DD_TRACE_SPAN_ATTRIBUTE_SCHEMA", metadataSchemaVersion);
var isExternalSpan = metadataSchemaVersion == "v0";
var clientSpanServiceName = isExternalSpan ? $"{EnvironmentHelper.FullSampleName}-aws-kinesis" : EnvironmentHelper.FullSampleName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public static IEnumerable<object[]> GetEnabledConfig()
public async Task SubmitsDsmMetrics(string packageVersion)
{
SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.Enabled, "1");
SetEnvironmentVariable(ConfigurationKeys.PropagateProcessTags, "0");

using var telemetry = this.ConfigureTelemetry();
using var agent = EnvironmentHelper.GetMockAgent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public static IEnumerable<object[]> GetEnabledConfig()
public async Task SubmitsDsmMetrics(string packageVersion, int batch, int sameThread, int inject)
{
SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.Enabled, "1");
SetEnvironmentVariable(ConfigurationKeys.PropagateProcessTags, "0");

// set scenario to run
SetEnvironmentVariable("TEST_BATCH", batch.ToString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ public async Task SubmitTraces(string packageVersion)
targetSpan.Tags.Remove(Tags.GitCommitSha);
targetSpan.Tags.Remove(Tags.GitRepositoryUrl);

// Remove process tags that get added to the first span of a payload
targetSpan.Tags.Remove(Tags.ProcessTags);

// Remove EFD tags
targetSpan.Tags.Remove(TestTags.TestIsNew);
targetSpan.Tags.Remove(TestTags.TestIsRetry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ public async Task SubmitTraces(string packageVersion)
targetSpan.Tags.Remove(Tags.GitCommitSha);
targetSpan.Tags.Remove(Tags.GitRepositoryUrl);

// Remove process tags that get added to the first span of a payload
targetSpan.Tags.Remove(Tags.ProcessTags);

// Remove EFD tags
targetSpan.Tags.Remove(TestTags.TestIsNew);
targetSpan.Tags.Remove(TestTags.TestIsRetry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ public virtual async Task SubmitTraces(string packageVersion)
targetSpan.Tags.Remove(Tags.GitCommitSha);
targetSpan.Tags.Remove(Tags.GitRepositoryUrl);

// Remove process tags that get added to the first span of a payload
targetSpan.Tags.Remove(Tags.ProcessTags);

// Remove EFD tags
targetSpan.Tags.Remove(TestTags.TestIsNew);
targetSpan.Tags.Remove(TestTags.TestIsRetry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public async Task SubmitsDataStreams(bool enableConsumerScopeCreation, bool enab
var topicSuffix = $"{nameof(SubmitsDataStreams)}-{(enableConsumerScopeCreation ? "1" : "0")}-{(enableLegacyHeaders ? "1" : "0")}";

SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.Enabled, "1");
SetEnvironmentVariable(ConfigurationKeys.PropagateProcessTags, "0");
SetEnvironmentVariable(ConfigurationKeys.KafkaCreateConsumerScopeEnabled, enableConsumerScopeCreation ? "1" : "0");
SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.LegacyHeadersEnabled, enableLegacyHeaders ? "1" : "0");

Expand Down Expand Up @@ -115,7 +114,6 @@ public async Task HandlesBatchProcessing()
var topicSuffix = $"{nameof(HandlesBatchProcessing)}";

SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.Enabled, "1");
SetEnvironmentVariable(ConfigurationKeys.PropagateProcessTags, "0");
// set variable to create short spans on receive instead of spans that last until the next consume
SetEnvironmentVariable(ConfigurationKeys.KafkaCreateConsumerScopeEnabled, "0");
SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.LegacyHeadersEnabled, "1");
Expand Down Expand Up @@ -163,7 +161,6 @@ public async Task WhenNotSupported_DoesNotSubmitDataStreams()
var topicSuffix = "WhenNotSupported";

SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.Enabled, "1");
SetEnvironmentVariable(ConfigurationKeys.PropagateProcessTags, "0");

using var agent = EnvironmentHelper.GetMockAgent();
agent.Configuration = new MockTracerAgent.AgentConfiguration { Endpoints = Array.Empty<string>() };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public DataStreamsMonitoringManualApiTest(ITestOutputHelper output)
public async Task ContextPropagation()
{
SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.Enabled, "1");
SetEnvironmentVariable(ConfigurationKeys.PropagateProcessTags, "0");

using var agent = EnvironmentHelper.GetMockAgent();
using var processResult = await RunSampleAndWaitForExit(agent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public DataStreamsMonitoringRabbitMQTests(ITestOutputHelper output)
public async Task HandleProduceAndConsume(string packageVersion)
{
SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.Enabled, "1");
SetEnvironmentVariable(ConfigurationKeys.PropagateProcessTags, "0");
SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.LegacyHeadersEnabled, "1");

using var assertionScope = new AssertionScope();
Expand All @@ -61,7 +60,6 @@ await Verifier.Verify(PayloadsToPoints(agent.DataStreams), settings)
public async Task ValidateSpanTags(string packageVersion)
{
SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.Enabled, "1");
SetEnvironmentVariable(ConfigurationKeys.PropagateProcessTags, "0");
SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.LegacyHeadersEnabled, "1");

using var assertionScope = new AssertionScope();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,10 @@ public static VerifySettings AddSimpleScrubber(this VerifySettings settings, str
// remove propagated tags because their positions in the snapshots are not stable
// with our span ordering. correct position (first span in every trace chunk) is covered by other tests.
?.Where(kvp => !kvp.Key.StartsWith(TagPropagation.PropagatedTagPrefix, StringComparison.Ordinal))
.Where(kvp =>
// We must ignore both `_dd.git.repository_url` and `_dd.git.commit.sha` because we are only setting it on the first span of a trace
// no matter what. That means we have unstable snapshot results.
kvp.Key != Tags.GitRepositoryUrl
&& kvp.Key != Tags.GitCommitSha
// Also ignoring `_dd.parent_id` since we test specific headers combinations which check for the value, hence why not adding it to the snapshots
&& kvp.Key != Tags.LastParentId
// same as git related tags above, process tags are only added to the first span of each payload, which makes snapshots unstable.
&& kvp.Key != Tags.ProcessTags)
// We must ignore both `_dd.git.repository_url` and `_dd.git.commit.sha` because we are only setting it on the first span of a trace
// no matter what. That means we have unstable snapshot results.
// Also ignoring `_dd.parent_id` since we test specific headers combinations which check for the value, hence why not adding it to the snapshots
.Where(kvp => kvp.Key != Tags.GitRepositoryUrl && kvp.Key != Tags.GitCommitSha && kvp.Key != Tags.LastParentId)
.Select(
kvp => kvp.Key switch
{
Expand Down Expand Up @@ -243,15 +238,10 @@ public static VerifySettings AddSimpleScrubber(this VerifySettings settings, str
// remove propagated tags because their positions in the snapshots are not stable
// with our span ordering. correct position (first span in every trace chunk) is covered by other tests.
?.Where(kvp => !kvp.Key.StartsWith(TagPropagation.PropagatedTagPrefix, StringComparison.Ordinal))
.Where(kvp =>
// We must ignore both `_dd.git.repository_url` and `_dd.git.commit.sha` because we are only setting it on the first span of a trace
// no matter what. That means we have unstable snapshot results.
kvp.Key != Tags.GitRepositoryUrl
&& kvp.Key != Tags.GitCommitSha
// Also ignoring `_dd.parent_id` since we test specific headers combinations which check for the value, hence why not adding it to the snapshots
&& kvp.Key != Tags.LastParentId
// same as git related tags above, process tags are only added to the first span of each payload, which makes snapshots unstable.
&& kvp.Key != Tags.ProcessTags)
// We must ignore both `_dd.git.repository_url` and `_dd.git.commit.sha` because we are only setting it on the first span of a trace
// no matter what. That means we have unstable snapshot results.
// Also ignoring `_dd.parent_id` since we test specific headers combinations which check for the value, hence why not adding it to the snapshots
.Where(kvp => kvp.Key != Tags.GitRepositoryUrl && kvp.Key != Tags.GitCommitSha && kvp.Key != Tags.LastParentId)
.Select(
kvp => kvp.Key switch
{
Expand Down
Loading
Loading