Skip to content

Commit 8fa2a97

Browse files
committed
Mapping of each env var key with its variable name found in the ConfigurationKeys (to avoid refactoring all names according to source generated deducted variable names!)
1 parent 0a751b8 commit 8fa2a97

File tree

5 files changed

+585
-35
lines changed

5 files changed

+585
-35
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
// <copyright company="Datadog">
2+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
3+
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
4+
// </copyright>
5+
// <auto-generated/>
6+
7+
#nullable enable
8+
9+
// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml
10+
// Do not edit this file directly. The source generator will regenerate it on build.
11+
// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files.
12+
namespace Datadog.Trace.Configuration;
13+
14+
internal static partial class ConfigurationKeys
15+
{
16+
internal static class FeatureFlags
17+
{
18+
/// <summary>
19+
/// Enables support for collecting and exporting logs generated by the the OpenTelemetry Logs API.
20+
/// This feature is available starting with .NET 3.1 when using Microsoft.Extensions.Logging
21+
/// </summary>
22+
public const string OpenTelemetryLogsEnabled = "DD_LOGS_OTEL_ENABLED";
23+
24+
/// <summary>
25+
/// Enables experimental support for exporting OTLP metrics generated by the OpenTelemetry Metrics API.
26+
/// This feature is only available starting with .NET 6.0, as it relies on the BCL class MeterListener
27+
/// which is shipped in-box starting with .NET 6.
28+
/// </summary>
29+
public const string OpenTelemetryMetricsEnabled = "DD_METRICS_OTEL_ENABLED";
30+
31+
/// <summary>
32+
/// List of meters to add to the metrics exporter for the experimental OpenTelemetry Metrics API support.
33+
/// </summary>
34+
public const string OpenTelemetryMeterNames = "DD_METRICS_OTEL_METER_NAMES";
35+
36+
/// <summary>
37+
/// Enables generating 128-bit trace ids instead of 64-bit trace ids.
38+
/// Note that a 128-bit trace id may be received from an upstream service or from
39+
/// an Activity even if we are not generating them ourselves.
40+
/// Default value is <c>true</c> (enabled).
41+
/// </summary>
42+
public const string TraceId128BitGenerationEnabled = "DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED";
43+
44+
/// <summary>
45+
/// Enables injecting 128-bit trace ids into logs as a hexadecimal string.
46+
/// If disabled, 128-bit trace ids will be truncated to the lower 64 bits,
47+
/// and injected as decimal strings. 64-bit trace ids are
48+
/// always injected as decimal strings, regardless of this setting.
49+
/// If unset, this configuration will take the value of the <see cref="ConfigurationKeys.FeatureFlags.TraceId128BitGenerationEnabled"/> configuration,
50+
/// which is <c>true</c> by default.
51+
/// Note: This configuration can be set independently of the <see cref="ConfigurationKeys.FeatureFlags.TraceId128BitGenerationEnabled"/> configuration,
52+
/// so it's possible to inject 128-bit trace ids into logs even if the application is only generating 64-bit trace ids, since distributed traces from upstream
53+
/// services may contain 128-bit trace ids.
54+
/// </summary>
55+
public const string TraceId128BitLoggingEnabled = "DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED";
56+
57+
public const string BypassHttpRequestUrlCachingEnabled = "DD_TRACE_BYPASS_HTTP_REQUEST_URL_CACHING_ENABLED";
58+
59+
public const string CommandsCollectionEnabled = "DD_TRACE_COMMANDS_COLLECTION_ENABLED";
60+
61+
/// <summary>
62+
/// Configuration key to enable or disable the updated WCF instrumentation that delays execution
63+
/// until later in the WCF pipeline when the WCF server exception handling is established.
64+
/// </summary>
65+
/// <seealso cref="Datadog.Trace.Configuration.TracerSettings.DelayWcfInstrumentationEnabled"/>
66+
public const string DelayWcfInstrumentationEnabled = "DD_TRACE_DELAY_WCF_INSTRUMENTATION_ENABLED";
67+
68+
/// <summary>
69+
/// Enables a fix for header tags normalization.
70+
/// We used to normalize tag names even if they were specified in user configuration, but we should not.
71+
/// Default value is <c>true</c>.
72+
/// </summary>
73+
public const string HeaderTagsNormalizationFixEnabled = "DD_TRACE_HEADER_TAG_NORMALIZATION_FIX_ENABLED";
74+
75+
public const string InferredProxySpansEnabled = "DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED";
76+
77+
/// <summary>
78+
/// Configuration key to enable or disable the injection of the Datadog trace context into stored procedures.
79+
/// Default value is <c>false</c> (enabled).
80+
/// When enabled, Datadog trace context will be injected into individual stored procedure calls when the following requirements are met:
81+
/// <ul>
82+
/// <li>The database is Microsoft SQL Server and <see cref="TracerSettings.DbmPropagationMode"/> is set to
83+
/// <c>service</c> or
84+
/// <c>full</c>.</li>
85+
/// <li>The stored procedure call does not have <c>Output</c>, <c>InputOutput</c>, or <c>Return</c> ADO.NET command parameters.</li>
86+
/// </ul>
87+
/// </summary>
88+
public const string InjectContextIntoStoredProceduresEnabled = "DD_TRACE_INJECT_CONTEXT_INTO_STORED_PROCEDURES_ENABLED";
89+
90+
/// <summary>
91+
/// Enables beta support for instrumentation via the System.Diagnostics API and the OpenTelemetry SDK.
92+
/// </summary>
93+
public const string OpenTelemetryEnabled = "DD_TRACE_OTEL_ENABLED";
94+
95+
/// <summary>
96+
/// Feature Flag: enables updated resource names on `aspnet.request`, `aspnet-mvc.request`,
97+
/// `aspnet-webapi.request`, and `aspnet_core.request` spans. Enables `aspnet_core_mvc.request` spans and
98+
/// additional features on `aspnet_core.request` spans.
99+
/// </summary>
100+
/// <seealso cref="Datadog.Trace.Configuration.TracerSettings.RouteTemplateResourceNamesEnabled"/>
101+
public const string RouteTemplateResourceNamesEnabled = "DD_TRACE_ROUTE_TEMPLATE_RESOURCE_NAMES_ENABLED";
102+
103+
/// <summary>
104+
/// Feature flag to enable obfuscating the <c>LocalPath</c> of a WCF request that goes
105+
/// into the <c>resourceName</c> of a span.
106+
/// <para>Note: that this only applies when the WCF action is an empty string.</para>
107+
/// </summary>
108+
/// <seealso cref="Datadog.Trace.Configuration.TracerSettings.WcfObfuscationEnabled"/>
109+
public const string WcfObfuscationEnabled = "DD_TRACE_WCF_RESOURCE_OBFUSCATION_ENABLED";
110+
111+
/// <summary>
112+
/// Configuration key to enable or disable improved template-based resource names
113+
/// when using WCF Web HTTP. Requires <see cref="TracerSettings.DelayWcfInstrumentationEnabled"/> be set
114+
/// to true. Enabled by default
115+
/// </summary>
116+
/// <seealso cref="Datadog.Trace.Configuration.TracerSettings.WcfWebHttpResourceNamesEnabled"/>
117+
public const string WcfWebHttpResourceNamesEnabled = "DD_TRACE_WCF_WEB_HTTP_RESOURCE_NAMES_ENABLED";
118+
}
119+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
// <copyright company="Datadog">
2+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
3+
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
4+
// </copyright>
5+
// <auto-generated/>
6+
7+
#nullable enable
8+
9+
// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml
10+
// Do not edit this file directly. The source generator will regenerate it on build.
11+
// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files.
12+
namespace Datadog.Trace.Configuration;
13+
14+
internal static partial class ConfigurationKeys
15+
{
16+
internal static class FeatureFlags
17+
{
18+
/// <summary>
19+
/// Enables support for collecting and exporting logs generated by the the OpenTelemetry Logs API.
20+
/// This feature is available starting with .NET 3.1 when using Microsoft.Extensions.Logging
21+
/// </summary>
22+
public const string OpenTelemetryLogsEnabled = "DD_LOGS_OTEL_ENABLED";
23+
24+
/// <summary>
25+
/// Enables experimental support for exporting OTLP metrics generated by the OpenTelemetry Metrics API.
26+
/// This feature is only available starting with .NET 6.0, as it relies on the BCL class MeterListener
27+
/// which is shipped in-box starting with .NET 6.
28+
/// </summary>
29+
public const string OpenTelemetryMetricsEnabled = "DD_METRICS_OTEL_ENABLED";
30+
31+
/// <summary>
32+
/// List of meters to add to the metrics exporter for the experimental OpenTelemetry Metrics API support.
33+
/// </summary>
34+
public const string OpenTelemetryMeterNames = "DD_METRICS_OTEL_METER_NAMES";
35+
36+
/// <summary>
37+
/// Enables generating 128-bit trace ids instead of 64-bit trace ids.
38+
/// Note that a 128-bit trace id may be received from an upstream service or from
39+
/// an Activity even if we are not generating them ourselves.
40+
/// Default value is <c>true</c> (enabled).
41+
/// </summary>
42+
public const string TraceId128BitGenerationEnabled = "DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED";
43+
44+
/// <summary>
45+
/// Enables injecting 128-bit trace ids into logs as a hexadecimal string.
46+
/// If disabled, 128-bit trace ids will be truncated to the lower 64 bits,
47+
/// and injected as decimal strings. 64-bit trace ids are
48+
/// always injected as decimal strings, regardless of this setting.
49+
/// If unset, this configuration will take the value of the <see cref="ConfigurationKeys.FeatureFlags.TraceId128BitGenerationEnabled"/> configuration,
50+
/// which is <c>true</c> by default.
51+
/// Note: This configuration can be set independently of the <see cref="ConfigurationKeys.FeatureFlags.TraceId128BitGenerationEnabled"/> configuration,
52+
/// so it's possible to inject 128-bit trace ids into logs even if the application is only generating 64-bit trace ids, since distributed traces from upstream
53+
/// services may contain 128-bit trace ids.
54+
/// </summary>
55+
public const string TraceId128BitLoggingEnabled = "DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED";
56+
57+
public const string BypassHttpRequestUrlCachingEnabled = "DD_TRACE_BYPASS_HTTP_REQUEST_URL_CACHING_ENABLED";
58+
59+
public const string CommandsCollectionEnabled = "DD_TRACE_COMMANDS_COLLECTION_ENABLED";
60+
61+
/// <summary>
62+
/// Configuration key to enable or disable the updated WCF instrumentation that delays execution
63+
/// until later in the WCF pipeline when the WCF server exception handling is established.
64+
/// </summary>
65+
/// <seealso cref="Datadog.Trace.Configuration.TracerSettings.DelayWcfInstrumentationEnabled"/>
66+
public const string DelayWcfInstrumentationEnabled = "DD_TRACE_DELAY_WCF_INSTRUMENTATION_ENABLED";
67+
68+
/// <summary>
69+
/// Enables a fix for header tags normalization.
70+
/// We used to normalize tag names even if they were specified in user configuration, but we should not.
71+
/// Default value is <c>true</c>.
72+
/// </summary>
73+
public const string HeaderTagsNormalizationFixEnabled = "DD_TRACE_HEADER_TAG_NORMALIZATION_FIX_ENABLED";
74+
75+
public const string InferredProxySpansEnabled = "DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED";
76+
77+
/// <summary>
78+
/// Configuration key to enable or disable the injection of the Datadog trace context into stored procedures.
79+
/// Default value is <c>false</c> (enabled).
80+
/// When enabled, Datadog trace context will be injected into individual stored procedure calls when the following requirements are met:
81+
/// <ul>
82+
/// <li>The database is Microsoft SQL Server and <see cref="TracerSettings.DbmPropagationMode"/> is set to
83+
/// <c>service</c> or
84+
/// <c>full</c>.</li>
85+
/// <li>The stored procedure call does not have <c>Output</c>, <c>InputOutput</c>, or <c>Return</c> ADO.NET command parameters.</li>
86+
/// </ul>
87+
/// </summary>
88+
public const string InjectContextIntoStoredProceduresEnabled = "DD_TRACE_INJECT_CONTEXT_INTO_STORED_PROCEDURES_ENABLED";
89+
90+
/// <summary>
91+
/// Enables beta support for instrumentation via the System.Diagnostics API and the OpenTelemetry SDK.
92+
/// </summary>
93+
public const string OpenTelemetryEnabled = "DD_TRACE_OTEL_ENABLED";
94+
95+
/// <summary>
96+
/// Feature Flag: enables updated resource names on `aspnet.request`, `aspnet-mvc.request`,
97+
/// `aspnet-webapi.request`, and `aspnet_core.request` spans. Enables `aspnet_core_mvc.request` spans and
98+
/// additional features on `aspnet_core.request` spans.
99+
/// </summary>
100+
/// <seealso cref="Datadog.Trace.Configuration.TracerSettings.RouteTemplateResourceNamesEnabled"/>
101+
public const string RouteTemplateResourceNamesEnabled = "DD_TRACE_ROUTE_TEMPLATE_RESOURCE_NAMES_ENABLED";
102+
103+
/// <summary>
104+
/// Feature flag to enable obfuscating the <c>LocalPath</c> of a WCF request that goes
105+
/// into the <c>resourceName</c> of a span.
106+
/// <para>Note: that this only applies when the WCF action is an empty string.</para>
107+
/// </summary>
108+
/// <seealso cref="Datadog.Trace.Configuration.TracerSettings.WcfObfuscationEnabled"/>
109+
public const string WcfObfuscationEnabled = "DD_TRACE_WCF_RESOURCE_OBFUSCATION_ENABLED";
110+
111+
/// <summary>
112+
/// Configuration key to enable or disable improved template-based resource names
113+
/// when using WCF Web HTTP. Requires <see cref="TracerSettings.DelayWcfInstrumentationEnabled"/> be set
114+
/// to true. Enabled by default
115+
/// </summary>
116+
/// <seealso cref="Datadog.Trace.Configuration.TracerSettings.WcfWebHttpResourceNamesEnabled"/>
117+
public const string WcfWebHttpResourceNamesEnabled = "DD_TRACE_WCF_WEB_HTTP_RESOURCE_NAMES_ENABLED";
118+
}
119+
}

0 commit comments

Comments
 (0)