From 3b2549a12418dbcaf07bf218048d3fe785d0454c Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 20 Oct 2025 17:39:53 +0200 Subject: [PATCH 1/9] Source generator for ConfigurationsKeys2 (temporary) to replace ConfigurationsKeys.cs later --- .../ConfigurationKeysGenerator.cs | 493 ++++++++++++++++++ .../Constants.cs | 10 +- .../Datadog.Trace.SourceGenerators.csproj | 3 +- .../Helpers/TrackingNames.cs | 13 + .../Helpers/YamlReader.cs | 142 +++++ tracer/src/Datadog.Trace/Datadog.Trace.csproj | 9 + .../ConfigurationKeysGeneratorTests.cs | 435 ++++++++++++++++ ...atadog.Trace.SourceGenerators.Tests.csproj | 1 + .../TestHelpers.cs | 34 +- 9 files changed, 1132 insertions(+), 8 deletions(-) create mode 100644 tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs create mode 100644 tracer/src/Datadog.Trace.SourceGenerators/Helpers/YamlReader.cs create mode 100644 tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs b/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs new file mode 100644 index 000000000000..d85b5fe6fff6 --- /dev/null +++ b/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs @@ -0,0 +1,493 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading; +using Datadog.Trace.SourceGenerators; +using Datadog.Trace.SourceGenerators.Helpers; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Text; + +/// +/// Source generator that reads supported-configurations.json and generates ConfigurationKeys +/// with proper nested classes organized by product and full XML documentation. +/// +[Generator] +public class ConfigurationKeysGenerator : IIncrementalGenerator +{ + private const string SupportedConfigurationsFileName = "supported-configurations.json"; + private const string SupportedConfigurationsDocsFileName = "supported-configurations-docs.yaml"; + private const string GeneratedClassName = "ConfigurationKeys2"; + private const string Namespace = "Datadog.Trace.Configuration"; + + /// + public void Initialize(IncrementalGeneratorInitializationContext context) + { + // Get the supported-configurations.json file + var jsonFile = context.AdditionalTextsProvider + .Where(static file => Path.GetFileName(file.Path).Equals(SupportedConfigurationsFileName, StringComparison.OrdinalIgnoreCase)) + .WithTrackingName(TrackingNames.ConfigurationKeysGenAdditionalText); + + // Get the supported-configurations-docs.yaml file (optional) + var yamlFile = context.AdditionalTextsProvider + .Where(static file => Path.GetFileName(file.Path).Equals(SupportedConfigurationsDocsFileName, StringComparison.OrdinalIgnoreCase)) + .WithTrackingName(TrackingNames.ConfigurationKeysGenYamlAdditionalText); + + // Combine both files + var combinedFiles = jsonFile.Collect().Combine(yamlFile.Collect()); + + var configContent = combinedFiles.Select(static (files, ct) => + { + var (jsonFiles, yamlFiles) = files; + + if (jsonFiles.Length == 0) + { + return new Result<(string Json, string? Yaml)>( + (string.Empty, null), + new EquatableArray( + [ + CreateDiagnosticInfo("DDSG0005", "Configuration file not found", $"The file '{SupportedConfigurationsFileName}' was not found. Make sure the supported-configurations.json file exists and is included as an AdditionalFile.", DiagnosticSeverity.Error) + ])); + } + + var jsonResult = ExtractConfigurationContent(jsonFiles[0], ct); + if (jsonResult.Errors.Count > 0) + { + return new Result<(string Json, string? Yaml)>((string.Empty, null), jsonResult.Errors); + } + + string? yamlContent = null; + if (yamlFiles.Length > 0) + { + var yamlResult = ExtractConfigurationContent(yamlFiles[0], ct); + if (yamlResult.Errors.Count == 0) + { + yamlContent = yamlResult.Value; + } + + // YAML is optional, so we don't fail if it has errors + } + + return new Result<(string Json, string? Yaml)>((jsonResult.Value, yamlContent), new EquatableArray()); + }) + .WithTrackingName(TrackingNames.ConfigurationKeysGenContentExtracted); + + var parsedConfig = configContent.Select(static (extractResult, ct) => + { + if (extractResult.Errors.Count > 0) + { + return new Result(null!, extractResult.Errors); + } + + return ParseConfigurationContent(extractResult.Value.Json, extractResult.Value.Yaml, ct); + }) + .WithTrackingName(TrackingNames.ConfigurationKeysGenParseConfiguration); + + context.RegisterSourceOutput( + parsedConfig, + static (spc, result) => Execute(spc, result)); + } + + private static void Execute(SourceProductionContext context, Result result) + { + // Report any diagnostics + foreach (var diagnostic in result.Errors) + { + context.ReportDiagnostic(Diagnostic.Create(diagnostic.Descriptor, diagnostic.Location?.ToLocation())); + } + + // Generate source code even if there are errors (use empty configuration as fallback) + var configData = result.Value ?? new ConfigurationData(new Dictionary()); + + // Group by product + var productGroups = configData.Configurations + .GroupBy(kvp => kvp.Value.Product) + .OrderBy(g => g.Key) + .ToList(); + + // Generate partial class files for each product (or empty main class if no products) + foreach (var productGroup in productGroups) + { + var productSource = GenerateProductPartialClass(productGroup.Key, productGroup.ToList()); + var fileName = string.IsNullOrEmpty(productGroup.Key) + ? $"{GeneratedClassName}.g.cs" + : $"{GeneratedClassName}.{productGroup.Key}.g.cs"; + context.AddSource(fileName, SourceText.From(productSource, Encoding.UTF8)); + } + } + + private static Result ExtractConfigurationContent(AdditionalText file, CancellationToken cancellationToken) + { + try + { + var sourceText = file.GetText(cancellationToken); + if (sourceText is null) + { + return new Result( + string.Empty, + new EquatableArray( + [ + CreateDiagnosticInfo("DDSG0006", "Configuration file read error", $"Unable to read the content of '{SupportedConfigurationsFileName}'.", DiagnosticSeverity.Error) + ])); + } + + return new Result(sourceText.ToString(), new EquatableArray()); + } + catch (Exception ex) + { + return new Result( + string.Empty, + new EquatableArray( + [ + CreateDiagnosticInfo("DDSG0006", "Configuration file read error", $"Error reading '{SupportedConfigurationsFileName}': {ex.Message}", DiagnosticSeverity.Error) + ])); + } + } + + private static Result ParseConfigurationContent(string jsonContent, string? yamlContent, CancellationToken cancellationToken) + { + try + { + using var document = JsonDocument.Parse(jsonContent); + var root = document.RootElement; + + // Extract the supportedConfigurations section from JSON + if (!root.TryGetProperty("supportedConfigurations", out var configSection)) + { + return new Result( + null!, + new EquatableArray( + [ + CreateDiagnosticInfo("DDSG0007", "JSON parse error", "Failed to find 'supportedConfigurations' section in supported-configurations.json.", DiagnosticSeverity.Error) + ])); + } + + // Parse YAML documentation if available + Dictionary? yamlDocs = null; + if (yamlContent != null && !string.IsNullOrEmpty(yamlContent)) + { + try + { + yamlDocs = YamlReader.ParseDocumentation(yamlContent); + } + catch + { + // YAML parsing is optional, continue without it + } + } + + // Parse each configuration entry from JSON + var configurations = ParseConfigurationEntries(configSection); + + // Parse deprecations section + Dictionary? deprecations = null; + if (root.TryGetProperty("deprecations", out var deprecationsSection)) + { + deprecations = ParseDeprecations(deprecationsSection); + } + + // Override documentation from YAML if available + if (yamlDocs != null) + { + foreach (var key in yamlDocs.Keys) + { + if (configurations.ContainsKey(key)) + { + var existing = configurations[key]; + configurations[key] = new ConfigEntry(existing.Key, yamlDocs[key], existing.Product); + } + } + } + + return new Result(new ConfigurationData(configurations), new EquatableArray()); + } + catch (Exception ex) + { + return new Result( + null!, + new EquatableArray( + [ + CreateDiagnosticInfo("DDSG0007", "JSON parse error", $"Error parsing supported-configurations.json: {ex.Message}", DiagnosticSeverity.Error) + ])); + } + } + + private static Dictionary ParseDeprecations(JsonElement deprecationsElement) + { + var deprecations = new Dictionary(); + + foreach (var property in deprecationsElement.EnumerateObject()) + { + if (property.Value.ValueKind == JsonValueKind.String) + { + var value = property.Value.GetString(); + if (value != null) + { + deprecations[property.Name] = value; + } + } + } + + return deprecations; + } + + private static Dictionary ParseConfigurationEntries(JsonElement configSection) + { + var configurations = new Dictionary(); + + foreach (var property in configSection.EnumerateObject()) + { + var key = property.Name; + var value = property.Value; + + // Validate that the value is an object + if (value.ValueKind != JsonValueKind.Object) + { + throw new InvalidOperationException($"Configuration entry '{key}' must be an object"); + } + + // Extract the product field if it exists + var product = string.Empty; + if (value.TryGetProperty("product", out var productElement) && + productElement.ValueKind == JsonValueKind.String) + { + product = productElement.GetString() ?? string.Empty; + } + + configurations[key] = new ConfigEntry(key, string.Empty, product); + } + + return configurations; + } + + private static void AppendFileHeader(StringBuilder sb) + { + sb.Append(Constants.FileHeader); + sb.Append(Constants.ConfigurationGeneratorComment); + } + + private static string GenerateProductPartialClass(string product, List> entries) + { + var sb = new StringBuilder(); + + AppendFileHeader(sb); + sb.AppendLine($"namespace {Namespace};"); + sb.AppendLine(); + + if (string.IsNullOrEmpty(product)) + { + // Generate main class without nested product class + sb.AppendLine("/// "); + sb.AppendLine("/// String constants for standard Datadog configuration keys."); + sb.AppendLine("/// Auto-generated from supported-configurations.json and supported-configurations-docs.yaml"); + sb.AppendLine("/// "); + sb.AppendLine($"internal static partial class {GeneratedClassName}"); + sb.AppendLine("{"); + + var sortedEntries = entries.OrderBy(kvp => kvp.Key).ToList(); + for (int i = 0; i < sortedEntries.Count; i++) + { + GenerateConstDeclaration(sb, sortedEntries[i].Value, 1, product); + if (i < sortedEntries.Count - 1) + { + sb.AppendLine(); + } + } + + sb.AppendLine("}"); + } + else + { + // Generate partial class with nested product class + sb.AppendLine($"internal static partial class {GeneratedClassName}"); + sb.AppendLine("{"); + sb.AppendLine($" internal static class {product}"); + sb.AppendLine(" {"); + + var sortedEntries = entries.OrderBy(kvp => kvp.Key).ToList(); + for (int i = 0; i < sortedEntries.Count; i++) + { + GenerateConstDeclaration(sb, sortedEntries[i].Value, 2, product); + if (i < sortedEntries.Count - 1) + { + sb.AppendLine(); + } + } + + sb.AppendLine(" }"); + sb.AppendLine("}"); + } + + return sb.ToString(); + } + + private static void GenerateConstDeclaration(StringBuilder sb, ConfigEntry entry, int indentLevel, string? productName = null) + { + var indent = new string(' ', indentLevel * 4); + + // Add XML documentation + if (!string.IsNullOrEmpty(entry.Documentation)) + { + var docLines = entry.Documentation.Split(["\r\n", "\n"], StringSplitOptions.None); + sb.AppendLine($"{indent}/// "); + var seeAlsoLines = new List(); + foreach (var line in docLines) + { + var trimmedLine = line.TrimStart(); + + // Check if line contains seealso tag (self-closing /> or closing ) as we need to extract it + if (trimmedLine.StartsWith("") || trimmedLine.Contains(""))) + { + // seealso tags go outside summary - save for later + seeAlsoLines.Add(line.Trim()); + continue; + } + + sb.AppendLine($"{indent}/// {line}"); + } + + sb.AppendLine($"{indent}/// "); + + // Add seealso tags after summary + foreach (var seeAlsoLine in seeAlsoLines) + { + sb.AppendLine($"{indent}/// {seeAlsoLine}"); + } + } + + // Add const declaration + var constName = KeyToConstName(entry.Key, productName); + sb.AppendLine($"{indent}public const string {constName} = \"{entry.Key}\";"); + } + + private static string KeyToConstName(string key, string? productName = null) + { + // Remove DD_ or OTEL_ prefix + var name = key; + var prefixes = new[] { "DD_", "_DD_" }; + foreach (var prefix in prefixes) + { + if (name.StartsWith(prefix) && !char.IsDigit(name[0])) + { + var result = name.Substring(prefix.Length); + if (!char.IsDigit(result[0])) + { + name = result; + } + + break; + } + } + + // Convert to PascalCase + var parts = name.Split('_'); + var pascalName = string.Concat(parts.Select(p => p.Length > 0 ? char.ToUpper(p[0]) + p.Substring(1).ToLower() : string.Empty)); + + // Strip product prefix if the const name starts with it + if (!string.IsNullOrEmpty(productName) && !string.IsNullOrEmpty(pascalName)) + { + if (pascalName!.Length > productName!.Length && + pascalName.StartsWith(productName, StringComparison.OrdinalIgnoreCase)) + { + pascalName = pascalName.Substring(productName.Length); + } + } + + return pascalName; + } + + private static DiagnosticInfo CreateDiagnosticInfo(string id, string title, string message, DiagnosticSeverity severity) + { + var descriptor = new DiagnosticDescriptor( + id: id, + title: title, + messageFormat: message, + category: nameof(ConfigurationKeysGenerator), + defaultSeverity: severity, + isEnabledByDefault: true); + + return new DiagnosticInfo(descriptor, (LocationInfo?)null); + } + + private readonly struct ConfigEntry : IEquatable + { + public ConfigEntry(string key, string documentation, string product) + { + Key = key; + Documentation = documentation; + Product = product; + } + + public string Key { get; } + + public string Documentation { get; } + + public string Product { get; } + + public bool Equals(ConfigEntry other) => Key == other.Key && Documentation == other.Documentation && Product == other.Product; + + public override bool Equals(object? obj) => obj is ConfigEntry other && Equals(other); + + public override int GetHashCode() => System.HashCode.Combine(Key, Documentation, Product); + } + + private sealed class ConfigurationData : IEquatable + { + public ConfigurationData(Dictionary configurations) + { + Configurations = configurations; + } + + public Dictionary Configurations { get; } + + public bool Equals(ConfigurationData? other) + { + if (ReferenceEquals(null, other)) + { + return false; + } + + if (ReferenceEquals(this, other)) + { + return true; + } + + if (Configurations.Count != other.Configurations.Count) + { + return false; + } + + foreach (var kvp in Configurations) + { + if (!other.Configurations.TryGetValue(kvp.Key, out var otherEntry)) + { + return false; + } + + if (!kvp.Value.Equals(otherEntry)) + { + return false; + } + } + + return true; + } + + public override bool Equals(object? obj) + { + return Equals(obj as ConfigurationData); + } + + public override int GetHashCode() + { + return Configurations.Count; + } + } +} diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Constants.cs b/tracer/src/Datadog.Trace.SourceGenerators/Constants.cs index 6ddd70adc239..04a288cb767a 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Constants.cs +++ b/tracer/src/Datadog.Trace.SourceGenerators/Constants.cs @@ -1,4 +1,4 @@ -// +// // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // @@ -20,5 +20,13 @@ internal static class Constants #nullable enable + """; + + public const string ConfigurationGeneratorComment = + """ + // This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml + // Do not edit this file directly. The source generator will regenerate it on build. + // NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. + """; } diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Datadog.Trace.SourceGenerators.csproj b/tracer/src/Datadog.Trace.SourceGenerators/Datadog.Trace.SourceGenerators.csproj index 8420b34bd1a0..74f8111d6bf7 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Datadog.Trace.SourceGenerators.csproj +++ b/tracer/src/Datadog.Trace.SourceGenerators/Datadog.Trace.SourceGenerators.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 enable @@ -12,6 +12,7 @@ + diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs index e3b3434eaf87..d5da46c3c0bc 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs +++ b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs @@ -31,4 +31,17 @@ internal class TrackingNames public const string AssemblyCallTargetDefinitionSource = nameof(AssemblyCallTargetDefinitionSource); public const string AdoNetCallTargetDefinitionSource = nameof(AdoNetCallTargetDefinitionSource); public const string AdoNetSignatures = nameof(AdoNetSignatures); + + // Configuration key matcher + public const string ConfigurationKeysParseConfiguration = nameof(ConfigurationKeysParseConfiguration); + public const string ConfigurationKeyMatcherDiagnostics = nameof(ConfigurationKeyMatcherDiagnostics); + public const string ConfigurationKeyMatcherValidData = nameof(ConfigurationKeyMatcherValidData); + public const string ConfigurationKeysAdditionalText = nameof(ConfigurationKeysAdditionalText); + + // Configuration key generator + public const string ConfigurationKeysGenParseConfiguration = nameof(ConfigurationKeysGenParseConfiguration); + public const string ConfigurationKeysGenContentExtracted = nameof(ConfigurationKeysGenContentExtracted); + public const string ConfigurationKeysGenMatcherValidData = nameof(ConfigurationKeysGenMatcherValidData); + public const string ConfigurationKeysGenAdditionalText = nameof(ConfigurationKeysGenAdditionalText); + public const string ConfigurationKeysGenYamlAdditionalText = nameof(ConfigurationKeysGenYamlAdditionalText); } diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/YamlReader.cs b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/YamlReader.cs new file mode 100644 index 000000000000..a05874d92d2a --- /dev/null +++ b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/YamlReader.cs @@ -0,0 +1,142 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// + +using System.Collections.Generic; +using System.Text; + +namespace Datadog.Trace.SourceGenerators.Helpers +{ + /// + /// Simple YAML parser for reading documentation strings from YAML files. + /// Supports basic YAML features needed for configuration documentation. + /// + internal static class YamlReader + { + /// + /// Parses a YAML file containing configuration key documentation. + /// Expects format: KEY: | followed by multi-line documentation + /// + public static Dictionary ParseDocumentation(string yamlContent) + { + var result = new Dictionary(); + var lines = yamlContent.Replace("\r\n", "\n").Split('\n'); + + string? currentKey = null; + var currentDoc = new StringBuilder(); + var inMultiLine = false; + var baseIndent = 0; + + for (int i = 0; i < lines.Length; i++) + { + var line = lines[i]; + + // Skip empty lines and comments when not in multi-line + if (!inMultiLine && (string.IsNullOrWhiteSpace(line) || line.TrimStart().StartsWith("#"))) + { + continue; + } + + // Check for new key (starts at column 0, contains colon) + if (!inMultiLine && line.Length > 0 && line[0] != ' ' && line.Contains(":")) + { + // Save previous key if exists + if (currentKey != null) + { + result[currentKey] = currentDoc.ToString().TrimEnd(); + currentDoc.Clear(); + } + + var colonIndex = line.IndexOf(':'); + currentKey = line.Substring(0, colonIndex).Trim(); + + // Check if it's a multi-line string (|) + var afterColon = line.Substring(colonIndex + 1).Trim(); + if (afterColon == "|" || afterColon == ">") + { + inMultiLine = true; + baseIndent = -1; // Will be set on first content line + } + else if (!string.IsNullOrEmpty(afterColon)) + { + // Single line value + currentDoc.Append(afterColon); + result[currentKey] = currentDoc.ToString(); + currentDoc.Clear(); + currentKey = null; + } + + continue; + } + + // Handle multi-line content + if (inMultiLine && currentKey != null) + { + // Check if we've reached the next key (no indentation) + if (line.Length > 0 && line[0] != ' ' && line.Contains(":")) + { + // Save current key and process this line as new key + result[currentKey] = currentDoc.ToString().TrimEnd(); + currentDoc.Clear(); + inMultiLine = false; + + var colonIndex = line.IndexOf(':'); + currentKey = line.Substring(0, colonIndex).Trim(); + var afterColon = line.Substring(colonIndex + 1).Trim(); + if (afterColon == "|" || afterColon == ">") + { + inMultiLine = true; + baseIndent = -1; + } + + continue; + } + + // Determine base indentation from first content line + if (baseIndent == -1 && line.Length > 0 && line[0] == ' ') + { + baseIndent = 0; + while (baseIndent < line.Length && line[baseIndent] == ' ') + { + baseIndent++; + } + } + + // Add content line (remove base indentation) + if (line.Length > 0) + { + var contentStart = 0; + while (contentStart < line.Length && contentStart < baseIndent && line[contentStart] == ' ') + { + contentStart++; + } + + if (currentDoc.Length > 0) + { + currentDoc.AppendLine(); + } + + currentDoc.Append(line.Substring(contentStart)); + } + else + { + // Empty line in multi-line content + if (currentDoc.Length > 0) + { + currentDoc.AppendLine(); + } + } + } + } + + // Save last key + if (currentKey != null) + { + result[currentKey] = currentDoc.ToString().TrimEnd(); + } + + return result; + } + } +} diff --git a/tracer/src/Datadog.Trace/Datadog.Trace.csproj b/tracer/src/Datadog.Trace/Datadog.Trace.csproj index f7c0749e6db7..ff3343d6ef5d 100644 --- a/tracer/src/Datadog.Trace/Datadog.Trace.csproj +++ b/tracer/src/Datadog.Trace/Datadog.Trace.csproj @@ -156,4 +156,13 @@ $(DefineConstants);ENABLE_IL2CPP + + + PreserveNewest + + + PreserveNewest + + + \ No newline at end of file diff --git a/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs b/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs new file mode 100644 index 000000000000..ce35cc9f5202 --- /dev/null +++ b/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs @@ -0,0 +1,435 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// + +#nullable enable + +using System.Linq; +using FluentAssertions; +using FluentAssertions.Execution; +using Xunit; + +namespace Datadog.Trace.SourceGenerators.Tests; + +public class ConfigurationKeysGeneratorTests +{ + private const string Header = """ + // + // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. + // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. + // + // + + #nullable enable + + // This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml + // Do not edit this file directly. The source generator will regenerate it on build. + // NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. + namespace Datadog.Trace.Configuration; + """; + + [Fact] + public void GeneratesProductPartialClassesAndHeader() + { + const string supportedConfigJson = """ + { + "supportedConfigurations": { + "DD_TRACE_ENABLED": { + "version": ["A"], + "product": "Tracer" + }, + "DD_APPSEC_ENABLED": { + "version": ["A"], + "product": "AppSec" + }, + "OTEL_EXPORTER_OTLP_ENDPOINT": { + "version": ["A"], + "product": "OpenTelemetry" + } + } + } + """; + + const string docsYaml = """ + DD_TRACE_ENABLED: | + Enables or disables the tracer. + Default is true. + + DD_APPSEC_ENABLED: | + Enables or disables AppSec. + Default is false. + + OTEL_EXPORTER_OTLP_ENDPOINT: | + Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). + Used when is not set. + Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. + Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318 + """; + + const string expectedTracerOutput = + """ + internal static class Tracer + { + /// + /// Enables or disables the tracer. + /// Default is true. + /// + public const string TraceEnabled = "DD_TRACE_ENABLED"; + } + """; + + const string expectedAppSecOutput = + """ + internal static class AppSec + { + /// + /// Enables or disables AppSec. + /// Default is false. + /// + public const string Enabled = "DD_APPSEC_ENABLED"; + } + """; + + const string expectedTelemOutput = + """ + internal static class OpenTelemetry + { + /// + /// Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). + /// Used when is not set. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318 + /// + public const string OtelExporterOtlpEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT"; + } + """; + + var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( + [], + [], + [ + ("supported-configurations.json", supportedConfigJson), + ("supported-configurations-docs.yaml", docsYaml) + ], + assertOutput: false); + + using var s = new AssertionScope(); + diagnostics.Should().BeEmpty(); + outputs.Should().HaveCount(3); + var appSecOutput = outputs.First(o => o.Contains("AppSec")); + var tracerOutput = outputs.First(o => o.Contains("Tracer")); + var telemOutput = outputs.First(o => o.Contains("OpenTelemetry")); + + tracerOutput.Should().NotBeNullOrEmpty(); + appSecOutput.Should().NotBeNullOrEmpty(); + telemOutput.Should().NotBeNullOrEmpty(); + tracerOutput.Should().Contain(Header); + appSecOutput.Should().Contain(Header); + telemOutput.Should().Contain(Header); + tracerOutput.Should().Contain(expectedTracerOutput); + appSecOutput.Should().Contain(expectedAppSecOutput); + telemOutput.Should().Contain(expectedTelemOutput); + } + + [Fact] + public void StripsProductPrefixFromConstNames() + { + const string supportedConfigJson = + """ + { + "supportedConfigurations": { + "DD_CIVISIBILITY_AGENTLESS_ENABLED": { + "version": "A", + "product": "CiVisibility" + }, + "DD_APPSEC_WAF_TIMEOUT": { + "version": "A", + "product": "AppSec" + }, + "DD_TRACE_INTEGRATION_SERVICE_NAMES_ENABLED": { + "version": "A", + "product": "Tracer" + } + } + } + """; + + const string expectedCIOutput = + """ + internal static class CiVisibility + { + public const string AgentlessEnabled = "DD_CIVISIBILITY_AGENTLESS_ENABLED"; + } + """; + + const string expectedAppSecOutput = + """ + internal static class AppSec + { + public const string WafTimeout = "DD_APPSEC_WAF_TIMEOUT"; + } + """; + const string expectedTracerOutput = + """ + internal static class Tracer + { + public const string TraceIntegrationServiceNamesEnabled = "DD_TRACE_INTEGRATION_SERVICE_NAMES_ENABLED"; + } + """; + + var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( + [], + [], + [("supported-configurations.json", supportedConfigJson)], + assertOutput: false); + + using var s = new AssertionScope(); + diagnostics.Should().BeEmpty(); + + var ciOutput = outputs.FirstOrDefault(o => o.Contains("class CiVisibility")); + var appSecOutput = outputs.FirstOrDefault(o => o.Contains("class AppSec")); + var tracerOutput = outputs.FirstOrDefault(o => o.Contains("class Tracer")); + + ciOutput.Should().NotBeNullOrEmpty(); + appSecOutput.Should().NotBeNullOrEmpty(); + tracerOutput.Should().NotBeNullOrEmpty(); + + ciOutput.Should().Contain(expectedCIOutput); + appSecOutput.Should().Contain(expectedAppSecOutput); + tracerOutput.Should().Contain(expectedTracerOutput); + } + + [Fact] + public void HandlesKeysWithoutProduct() + { + const string supportedConfigJson = """ + { + "supportedConfigurations": { + "DD_ENV": { + "version": "A" + }, + "DD_SERVICE": { + "version": "A" + } + } + } + """; + + var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( + [], + [], + [("supported-configurations.json", supportedConfigJson)], + assertOutput: false); + + using var s = new AssertionScope(); + diagnostics.Should().BeEmpty(); + + // Keys without product should go in the main class + var mainOutput = outputs.FirstOrDefault(o => o.Contains("partial class ConfigurationKeys") && !o.Contains("class Tracer") && !o.Contains("class AppSec")); + mainOutput.Should().NotBeNullOrEmpty(); + mainOutput.Should().Contain("public const string Env = \"DD_ENV\";"); + mainOutput.Should().Contain("public const string Service = \"DD_SERVICE\";"); + } + + [Fact] + public void IncludesXmlDocumentation() + { + const string supportedConfigJson = """ + { + "supportedConfigurations": { + "DD_TRACE_ENABLED": { + "version": "A", + "product": "Tracer" + } + } + } + """; + + const string docsYaml = """ + DD_TRACE_ENABLED: | + Enables or disables the Datadog tracer. + Default: true + """; + + var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( + [], + [], + [ + ("supported-configurations.json", supportedConfigJson), + ("supported-configurations-docs.yaml", docsYaml) + ], + assertOutput: false); + + using var s = new AssertionScope(); + diagnostics.Should().BeEmpty(); + + var tracerOutput = outputs.FirstOrDefault(o => o.Contains("class Tracer")); + tracerOutput.Should().NotBeNullOrEmpty(); + tracerOutput.Should().Contain("/// "); + tracerOutput.Should().Contain("/// Enables or disables the Datadog tracer."); + tracerOutput.Should().Contain("/// Default: true"); + tracerOutput.Should().Contain("/// "); + } + + [Fact] + public void HandlesEmptyConfiguration() + { + const string supportedConfigJson = """ + { + "supportedConfigurations": {} + } + """; + + var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( + [], + [], + [("supported-configurations.json", supportedConfigJson)], + assertOutput: false); + + diagnostics.Should().BeEmpty(); + outputs.Should().BeEmpty(); + } + + [Fact] + public void HandlesMissingJsonFile() + { + var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( + [], + [], + [], + assertOutput: false); + + diagnostics.Should().Contain(d => d.Id == "DDSG0005"); + } + + [Fact] + public void HandlesInvalidJson() + { + const string invalidJson = """ + { + "supportedConfigurations": { + "DD_TRACE_ENABLED": "invalid" + } + } + """; + + var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( + [], + [], + [("supported-configurations.json", invalidJson)], + assertOutput: false); + + diagnostics.Should().Contain(d => d.Id == "DDSG0002" || d.Id == "DDSG0007"); + } + + [Fact] + public void SortsEntriesAlphabetically() + { + const string supportedConfigJson = """ + { + "supportedConfigurations": { + "DD_TRACE_SAMPLE_RATE": { + "version": "A", + "product": "Tracer" + }, + "DD_TRACE_ENABLED": { + "version": "A", + "product": "Tracer" + }, + "DD_TRACE_DEBUG": { + "version": "A", + "product": "Tracer" + } + } + } + """; + + var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( + [], + [], + [("supported-configurations.json", supportedConfigJson)], + assertOutput: false); + + using var s = new AssertionScope(); + diagnostics.Should().BeEmpty(); + + var tracerOutput = outputs.FirstOrDefault(o => o.Contains("class Tracer")); + tracerOutput.Should().NotBeNullOrEmpty(); + + var debugIndex = tracerOutput!.IndexOf("Debug = \"DD_TRACE_DEBUG\""); + var enabledIndex = tracerOutput!.IndexOf("Enabled = \"DD_TRACE_ENABLED\""); + var sampleRateIndex = tracerOutput!.IndexOf("SampleRate = \"DD_TRACE_SAMPLE_RATE\""); + + debugIndex.Should().BeLessThan(enabledIndex); + enabledIndex.Should().BeLessThan(sampleRateIndex); + } + + [Fact] + public void HandlesSeeAlsoTagsCorrectly() + { + const string supportedConfigJson = """ + { + "supportedConfigurations": { + "DD_TRACE_ENABLED": { + "version": "A", + "product": "Tracer" + }, + "DD_LOGS_INJECTION": { + "version": "A", + "product": "Tracer" + } + } + } + """; + + const string docsYaml = """ + DD_TRACE_ENABLED: | + Configuration key for enabling or disabling the Tracer. + Default is value is true (enabled). + + + DD_LOGS_INJECTION: | + Configuration key for enabling or disabling the automatic injection + of correlation identifiers into the logging context. + + """; + + const string expectedEnabledOutput = + """ + internal static class Tracer + { + /// + /// Configuration key for enabling or disabling the automatic injection + /// of correlation identifiers into the logging context. + /// + /// + public const string LogsInjection = "DD_LOGS_INJECTION"; + + /// + /// Configuration key for enabling or disabling the Tracer. + /// Default is value is true (enabled). + /// + /// + public const string TraceEnabled = "DD_TRACE_ENABLED"; + } + """; + + var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( + [], + [], + [ + ("supported-configurations.json", supportedConfigJson), + ("supported-configurations-docs.yaml", docsYaml) + ], + assertOutput: false); + + using var s = new AssertionScope(); + diagnostics.Should().BeEmpty(); + + var tracerOutput = outputs.FirstOrDefault(o => o.Contains("class Tracer")); + tracerOutput.Should().NotBeNullOrEmpty(); + + tracerOutput!.Should().Contain(expectedEnabledOutput); + } +} diff --git a/tracer/test/Datadog.Trace.SourceGenerators.Tests/Datadog.Trace.SourceGenerators.Tests.csproj b/tracer/test/Datadog.Trace.SourceGenerators.Tests/Datadog.Trace.SourceGenerators.Tests.csproj index 4381fcac3b6c..0ded833e1e6f 100644 --- a/tracer/test/Datadog.Trace.SourceGenerators.Tests/Datadog.Trace.SourceGenerators.Tests.csproj +++ b/tracer/test/Datadog.Trace.SourceGenerators.Tests/Datadog.Trace.SourceGenerators.Tests.csproj @@ -7,6 +7,7 @@ + diff --git a/tracer/test/Datadog.Trace.SourceGenerators.Tests/TestHelpers.cs b/tracer/test/Datadog.Trace.SourceGenerators.Tests/TestHelpers.cs index bc2c003d73b9..b21cf2ead097 100644 --- a/tracer/test/Datadog.Trace.SourceGenerators.Tests/TestHelpers.cs +++ b/tracer/test/Datadog.Trace.SourceGenerators.Tests/TestHelpers.cs @@ -9,10 +9,12 @@ using System.Collections.Immutable; using System.Linq; using System.Reflection; +using System.Threading; using Datadog.Trace.SourceGenerators.Helpers; using FluentAssertions; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.Text; namespace Datadog.Trace.SourceGenerators.Tests { @@ -37,7 +39,7 @@ public static (ImmutableArray Diagnostics, string[] Output) GetGener where TGenerator : IIncrementalGenerator, new() => GetGeneratedTrees(sources, assertOutput: true); - public static (ImmutableArray Diagnostics, string[] Output) GetGeneratedTrees(string[] sources, bool assertOutput) + public static (ImmutableArray Diagnostics, string[] Output) GetGeneratedTrees(string[] sources, bool assertOutput, (string Path, string Content)[] additionalFiles = null) where TGenerator : IIncrementalGenerator, new() { // get all the const string fields @@ -48,10 +50,10 @@ public static (ImmutableArray Diagnostics, string[] Output) GetGener .Where(x => !string.IsNullOrEmpty(x)) .ToArray(); - return GetGeneratedTrees(sources, trackingNames, assertOutput); + return GetGeneratedTrees(sources, trackingNames, assertOutput: assertOutput, additionalFiles: additionalFiles); } - public static (ImmutableArray Diagnostics, string[] Output) GetGeneratedTrees(string[] source, string[] stages, bool assertOutput = true) + public static (ImmutableArray Diagnostics, string[] Output) GetGeneratedTrees(string[] source, string[] stages, (string Path, string Content)[] additionalFiles = null, bool assertOutput = true) where T : IIncrementalGenerator, new() { IEnumerable syntaxTrees = source.Select(static x => CSharpSyntaxTree.ParseText(x)); @@ -66,12 +68,12 @@ public static (ImmutableArray Diagnostics, string[] Output) GetGener references, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)); - GeneratorDriverRunResult runResult = RunGeneratorAndAssertOutput(compilation, stages, assertOutput); + GeneratorDriverRunResult runResult = RunGeneratorAndAssertOutput(compilation, stages, additionalFiles ?? Array.Empty<(string, string)>(), assertOutput); return (runResult.Diagnostics, runResult.GeneratedTrees.Select(x => x.ToString()).ToArray()); } - private static GeneratorDriverRunResult RunGeneratorAndAssertOutput(CSharpCompilation compilation, string[] trackingNames, bool assertOutput = true) + private static GeneratorDriverRunResult RunGeneratorAndAssertOutput(CSharpCompilation compilation, string[] trackingNames, (string Path, string Content)[] additionalFiles = null, bool assertOutput = true) where T : IIncrementalGenerator, new() { ISourceGenerator generator = new T().AsSourceGenerator(); @@ -80,7 +82,9 @@ private static GeneratorDriverRunResult RunGeneratorAndAssertOutput(CSharpCom disabledOutputs: IncrementalGeneratorOutputKind.None, trackIncrementalGeneratorSteps: true); - GeneratorDriver driver = CSharpGeneratorDriver.Create([generator], driverOptions: opts); + var additionalTexts = additionalFiles?.Select(f => (AdditionalText)new TestAdditionalText(f.Path, f.Content)).ToImmutableArray(); + + GeneratorDriver driver = CSharpGeneratorDriver.Create([generator], additionalTexts: additionalTexts, driverOptions: opts); var clone = compilation.Clone(); // Run twice, once with a clone of the compilation @@ -228,5 +232,23 @@ void Visit(object node) } } } + + private class TestAdditionalText : AdditionalText + { + private readonly string _text; + + public TestAdditionalText(string path, string text) + { + Path = path; + _text = text; + } + + public override string Path { get; } + + public override SourceText GetText(CancellationToken cancellationToken = default) + { + return SourceText.From(_text); + } + } } } From 11da106b92f3a6f7b21436d60095b63aee17808d Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 22 Oct 2025 21:01:03 +0200 Subject: [PATCH 2/9] Add mappings mechanism to take original constants variables names so that we dont need to refactor everything --- .../ConfigurationKeysGenerator.cs | 237 +++- .../Helpers/TrackingNames.cs | 1 + .../configuration_keys_mapping.json | 1072 +++++++++++++++++ tracer/src/Datadog.Trace/Datadog.Trace.csproj | 10 + .../ConfigurationKeysGeneratorTests.cs | 116 +- 5 files changed, 1383 insertions(+), 53 deletions(-) create mode 100644 tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs b/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs index d85b5fe6fff6..2edea1e84340 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs +++ b/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs @@ -24,6 +24,7 @@ public class ConfigurationKeysGenerator : IIncrementalGenerator { private const string SupportedConfigurationsFileName = "supported-configurations.json"; private const string SupportedConfigurationsDocsFileName = "supported-configurations-docs.yaml"; + private const string ConfigurationKeysMappingFileName = "configuration_keys_mapping.json"; private const string GeneratedClassName = "ConfigurationKeys2"; private const string Namespace = "Datadog.Trace.Configuration"; @@ -40,17 +41,22 @@ public void Initialize(IncrementalGeneratorInitializationContext context) .Where(static file => Path.GetFileName(file.Path).Equals(SupportedConfigurationsDocsFileName, StringComparison.OrdinalIgnoreCase)) .WithTrackingName(TrackingNames.ConfigurationKeysGenYamlAdditionalText); - // Combine both files - var combinedFiles = jsonFile.Collect().Combine(yamlFile.Collect()); + // Get the configuration_keys_mapping.json file (optional) + var mappingFile = context.AdditionalTextsProvider + .Where(static file => Path.GetFileName(file.Path).Equals(ConfigurationKeysMappingFileName, StringComparison.OrdinalIgnoreCase)) + .WithTrackingName(TrackingNames.ConfigurationKeysGenMappingAdditionalText); + + // Combine all files + var combinedFiles = jsonFile.Collect().Combine(yamlFile.Collect()).Combine(mappingFile.Collect()); var configContent = combinedFiles.Select(static (files, ct) => { - var (jsonFiles, yamlFiles) = files; + var ((jsonFiles, yamlFiles), mappingFiles) = files; if (jsonFiles.Length == 0) { - return new Result<(string Json, string? Yaml)>( - (string.Empty, null), + return new Result<(string Json, string? Yaml, string? Mapping)>( + (string.Empty, null, null), new EquatableArray( [ CreateDiagnosticInfo("DDSG0005", "Configuration file not found", $"The file '{SupportedConfigurationsFileName}' was not found. Make sure the supported-configurations.json file exists and is included as an AdditionalFile.", DiagnosticSeverity.Error) @@ -60,7 +66,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) var jsonResult = ExtractConfigurationContent(jsonFiles[0], ct); if (jsonResult.Errors.Count > 0) { - return new Result<(string Json, string? Yaml)>((string.Empty, null), jsonResult.Errors); + return new Result<(string Json, string? Yaml, string? Mapping)>((string.Empty, null, null), jsonResult.Errors); } string? yamlContent = null; @@ -75,7 +81,19 @@ public void Initialize(IncrementalGeneratorInitializationContext context) // YAML is optional, so we don't fail if it has errors } - return new Result<(string Json, string? Yaml)>((jsonResult.Value, yamlContent), new EquatableArray()); + string? mappingContent = null; + if (mappingFiles.Length > 0) + { + var mappingResult = ExtractConfigurationContent(mappingFiles[0], ct); + if (mappingResult.Errors.Count == 0) + { + mappingContent = mappingResult.Value; + } + + // Mapping is optional, so we don't fail if it has errors + } + + return new Result<(string Json, string? Yaml, string? Mapping)>((jsonResult.Value, yamlContent, mappingContent), new EquatableArray()); }) .WithTrackingName(TrackingNames.ConfigurationKeysGenContentExtracted); @@ -86,7 +104,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) return new Result(null!, extractResult.Errors); } - return ParseConfigurationContent(extractResult.Value.Json, extractResult.Value.Yaml, ct); + return ParseConfigurationContent(extractResult.Value.Json, extractResult.Value.Yaml, extractResult.Value.Mapping, ct); }) .WithTrackingName(TrackingNames.ConfigurationKeysGenParseConfiguration); @@ -104,7 +122,7 @@ private static void Execute(SourceProductionContext context, Result()); + var configData = result.Value ?? new ConfigurationData(new Dictionary(), null); // Group by product var productGroups = configData.Configurations @@ -115,7 +133,7 @@ private static void Execute(SourceProductionContext context, Result ExtractConfigurationContent(AdditionalText file, C } } - private static Result ParseConfigurationContent(string jsonContent, string? yamlContent, CancellationToken cancellationToken) + private static Result ParseConfigurationContent(string jsonContent, string? yamlContent, string? mappingContent, CancellationToken cancellationToken) { try { @@ -169,6 +187,20 @@ private static Result ParseConfigurationContent(string jsonCo ])); } + // Parse mapping file if available + Dictionary? nameMapping = null; + if (mappingContent != null && !string.IsNullOrEmpty(mappingContent)) + { + try + { + nameMapping = ParseMappingFile(mappingContent); + } + catch + { + // Mapping is optional, continue without it + } + } + // Parse YAML documentation if available Dictionary? yamlDocs = null; if (yamlContent != null && !string.IsNullOrEmpty(yamlContent)) @@ -201,12 +233,25 @@ private static Result ParseConfigurationContent(string jsonCo if (configurations.ContainsKey(key)) { var existing = configurations[key]; - configurations[key] = new ConfigEntry(existing.Key, yamlDocs[key], existing.Product); + configurations[key] = new ConfigEntry(existing.Key, yamlDocs[key], existing.Product, existing.DeprecationMessage); + } + } + } + + // Add deprecation messages to entries + if (deprecations != null) + { + foreach (var kvp in deprecations) + { + if (configurations.ContainsKey(kvp.Key)) + { + var existing = configurations[kvp.Key]; + configurations[kvp.Key] = new ConfigEntry(existing.Key, existing.Documentation, existing.Product, kvp.Value); } } } - return new Result(new ConfigurationData(configurations), new EquatableArray()); + return new Result(new ConfigurationData(configurations, nameMapping), new EquatableArray()); } catch (Exception ex) { @@ -273,7 +318,7 @@ private static void AppendFileHeader(StringBuilder sb) sb.Append(Constants.ConfigurationGeneratorComment); } - private static string GenerateProductPartialClass(string product, List> entries) + private static string GenerateProductPartialClass(string product, List> entries, Dictionary? nameMapping) { var sb = new StringBuilder(); @@ -294,7 +339,7 @@ private static string GenerateProductPartialClass(string product, List kvp.Key).ToList(); for (int i = 0; i < sortedEntries.Count; i++) { - GenerateConstDeclaration(sb, sortedEntries[i].Value, 1, product); + GenerateConstDeclaration(sb, sortedEntries[i].Value, 1, product, nameMapping); if (i < sortedEntries.Count - 1) { sb.AppendLine(); @@ -312,9 +357,9 @@ private static string GenerateProductPartialClass(string product, List kvp.Key).ToList(); - for (int i = 0; i < sortedEntries.Count; i++) + for (var i = 0; i < sortedEntries.Count; i++) { - GenerateConstDeclaration(sb, sortedEntries[i].Value, 2, product); + GenerateConstDeclaration(sb, sortedEntries[i].Value, 2, product, nameMapping); if (i < sortedEntries.Count - 1) { sb.AppendLine(); @@ -328,7 +373,47 @@ private static string GenerateProductPartialClass(string product, List ParseMappingFile(string mappingJson) + { + var mapping = new Dictionary(); + + using var document = JsonDocument.Parse(mappingJson); + var root = document.RootElement; + + if (!root.TryGetProperty("mappings", out var mappingsArray)) + { + return mapping; + } + + foreach (var item in mappingsArray.EnumerateArray()) + { + if (!item.TryGetProperty("env_var", out var envVarElement)) + { + continue; + } + + var envVar = envVarElement.GetString(); + if (string.IsNullOrEmpty(envVar)) + { + continue; + } + + // const_name can be null, so check if it exists and is not null + if (item.TryGetProperty("const_name", out var constNameElement) && + constNameElement.ValueKind == JsonValueKind.String) + { + var constName = constNameElement.GetString(); + if (!string.IsNullOrEmpty(constName) && !string.IsNullOrEmpty(envVar)) + { + mapping[envVar!] = new ConstantNameMapping(constName!); + } + } + } + + return mapping; + } + + private static void GenerateConstDeclaration(StringBuilder sb, ConfigEntry entry, int indentLevel, string? productName = null, Dictionary? nameMapping = null) { var indent = new string(' ', indentLevel * 4); @@ -362,13 +447,29 @@ private static void GenerateConstDeclaration(StringBuilder sb, ConfigEntry entry } } + // Add Obsolete attribute if deprecated + if (!string.IsNullOrEmpty(entry.DeprecationMessage)) + { + // Escape quotes in the deprecation message and trim whitespace + var escapedMessage = entry.DeprecationMessage!.Trim().Replace("\"", "\\\""); + sb.AppendLine($"{indent}[System.Obsolete(\"{escapedMessage}\")]"); + } + // Add const declaration - var constName = KeyToConstName(entry.Key, productName); + var constName = KeyToConstName(entry.Key, ProductNameEquivalents(productName), nameMapping); sb.AppendLine($"{indent}public const string {constName} = \"{entry.Key}\";"); } - private static string KeyToConstName(string key, string? productName = null) + private static string KeyToConstName(string key, string[]? productNames = null, Dictionary? nameMapping = null) { + // First, check if we have a mapping for this key + if (nameMapping != null && nameMapping.TryGetValue(key, out var mapping)) + { + // Use the mapped name from ConfigurationKeys + return mapping.ConstantName; + } + + // Fallback to the original implementation // Remove DD_ or OTEL_ prefix var name = key; var prefixes = new[] { "DD_", "_DD_" }; @@ -391,18 +492,45 @@ private static string KeyToConstName(string key, string? productName = null) var pascalName = string.Concat(parts.Select(p => p.Length > 0 ? char.ToUpper(p[0]) + p.Substring(1).ToLower() : string.Empty)); // Strip product prefix if the const name starts with it - if (!string.IsNullOrEmpty(productName) && !string.IsNullOrEmpty(pascalName)) + if (productNames != null) { - if (pascalName!.Length > productName!.Length && - pascalName.StartsWith(productName, StringComparison.OrdinalIgnoreCase)) + foreach (var productName in productNames) { - pascalName = pascalName.Substring(productName.Length); + if (pascalName!.Length > productName.Length && + pascalName.StartsWith(productName, StringComparison.InvariantCulture)) + { + pascalName = pascalName.Substring(productName.Length); + break; + } } } return pascalName; } + private static string[] ProductNameEquivalents(string? productName) + { + if (string.IsNullOrEmpty(productName)) + { + return new[] { string.Empty }; + } + + // we need to keep comparison case-sensitive as there are keys like TraceRemoveIntegrationServiceNamesEnabled and we don't want to strip Tracer + switch (productName) + { + case "AppSec": + return new[] { "Appsec" }; + case "Tracer": + return new[] { "Trace" }; + case "CiVisibility": + return new[] { "Civisibility" }; + case "OpenTelemetry": + return new[] { "Otel" }; + default: + return new[] { productName! }; + } + } + private static DiagnosticInfo CreateDiagnosticInfo(string id, string title, string message, DiagnosticSeverity severity) { var descriptor = new DiagnosticDescriptor( @@ -418,11 +546,12 @@ private static DiagnosticInfo CreateDiagnosticInfo(string id, string title, stri private readonly struct ConfigEntry : IEquatable { - public ConfigEntry(string key, string documentation, string product) + public ConfigEntry(string key, string documentation, string product, string? deprecationMessage = null) { Key = key; Documentation = documentation; Product = product; + DeprecationMessage = deprecationMessage; } public string Key { get; } @@ -431,22 +560,43 @@ public ConfigEntry(string key, string documentation, string product) public string Product { get; } - public bool Equals(ConfigEntry other) => Key == other.Key && Documentation == other.Documentation && Product == other.Product; + public string? DeprecationMessage { get; } + + public bool Equals(ConfigEntry other) => Key == other.Key && Documentation == other.Documentation && Product == other.Product && DeprecationMessage == other.DeprecationMessage; public override bool Equals(object? obj) => obj is ConfigEntry other && Equals(other); - public override int GetHashCode() => System.HashCode.Combine(Key, Documentation, Product); + public override int GetHashCode() => System.HashCode.Combine(Key, Documentation, Product, DeprecationMessage); + } + + private readonly struct ConstantNameMapping : IEquatable + { + public ConstantNameMapping(string constantName) + { + ConstantName = constantName; + } + + public string ConstantName { get; } + + public bool Equals(ConstantNameMapping other) => ConstantName == other.ConstantName; + + public override bool Equals(object? obj) => obj is ConstantNameMapping other && Equals(other); + + public override int GetHashCode() => ConstantName.GetHashCode(); } private sealed class ConfigurationData : IEquatable { - public ConfigurationData(Dictionary configurations) + public ConfigurationData(Dictionary configurations, Dictionary? nameMapping) { Configurations = configurations; + NameMapping = nameMapping; } public Dictionary Configurations { get; } + public Dictionary? NameMapping { get; } + public bool Equals(ConfigurationData? other) { if (ReferenceEquals(null, other)) @@ -477,6 +627,35 @@ public bool Equals(ConfigurationData? other) } } + // Compare name mappings + if (NameMapping == null && other.NameMapping == null) + { + return true; + } + + if (NameMapping == null || other.NameMapping == null) + { + return false; + } + + if (NameMapping.Count != other.NameMapping.Count) + { + return false; + } + + foreach (var kvp in NameMapping) + { + if (!other.NameMapping.TryGetValue(kvp.Key, out var otherMapping)) + { + return false; + } + + if (!kvp.Value.Equals(otherMapping)) + { + return false; + } + } + return true; } @@ -487,7 +666,7 @@ public override bool Equals(object? obj) public override int GetHashCode() { - return Configurations.Count; + return System.HashCode.Combine(Configurations.Count, NameMapping?.Count ?? 0); } } } diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs index d5da46c3c0bc..99a711a14607 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs +++ b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs @@ -44,4 +44,5 @@ internal class TrackingNames public const string ConfigurationKeysGenMatcherValidData = nameof(ConfigurationKeysGenMatcherValidData); public const string ConfigurationKeysGenAdditionalText = nameof(ConfigurationKeysGenAdditionalText); public const string ConfigurationKeysGenYamlAdditionalText = nameof(ConfigurationKeysGenYamlAdditionalText); + public const string ConfigurationKeysGenMappingAdditionalText = nameof(ConfigurationKeysGenMappingAdditionalText); } diff --git a/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json b/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json new file mode 100644 index 000000000000..b5c878056025 --- /dev/null +++ b/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json @@ -0,0 +1,1072 @@ +{ + "mappings": [ + { + "env_var": "DD_AAS_DOTNET_EXTENSION_VERSION", + "const_name": "SiteExtensionVersionKey" + }, + { + "env_var": "DD_AAS_ENABLE_CUSTOM_METRICS", + "const_name": "AasEnableCustomMetrics" + }, + { + "env_var": "DD_AAS_ENABLE_CUSTOM_TRACING", + "const_name": "AasEnableCustomTracing" + }, + { + "env_var": "DD_AGENT_HOST", + "const_name": "AgentHost" + }, + { + "env_var": "DD_API_KEY", + "const_name": "ApiKey" + }, + { + "env_var": "DD_API_SECURITY_ENABLED", + "const_name": "ApiSecurityEnabled" + }, + { + "env_var": "DD_API_SECURITY_ENDPOINT_COLLECTION_ENABLED", + "const_name": "ApiSecurityEndpointCollectionEnabled" + }, + { + "env_var": "DD_API_SECURITY_ENDPOINT_COLLECTION_MESSAGE_LIMIT", + "const_name": "ApiSecurityEndpointCollectionMessageLimit" + }, + { + "env_var": "DD_API_SECURITY_PARSE_RESPONSE_BODY", + "const_name": "ApiSecurityParseResponseBody" + }, + { + "env_var": "DD_API_SECURITY_SAMPLE_DELAY", + "const_name": "ApiSecuritySampleDelay" + }, + { + "env_var": "DD_APM_ENABLE_RARE_SAMPLER", + "const_name": "RareSamplerEnabled" + }, + { + "env_var": "DD_APM_RECEIVER_PORT", + "const_name": "TraceAgentPortKey" + }, + { + "env_var": "DD_APM_RECEIVER_SOCKET", + "const_name": "TracesUnixDomainSocketPath" + }, + { + "env_var": "DD_APM_TRACING_ENABLED", + "const_name": "ApmTracingEnabled" + }, + { + "env_var": "DD_APPLICATION_MONITORING_CONFIG_FILE_ENABLED", + "const_name": "ApplicationMonitoringConfigFileEnabled" + }, + { + "env_var": "DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING", + "const_name": "UserEventsAutomatedTracking" + }, + { + "env_var": "DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE", + "const_name": "UserEventsAutoInstrumentationMode" + }, + { + "env_var": "DD_APPSEC_ENABLED", + "const_name": "Enabled" + }, + { + "env_var": "DD_APPSEC_EXTRA_HEADERS", + "const_name": "ExtraHeaders" + }, + { + "env_var": "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_HTML", + "const_name": "HtmlBlockedTemplate" + }, + { + "env_var": "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_JSON", + "const_name": "JsonBlockedTemplate" + }, + { + "env_var": "DD_APPSEC_IPHEADER", + "const_name": "CustomIpHeader" + }, + { + "env_var": "DD_APPSEC_KEEP_TRACES", + "const_name": "KeepTraces" + }, + { + "env_var": "DD_APPSEC_MAX_STACK_TRACES", + "const_name": "MaxStackTraces" + }, + { + "env_var": "DD_APPSEC_MAX_STACK_TRACE_DEPTH", + "const_name": "MaxStackTraceDepth" + }, + { + "env_var": "DD_APPSEC_MAX_STACK_TRACE_DEPTH_TOP_PERCENT", + "const_name": "MaxStackTraceDepthTopPercent" + }, + { + "env_var": "DD_APPSEC_OBFUSCATION_PARAMETER_KEY_REGEXP", + "const_name": "ObfuscationParameterKeyRegex" + }, + { + "env_var": "DD_APPSEC_OBFUSCATION_PARAMETER_VALUE_REGEXP", + "const_name": "ObfuscationParameterValueRegex" + }, + { + "env_var": "DD_APPSEC_RASP_ENABLED", + "const_name": "RaspEnabled" + }, + { + "env_var": "DD_APPSEC_RULES", + "const_name": "Rules" + }, + { + "env_var": "DD_APPSEC_SCA_ENABLED", + "const_name": "ScaEnabled" + }, + { + "env_var": "DD_APPSEC_STACK_TRACE_ENABLED", + "const_name": "StackTraceEnabled" + }, + { + "env_var": "DD_APPSEC_TRACE_RATE_LIMIT", + "const_name": "TraceRateLimit" + }, + { + "env_var": "DD_APPSEC_WAF_DEBUG", + "const_name": "WafDebugEnabled" + }, + { + "env_var": "DD_APPSEC_WAF_TIMEOUT", + "const_name": "WafTimeout" + }, + { + "env_var": "DD_AZURE_APP_SERVICES", + "const_name": "AzureAppServicesContextKey" + }, + { + "env_var": "DD_CIVISIBILITY_AGENTLESS_ENABLED", + "const_name": "AgentlessEnabled" + }, + { + "env_var": "DD_CIVISIBILITY_AGENTLESS_URL", + "const_name": "AgentlessUrl" + }, + { + "env_var": "DD_CIVISIBILITY_CODE_COVERAGE_COLLECTORPATH", + "const_name": "CodeCoverageCollectorPath" + }, + { + "env_var": "DD_CIVISIBILITY_CODE_COVERAGE_ENABLED", + "const_name": "CodeCoverage" + }, + { + "env_var": "DD_CIVISIBILITY_CODE_COVERAGE_ENABLE_JIT_OPTIMIZATIONS", + "const_name": "CodeCoverageEnableJitOptimizations" + }, + { + "env_var": "DD_CIVISIBILITY_CODE_COVERAGE_MODE", + "const_name": "CodeCoverageMode" + }, + { + "env_var": "DD_CIVISIBILITY_CODE_COVERAGE_PATH", + "const_name": "CodeCoveragePath" + }, + { + "env_var": "DD_CIVISIBILITY_CODE_COVERAGE_SNK_FILEPATH", + "const_name": "CodeCoverageSnkFile" + }, + { + "env_var": "DD_CIVISIBILITY_DI_ENABLED", + "const_name": "DynamicInstrumentationEnabled" + }, + { + "env_var": "DD_CIVISIBILITY_EARLY_FLAKE_DETECTION_ENABLED", + "const_name": "EarlyFlakeDetectionEnabled" + }, + { + "env_var": "DD_CIVISIBILITY_ENABLED", + "const_name": "Enabled" + }, + { + "env_var": "DD_CIVISIBILITY_EXTERNAL_CODE_COVERAGE_PATH", + "const_name": "ExternalCodeCoveragePath" + }, + { + "env_var": "DD_CIVISIBILITY_FLAKY_RETRY_COUNT", + "const_name": "FlakyRetryCount" + }, + { + "env_var": "DD_CIVISIBILITY_FLAKY_RETRY_ENABLED", + "const_name": "FlakyRetryEnabled" + }, + { + "env_var": "DD_CIVISIBILITY_FORCE_AGENT_EVP_PROXY", + "const_name": "ForceAgentsEvpProxy" + }, + { + "env_var": "DD_CIVISIBILITY_GAC_INSTALL_ENABLED", + "const_name": "InstallDatadogTraceInGac" + }, + { + "env_var": "DD_CIVISIBILITY_GIT_UPLOAD_ENABLED", + "const_name": "GitUploadEnabled" + }, + { + "env_var": "DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED", + "const_name": "ImpactedTestsDetectionEnabled" + }, + { + "env_var": "DD_CIVISIBILITY_ITR_ENABLED", + "const_name": "IntelligentTestRunnerEnabled" + }, + { + "env_var": "DD_CIVISIBILITY_KNOWN_TESTS_ENABLED", + "const_name": "KnownTestsEnabled" + }, + { + "env_var": "DD_CIVISIBILITY_LOGS_ENABLED", + "const_name": "Logs" + }, + { + "env_var": "DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS", + "const_name": "RumFlushWaitMillis" + }, + { + "env_var": "DD_CIVISIBILITY_TESTSSKIPPING_ENABLED", + "const_name": "TestsSkippingEnabled" + }, + { + "env_var": "DD_CIVISIBILITY_TOTAL_FLAKY_RETRY_COUNT", + "const_name": "TotalFlakyRetryCount" + }, + { + "env_var": "DD_CODE_ORIGIN_FOR_SPANS_ENABLED", + "const_name": "CodeOriginForSpansEnabled" + }, + { + "env_var": "DD_CODE_ORIGIN_FOR_SPANS_MAX_USER_FRAMES", + "const_name": "CodeOriginMaxUserFrames" + }, + { + "env_var": "DD_DATA_STREAMS_ENABLED", + "const_name": "Enabled" + }, + { + "env_var": "DD_DATA_STREAMS_LEGACY_HEADERS", + "const_name": "LegacyHeadersEnabled" + }, + { + "env_var": "DD_DBM_PROPAGATION_MODE", + "const_name": "DbmPropagationMode" + }, + { + "env_var": "DD_DIAGNOSTIC_SOURCE_ENABLED", + "const_name": "DiagnosticSourceEnabled" + }, + { + "env_var": "DD_DISABLED_INTEGRATIONS", + "const_name": "DisabledIntegrations" + }, + { + "env_var": "DD_DOGSTATSD_ARGS", + "const_name": "DogStatsDArgs" + }, + { + "env_var": "DD_DOGSTATSD_PATH", + "const_name": "DogStatsDPath" + }, + { + "env_var": "DD_DOGSTATSD_PIPE_NAME", + "const_name": "MetricsPipeName" + }, + { + "env_var": "DD_DOGSTATSD_PORT", + "const_name": "DogStatsdPort" + }, + { + "env_var": "DD_DOGSTATSD_SOCKET", + "const_name": "MetricsUnixDomainSocketPath" + }, + { + "env_var": "DD_DOGSTATSD_URL", + "const_name": "MetricsUri" + }, + { + "env_var": "DD_DYNAMIC_INSTRUMENTATION_DIAGNOSTICS_INTERVAL", + "const_name": "DiagnosticsInterval" + }, + { + "env_var": "DD_DYNAMIC_INSTRUMENTATION_ENABLED", + "const_name": "DynamicInstrumentationEnabled" + }, + { + "env_var": "DD_DYNAMIC_INSTRUMENTATION_MAX_DEPTH_TO_SERIALIZE", + "const_name": "MaxDepthToSerialize" + }, + { + "env_var": "DD_DYNAMIC_INSTRUMENTATION_MAX_TIME_TO_SERIALIZE", + "const_name": "MaxTimeToSerialize" + }, + { + "env_var": "DD_DYNAMIC_INSTRUMENTATION_REDACTED_EXCLUDED_IDENTIFIERS", + "const_name": "RedactedExcludedIdentifiers" + }, + { + "env_var": "DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS", + "const_name": "RedactedIdentifiers" + }, + { + "env_var": "DD_DYNAMIC_INSTRUMENTATION_REDACTED_TYPES", + "const_name": "RedactedTypes" + }, + { + "env_var": "DD_DYNAMIC_INSTRUMENTATION_REDACTION_EXCLUDED_IDENTIFIERS", + "const_name": "RedactionExcludedIdentifiers" + }, + { + "env_var": "DD_DYNAMIC_INSTRUMENTATION_UPLOAD_BATCH_SIZE", + "const_name": "UploadBatchSize" + }, + { + "env_var": "DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL", + "const_name": "UploadFlushInterval" + }, + { + "env_var": "DD_ENV", + "const_name": "Environment" + }, + { + "env_var": "DD_EXCEPTION_DEBUGGING_ENABLED", + "const_name": "ExceptionDebuggingEnabled" + }, + { + "env_var": "DD_EXCEPTION_REPLAY_CAPTURE_FULL_CALLSTACK_ENABLED", + "const_name": "ExceptionReplayCaptureFullCallStackEnabled" + }, + { + "env_var": "DD_EXCEPTION_REPLAY_CAPTURE_MAX_FRAMES", + "const_name": "ExceptionReplayCaptureMaxFrames" + }, + { + "env_var": "DD_EXCEPTION_REPLAY_ENABLED", + "const_name": "ExceptionReplayEnabled" + }, + { + "env_var": "DD_EXCEPTION_REPLAY_MAX_EXCEPTION_ANALYSIS_LIMIT", + "const_name": "MaxExceptionAnalysisLimit" + }, + { + "env_var": "DD_EXCEPTION_REPLAY_RATE_LIMIT_SECONDS", + "const_name": "RateLimitSeconds" + }, + { + "env_var": "DD_EXPERIMENTAL_APPSEC_USE_UNSAFE_ENCODER", + "const_name": "UseUnsafeEncoder" + }, + { + "env_var": "DD_GIT_COMMIT_SHA", + "const_name": "GitCommitSha" + }, + { + "env_var": "DD_GIT_REPOSITORY_URL", + "const_name": "GitRepositoryUrl" + }, + { + "env_var": "DD_HTTP_CLIENT_ERROR_STATUSES", + "const_name": "DeprecatedHttpClientErrorStatusCodes" + }, + { + "env_var": "DD_HTTP_SERVER_ERROR_STATUSES", + "const_name": "DeprecatedHttpServerErrorStatusCodes" + }, + { + "env_var": "DD_HTTP_SERVER_TAG_QUERY_STRING", + "const_name": "QueryStringReportingEnabled" + }, + { + "env_var": "DD_HTTP_SERVER_TAG_QUERY_STRING_SIZE", + "const_name": "QueryStringReportingSize" + }, + { + "env_var": "DD_IAST_COOKIE_FILTER_PATTERN", + "const_name": "CookieFilterRegex" + }, + { + "env_var": "DD_IAST_DB_ROWS_TO_TAINT", + "const_name": "DataBaseRowsToTaint" + }, + { + "env_var": "DD_IAST_DEDUPLICATION_ENABLED", + "const_name": "IsIastDeduplicationEnabled" + }, + { + "env_var": "DD_IAST_ENABLED", + "const_name": "Enabled" + }, + { + "env_var": "DD_IAST_MAX_CONCURRENT_REQUESTS", + "const_name": "MaxConcurrentRequests" + }, + { + "env_var": "DD_IAST_MAX_RANGE_COUNT", + "const_name": "MaxRangeCount" + }, + { + "env_var": "DD_IAST_REDACTION_ENABLED", + "const_name": "RedactionEnabled" + }, + { + "env_var": "DD_IAST_REDACTION_NAME_PATTERN", + "const_name": "RedactionKeysRegex" + }, + { + "env_var": "DD_IAST_REDACTION_VALUE_PATTERN", + "const_name": "RedactionValuesRegex" + }, + { + "env_var": "DD_IAST_REGEXP_TIMEOUT", + "const_name": "RegexTimeout" + }, + { + "env_var": "DD_IAST_REQUEST_SAMPLING", + "const_name": "RequestSampling" + }, + { + "env_var": "DD_IAST_TELEMETRY_VERBOSITY", + "const_name": "TelemetryVerbosity" + }, + { + "env_var": "DD_IAST_TRUNCATION_MAX_VALUE_LENGTH", + "const_name": "TruncationMaxValueLength" + }, + { + "env_var": "DD_IAST_VULNERABILITIES_PER_REQUEST", + "const_name": "VulnerabilitiesPerRequest" + }, + { + "env_var": "DD_IAST_WEAK_CIPHER_ALGORITHMS", + "const_name": "WeakCipherAlgorithms" + }, + { + "env_var": "DD_IAST_WEAK_HASH_ALGORITHMS", + "const_name": "WeakHashAlgorithms" + }, + { + "env_var": "DD_INJECTION_ENABLED", + "const_name": "SsiDeployed" + }, + { + "env_var": "DD_INSTRUMENTATION_TELEMETRY_AGENTLESS_ENABLED", + "const_name": "AgentlessEnabled" + }, + { + "env_var": "DD_INSTRUMENTATION_TELEMETRY_AGENT_PROXY_ENABLED", + "const_name": "AgentProxyEnabled" + }, + { + "env_var": "DD_INSTRUMENTATION_TELEMETRY_ENABLED", + "const_name": "Enabled" + }, + { + "env_var": "DD_INSTRUMENTATION_TELEMETRY_URL", + "const_name": "Uri" + }, + { + "env_var": "DD_INTERNAL_RCM_POLL_INTERVAL", + "const_name": "PollIntervalInternal" + }, + { + "env_var": "DD_INTERNAL_TELEMETRY_DEBUG_ENABLED", + "const_name": "DebugEnabled" + }, + { + "env_var": "DD_INTERNAL_WAIT_FOR_DEBUGGER_ATTACH", + "const_name": "WaitForDebuggerAttach" + }, + { + "env_var": "DD_INTERNAL_WAIT_FOR_NATIVE_DEBUGGER_ATTACH", + "const_name": "WaitForNativeDebuggerAttach" + }, + { + "env_var": "DD_LOGS_DIRECT_SUBMISSION_AZURE_FUNCTIONS_HOST_ENABLED", + "const_name": "AzureFunctionsHostEnabled" + }, + { + "env_var": "DD_LOGS_DIRECT_SUBMISSION_BATCH_PERIOD_SECONDS", + "const_name": "BatchPeriodSeconds" + }, + { + "env_var": "DD_LOGS_DIRECT_SUBMISSION_HOST", + "const_name": "Host" + }, + { + "env_var": "DD_LOGS_DIRECT_SUBMISSION_INTEGRATIONS", + "const_name": "EnabledIntegrations" + }, + { + "env_var": "DD_LOGS_DIRECT_SUBMISSION_MAX_BATCH_SIZE", + "const_name": "BatchSizeLimit" + }, + { + "env_var": "DD_LOGS_DIRECT_SUBMISSION_MAX_QUEUE_SIZE", + "const_name": "QueueSizeLimit" + }, + { + "env_var": "DD_LOGS_DIRECT_SUBMISSION_MINIMUM_LEVEL", + "const_name": "MinimumLevel" + }, + { + "env_var": "DD_LOGS_DIRECT_SUBMISSION_SOURCE", + "const_name": "Source" + }, + { + "env_var": "DD_LOGS_DIRECT_SUBMISSION_TAGS", + "const_name": "GlobalTags" + }, + { + "env_var": "DD_LOGS_DIRECT_SUBMISSION_URL", + "const_name": "Url" + }, + { + "env_var": "DD_LOGS_INJECTION", + "const_name": "LogsInjectionEnabled" + }, + { + "env_var": "DD_MAX_LOGFILE_SIZE", + "const_name": "MaxLogFileSize" + }, + { + "env_var": "DD_MAX_TRACES_PER_SECOND", + "const_name": "MaxTracesSubmittedPerSecond" + }, + { + "env_var": "DD_METRICS_OTEL_ENABLED", + "const_name": "OpenTelemetryMetricsEnabled" + }, + { + "env_var": "DD_METRICS_OTEL_METER_NAMES", + "const_name": "OpenTelemetryMeterNames" + }, + { + "env_var": "DD_PROFILING_CODEHOTSPOTS_ENABLED", + "const_name": "CodeHotspotsEnabled" + }, + { + "env_var": "DD_PROFILING_ENABLED", + "const_name": "ProfilingEnabled" + }, + { + "env_var": "DD_PROFILING_ENDPOINT_COLLECTION_ENABLED", + "const_name": "EndpointProfilingEnabled" + }, + { + "env_var": "DD_PROFILING_MANAGED_ACTIVATION_ENABLED", + "const_name": "ProfilerManagedActivationEnabled" + }, + { + "env_var": "DD_PROXY_HTTPS", + "const_name": "ProxyHttps" + }, + { + "env_var": "DD_PROXY_NO_PROXY", + "const_name": "ProxyNoProxy" + }, + { + "env_var": "DD_REMOTE_CONFIGURATION_ENABLED", + "const_name": "RemoteConfigurationEnabled" + }, + { + "env_var": "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS", + "const_name": "PollInterval" + }, + { + "env_var": "DD_RUNTIME_METRICS_ENABLED", + "const_name": "RuntimeMetricsEnabled" + }, + { + "env_var": "DD_SERVICE", + "const_name": "ServiceName" + }, + { + "env_var": "DD_SITE", + "const_name": "Site" + }, + { + "env_var": "DD_SPAN_SAMPLING_RULES", + "const_name": "SpanSamplingRules" + }, + { + "env_var": "DD_SYMBOL_DATABASE_BATCH_SIZE_BYTES", + "const_name": "SymbolDatabaseBatchSizeInBytes" + }, + { + "env_var": "DD_SYMBOL_DATABASE_COMPRESSION_ENABLED", + "const_name": "SymbolDatabaseCompressionEnabled" + }, + { + "env_var": "DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_EXCLUDES", + "const_name": "SymDbThirdPartyDetectionExcludes" + }, + { + "env_var": "DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_INCLUDES", + "const_name": "SymDbThirdPartyDetectionIncludes" + }, + { + "env_var": "DD_SYMBOL_DATABASE_UPLOAD_ENABLED", + "const_name": "SymbolDatabaseUploadEnabled" + }, + { + "env_var": "DD_TAGS", + "const_name": "GlobalTags" + }, + { + "env_var": "DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED", + "const_name": "DependencyCollectionEnabled" + }, + { + "env_var": "DD_TELEMETRY_HEARTBEAT_INTERVAL", + "const_name": "HeartbeatIntervalSeconds" + }, + { + "env_var": "DD_TELEMETRY_LOG_COLLECTION_ENABLED", + "const_name": "TelemetryLogsEnabled" + }, + { + "env_var": "DD_TELEMETRY_METRICS_ENABLED", + "const_name": "MetricsEnabled" + }, + { + "env_var": "DD_TEST_MANAGEMENT_ATTEMPT_TO_FIX_RETRIES", + "const_name": "TestManagementAttemptToFixRetries" + }, + { + "env_var": "DD_TEST_MANAGEMENT_ENABLED", + "const_name": "TestManagementEnabled" + }, + { + "env_var": "DD_TEST_SESSION_NAME", + "const_name": "TestSessionName" + }, + { + "env_var": "DD_THIRD_PARTY_DETECTION_EXCLUDES", + "const_name": "ThirdPartyDetectionExcludes" + }, + { + "env_var": "DD_THIRD_PARTY_DETECTION_INCLUDES", + "const_name": "ThirdPartyDetectionIncludes" + }, + { + "env_var": "DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED", + "const_name": "TraceId128BitGenerationEnabled" + }, + { + "env_var": "DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED", + "const_name": "TraceId128BitLoggingEnabled" + }, + { + "env_var": "DD_TRACE_ACTIVITY_LISTENER_ENABLED", + "const_name": "ActivityListenerEnabled" + }, + { + "env_var": "DD_TRACE_AGENT_ARGS", + "const_name": "TraceAgentArgs" + }, + { + "env_var": "DD_TRACE_AGENT_PATH", + "const_name": "TraceAgentPath" + }, + { + "env_var": "DD_TRACE_AGENT_PORT", + "const_name": "AgentPort" + }, + { + "env_var": "DD_TRACE_AGENT_URL", + "const_name": "AgentUri" + }, + { + "env_var": "DD_TRACE_ANALYTICS_ENABLED", + "const_name": "GlobalAnalyticsEnabled" + }, + { + "env_var": "DD_TRACE_AWS_ADD_SPAN_POINTERS", + "const_name": "SpanPointersEnabled" + }, + { + "env_var": "DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED", + "const_name": "AzureEventHubsBatchLinksEnabled" + }, + { + "env_var": "DD_TRACE_AZURE_SERVICEBUS_BATCH_LINKS_ENABLED", + "const_name": "AzureServiceBusBatchLinksEnabled" + }, + { + "env_var": "DD_TRACE_BAGGAGE_MAX_BYTES", + "const_name": "BaggageMaximumBytes" + }, + { + "env_var": "DD_TRACE_BAGGAGE_MAX_ITEMS", + "const_name": "BaggageMaximumItems" + }, + { + "env_var": "DD_TRACE_BAGGAGE_TAG_KEYS", + "const_name": "BaggageTagKeys" + }, + { + "env_var": "DD_TRACE_BATCH_INTERVAL", + "const_name": "SerializationBatchInterval" + }, + { + "env_var": "DD_TRACE_BUFFER_SIZE", + "const_name": "BufferSize" + }, + { + "env_var": "DD_TRACE_BYPASS_HTTP_REQUEST_URL_CACHING_ENABLED", + "const_name": "BypassHttpRequestUrlCachingEnabled" + }, + { + "env_var": "DD_TRACE_CLIENT_IP_ENABLED", + "const_name": "IpHeaderEnabled" + }, + { + "env_var": "DD_TRACE_CLIENT_IP_HEADER", + "const_name": "IpHeader" + }, + { + "env_var": "DD_TRACE_COMMANDS_COLLECTION_ENABLED", + "const_name": "CommandsCollectionEnabled" + }, + { + "env_var": "DD_TRACE_CONFIG_FILE", + "const_name": "ConfigurationFileName" + }, + { + "env_var": "DD_TRACE_DATA_PIPELINE_ENABLED", + "const_name": "TraceDataPipelineEnabled" + }, + { + "env_var": "DD_TRACE_DEBUG", + "const_name": "DebugEnabled" + }, + { + "env_var": "DD_TRACE_DEBUG_LOOKUP_FALLBACK", + "const_name": "ForceFallbackLookup" + }, + { + "env_var": "DD_TRACE_DEBUG_LOOKUP_MDTOKEN", + "const_name": "ForceMdTokenLookup" + }, + { + "env_var": "DD_TRACE_DELAY_WCF_INSTRUMENTATION_ENABLED", + "const_name": "DelayWcfInstrumentationEnabled" + }, + { + "env_var": "DD_TRACE_DISABLED_ACTIVITY_SOURCES", + "const_name": "DisabledActivitySources" + }, + { + "env_var": "DD_TRACE_DISABLED_ADONET_COMMAND_TYPES", + "const_name": "DisabledAdoNetCommandTypes" + }, + { + "env_var": "DD_TRACE_ENABLED", + "const_name": "TraceEnabled" + }, + { + "env_var": "DD_TRACE_EXPAND_ROUTE_TEMPLATES_ENABLED", + "const_name": "ExpandRouteTemplatesEnabled" + }, + { + "env_var": "DD_TRACE_EXPERIMENTAL_FEATURES_ENABLED", + "const_name": "ExperimentalFeaturesEnabled" + }, + { + "env_var": "DD_TRACE_GIT_METADATA_ENABLED", + "const_name": "GitMetadataEnabled" + }, + { + "env_var": "DD_TRACE_GRAPHQL_ERROR_EXTENSIONS", + "const_name": "GraphQLErrorExtensions" + }, + { + "env_var": "DD_TRACE_GRPC_TAGS", + "const_name": "GrpcTags" + }, + { + "env_var": "DD_TRACE_HEADER_TAGS", + "const_name": "HeaderTags" + }, + { + "env_var": "DD_TRACE_HEADER_TAG_NORMALIZATION_FIX_ENABLED", + "const_name": "HeaderTagsNormalizationFixEnabled" + }, + { + "env_var": "DD_TRACE_HTTP_CLIENT_ERROR_STATUSES", + "const_name": "HttpClientErrorStatusCodes" + }, + { + "env_var": "DD_TRACE_HTTP_CLIENT_EXCLUDED_URL_SUBSTRINGS", + "const_name": "HttpClientExcludedUrlSubstrings" + }, + { + "env_var": "DD_TRACE_HTTP_SERVER_ERROR_STATUSES", + "const_name": "HttpServerErrorStatusCodes" + }, + { + "env_var": "DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED", + "const_name": "InferredProxySpansEnabled" + }, + { + "env_var": "DD_TRACE_INJECT_CONTEXT_INTO_STORED_PROCEDURES_ENABLED", + "const_name": "InjectContextIntoStoredProceduresEnabled" + }, + { + "env_var": "DD_TRACE_KAFKA_CREATE_CONSUMER_SCOPE_ENABLED", + "const_name": "KafkaCreateConsumerScopeEnabled" + }, + { + "env_var": "DD_TRACE_LOGFILE_RETENTION_DAYS", + "const_name": "LogFileRetentionDays" + }, + { + "env_var": "DD_TRACE_LOGGING_RATE", + "const_name": "LogRateLimit" + }, + { + "env_var": "DD_TRACE_LOG_DIRECTORY", + "const_name": "LogDirectory" + }, + { + "env_var": "DD_TRACE_LOG_SINKS", + "const_name": "LogSinks" + }, + { + "env_var": "DD_TRACE_METHODS", + "const_name": "TraceMethods" + }, + { + "env_var": "DD_TRACE_METRICS_ENABLED", + "const_name": "TracerMetricsEnabled" + }, + { + "env_var": "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP", + "const_name": "ObfuscationQueryStringRegex" + }, + { + "env_var": "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP_TIMEOUT", + "const_name": "ObfuscationQueryStringRegexTimeout" + }, + { + "env_var": "DD_TRACE_OTEL_ENABLED", + "const_name": "OpenTelemetryEnabled" + }, + { + "env_var": "DD_TRACE_PARTIAL_FLUSH_ENABLED", + "const_name": "PartialFlushEnabled" + }, + { + "env_var": "DD_TRACE_PARTIAL_FLUSH_MIN_SPANS", + "const_name": "PartialFlushMinSpans" + }, + { + "env_var": "DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED", + "const_name": "PeerServiceDefaultsEnabled" + }, + { + "env_var": "DD_TRACE_PEER_SERVICE_MAPPING", + "const_name": "PeerServiceNameMappings" + }, + { + "env_var": "DD_TRACE_PIPE_NAME", + "const_name": "TracesPipeName" + }, + { + "env_var": "DD_TRACE_PIPE_TIMEOUT_MS", + "const_name": "TracesPipeTimeoutMs" + }, + { + "env_var": "DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT", + "const_name": "PropagationBehaviorExtract" + }, + { + "env_var": "DD_TRACE_PROPAGATION_EXTRACT_FIRST", + "const_name": "PropagationExtractFirstOnly" + }, + { + "env_var": "DD_TRACE_PROPAGATION_STYLE", + "const_name": "PropagationStyle" + }, + { + "env_var": "DD_TRACE_PROPAGATION_STYLE_EXTRACT", + "const_name": "PropagationStyleExtract" + }, + { + "env_var": "DD_TRACE_PROPAGATION_STYLE_INJECT", + "const_name": "PropagationStyleInject" + }, + { + "env_var": "DD_TRACE_RATE_LIMIT", + "const_name": "TraceRateLimit" + }, + { + "env_var": "DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED", + "const_name": "RemoveClientServiceNamesEnabled" + }, + { + "env_var": "DD_TRACE_ROUTE_TEMPLATE_RESOURCE_NAMES_ENABLED", + "const_name": "RouteTemplateResourceNamesEnabled" + }, + { + "env_var": "DD_TRACE_SAMPLE_RATE", + "const_name": "GlobalSamplingRate" + }, + { + "env_var": "DD_TRACE_SAMPLING_RULES", + "const_name": "CustomSamplingRules" + }, + { + "env_var": "DD_TRACE_SAMPLING_RULES_FORMAT", + "const_name": "CustomSamplingRulesFormat" + }, + { + "env_var": "DD_TRACE_SERVICE_MAPPING", + "const_name": "ServiceNameMappings" + }, + { + "env_var": "DD_TRACE_SPAN_ATTRIBUTE_SCHEMA", + "const_name": "MetadataSchemaVersion" + }, + { + "env_var": "DD_TRACE_STARTUP_LOGS", + "const_name": "StartupDiagnosticLogEnabled" + }, + { + "env_var": "DD_TRACE_STATS_COMPUTATION_ENABLED", + "const_name": "StatsComputationEnabled" + }, + { + "env_var": "DD_TRACE_WCF_RESOURCE_OBFUSCATION_ENABLED", + "const_name": "WcfObfuscationEnabled" + }, + { + "env_var": "DD_TRACE_WCF_WEB_HTTP_RESOURCE_NAMES_ENABLED", + "const_name": "WcfWebHttpResourceNamesEnabled" + }, + { + "env_var": "DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH", + "const_name": "HeaderMaxLength" + }, + { + "env_var": "DD_VERSION", + "const_name": "ServiceVersion" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_ENDPOINT", + "const_name": "ExporterOtlpEndpoint" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_LOGS_TIMEOUT", + "const_name": "ExporterOtlpLogsTimeoutMs" + }, + { + "env_var": "DD_LOGS_OTEL_ENABLED", + "const_name": "OpenTelemetryLogsEnabled" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_LOGS_HEADERS", + "const_name": "ExporterOtlpLogsHeaders" + }, + { + "env_var": "OTEL_LOGS_EXPORTER", + "const_name": "LogsExporter" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT", + "const_name": "ExporterOtlpLogsEndpoint" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_HEADERS", + "const_name": "ExporterOtlpHeaders" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT", + "const_name": "ExporterOtlpMetricsEndpoint" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_METRICS_HEADERS", + "const_name": "ExporterOtlpMetricsHeaders" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + "const_name": "ExporterOtlpMetricsProtocol" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE", + "const_name": "ExporterOtlpMetricsTemporalityPreference" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_METRICS_TIMEOUT", + "const_name": "ExporterOtlpMetricsTimeoutMs" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_PROTOCOL", + "const_name": "ExporterOtlpProtocol" + }, + { + "env_var": "OTEL_EXPORTER_OTLP_TIMEOUT", + "const_name": "ExporterOtlpTimeoutMs" + }, + { + "env_var": "OTEL_LOG_LEVEL", + "const_name": "LogLevel" + }, + { + "env_var": "OTEL_METRICS_EXPORTER", + "const_name": "MetricsExporter" + }, + { + "env_var": "OTEL_METRIC_EXPORT_INTERVAL", + "const_name": "MetricExportIntervalMs" + }, + { + "env_var": "OTEL_METRIC_EXPORT_TIMEOUT", + "const_name": "MetricExportTimeoutMs" + }, + { + "env_var": "OTEL_PROPAGATORS", + "const_name": "Propagators" + }, + { + "env_var": "OTEL_RESOURCE_ATTRIBUTES", + "const_name": "ResourceAttributes" + }, + { + "env_var": "OTEL_SDK_DISABLED", + "const_name": "SdkDisabled" + }, + { + "env_var": "OTEL_SERVICE_NAME", + "const_name": "ServiceName" + }, + { + "env_var": "OTEL_TRACES_EXPORTER", + "const_name": "TracesExporter" + }, + { + "env_var": "OTEL_TRACES_SAMPLER", + "const_name": "TracesSampler" + }, + { + "env_var": "OTEL_TRACES_SAMPLER_ARG", + "const_name": "TracesSamplerArg" + }, + { + "env_var": "_DD_INTERNAL_IS_RUNNING_IN_CIVISIBILITY", + "const_name": "IsRunningInCiVisMode" + }, + { + "env_var": "_DD_TRACE_STATS_COMPUTATION_INTERVAL", + "const_name": "StatsComputationInterval" + } + ] +} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Datadog.Trace.csproj b/tracer/src/Datadog.Trace/Datadog.Trace.csproj index ff3343d6ef5d..e2a5b2b0b66e 100644 --- a/tracer/src/Datadog.Trace/Datadog.Trace.csproj +++ b/tracer/src/Datadog.Trace/Datadog.Trace.csproj @@ -163,6 +163,16 @@ PreserveNewest + + Never + + + + + + + + \ No newline at end of file diff --git a/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs b/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs index ce35cc9f5202..75b62bc85e78 100644 --- a/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs +++ b/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs @@ -20,9 +20,9 @@ public class ConfigurationKeysGeneratorTests // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // // - + #nullable enable - + // This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml // Do not edit this file directly. The source generator will regenerate it on build. // NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. @@ -75,7 +75,7 @@ internal static class Tracer /// Enables or disables the tracer. /// Default is true. /// - public const string TraceEnabled = "DD_TRACE_ENABLED"; + public const string Enabled = "DD_TRACE_ENABLED"; } """; @@ -101,7 +101,7 @@ internal static class OpenTelemetry /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318 /// - public const string OtelExporterOtlpEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT"; + public const string ExporterOtlpEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT"; } """; @@ -147,7 +147,7 @@ public void StripsProductPrefixFromConstNames() "version": "A", "product": "AppSec" }, - "DD_TRACE_INTEGRATION_SERVICE_NAMES_ENABLED": { + "DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED": { "version": "A", "product": "Tracer" } @@ -174,7 +174,7 @@ internal static class AppSec """ internal static class Tracer { - public const string TraceIntegrationServiceNamesEnabled = "DD_TRACE_INTEGRATION_SERVICE_NAMES_ENABLED"; + public const string RemoveIntegrationServiceNamesEnabled = "DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED"; } """; @@ -396,24 +396,24 @@ of correlation identifiers into the logging context. """; const string expectedEnabledOutput = - """ - internal static class Tracer - { - /// - /// Configuration key for enabling or disabling the automatic injection - /// of correlation identifiers into the logging context. - /// - /// - public const string LogsInjection = "DD_LOGS_INJECTION"; - - /// - /// Configuration key for enabling or disabling the Tracer. - /// Default is value is true (enabled). - /// - /// - public const string TraceEnabled = "DD_TRACE_ENABLED"; - } - """; + """ + internal static class Tracer + { + /// + /// Configuration key for enabling or disabling the automatic injection + /// of correlation identifiers into the logging context. + /// + /// + public const string LogsInjection = "DD_LOGS_INJECTION"; + + /// + /// Configuration key for enabling or disabling the Tracer. + /// Default is value is true (enabled). + /// + /// + public const string Enabled = "DD_TRACE_ENABLED"; + } + """; var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( [], @@ -432,4 +432,72 @@ internal static class Tracer tracerOutput!.Should().Contain(expectedEnabledOutput); } + + [Fact] + public void AddsObsoleteAttributeForDeprecatedKeys() + { + const string supportedConfigJson = """ + { + "supportedConfigurations": { + "DD_MAX_TRACES_PER_SECOND": { + "version": "A" + }, + "DD_TRACE_ENABLED": { + "version": "A" + } + }, + "deprecations": { + "DD_MAX_TRACES_PER_SECOND": "This parameter is obsolete and should be replaced by `DD_TRACE_RATE_LIMIT`" + } + } + """; + + const string docsYaml = """ + DD_MAX_TRACES_PER_SECOND: | + Configuration key for the maximum number of traces to submit per second. + + DD_TRACE_ENABLED: | + Enables or disables the tracer. + """; + + const string expectedOutput = + """ + /// + /// String constants for standard Datadog configuration keys. + /// Auto-generated from supported-configurations.json and supported-configurations-docs.yaml + /// + internal static partial class ConfigurationKeys2 + { + /// + /// Configuration key for the maximum number of traces to submit per second. + /// + [System.Obsolete("This parameter is obsolete and should be replaced by `DD_TRACE_RATE_LIMIT`")] + public const string MaxTracesPerSecond = "DD_MAX_TRACES_PER_SECOND"; + + /// + /// Enables or disables the tracer. + /// + public const string TraceEnabled = "DD_TRACE_ENABLED"; + } + + """; + + var (diagnostics, outputs) = TestHelpers.GetGeneratedTrees( + [], + [], + [ + ("supported-configurations.json", supportedConfigJson), + ("supported-configurations-docs.yaml", docsYaml) + ], + assertOutput: false); + + using var s = new AssertionScope(); + diagnostics.Should().BeEmpty(); + + var mainOutput = outputs.FirstOrDefault(o => o.Contains("partial class ConfigurationKeys") && !o.Contains("internal static class")); + mainOutput.Should().NotBeNullOrEmpty(); + + // Deprecated key should have [Obsolete] attribute + mainOutput.Should().Contain(expectedOutput); + } } From 2dfb175b4002b33f1243f69dc7dc6385aebcef1c Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 23 Oct 2025 12:46:57 +0200 Subject: [PATCH 3/9] Commit temporary generated ConfigurationKeys2.cs (will eventually be renamed to ConfigurationKeys.cs) --- .../Configuration/ConfigurationKeys.cs | 5 +- .../ConfigurationKeys2.AppSec.g.cs | 160 ++++ .../ConfigurationKeys2.AzureAppService.g.cs | 32 + .../ConfigurationKeys2.CIVisibility.g.cs | 163 ++++ ...figurationKeys2.DataStreamsMonitoring.g.cs | 31 + .../ConfigurationKeys2.Debug.g.cs | 28 + .../ConfigurationKeys2.Debugger.g.cs | 157 ++++ ...onfigurationKeys2.DirectLogSubmission.g.cs | 84 ++ .../ConfigurationKeys2.FeatureFlags.g.cs | 119 +++ .../ConfigurationKeys2.Iast.g.cs | 113 +++ .../ConfigurationKeys2.OpenTelemetry.g.cs | 187 +++++ .../ConfigurationKeys2.Profiler.g.cs | 26 + .../ConfigurationKeys2.Proxy.g.cs | 29 + .../ConfigurationKeys2.Rcm.g.cs | 34 + .../ConfigurationKeys2.TagPropagation.g.cs | 27 + .../ConfigurationKeys2.Telemetry.g.cs | 81 ++ .../ConfigurationKeys2.g.cs | 736 ++++++++++++++++++ .../ConfigurationKeys2.AppSec.g.cs | 160 ++++ .../ConfigurationKeys2.AzureAppService.g.cs | 32 + .../ConfigurationKeys2.CIVisibility.g.cs | 163 ++++ ...figurationKeys2.DataStreamsMonitoring.g.cs | 31 + .../ConfigurationKeys2.Debug.g.cs | 28 + .../ConfigurationKeys2.Debugger.g.cs | 157 ++++ ...onfigurationKeys2.DirectLogSubmission.g.cs | 84 ++ .../ConfigurationKeys2.FeatureFlags.g.cs | 119 +++ .../ConfigurationKeys2.Iast.g.cs | 113 +++ .../ConfigurationKeys2.OpenTelemetry.g.cs | 187 +++++ .../ConfigurationKeys2.Profiler.g.cs | 26 + .../ConfigurationKeys2.Proxy.g.cs | 29 + .../ConfigurationKeys2.Rcm.g.cs | 34 + .../ConfigurationKeys2.TagPropagation.g.cs | 27 + .../ConfigurationKeys2.Telemetry.g.cs | 81 ++ .../ConfigurationKeys2.g.cs | 736 ++++++++++++++++++ .../ConfigurationKeys2.AppSec.g.cs | 160 ++++ .../ConfigurationKeys2.AzureAppService.g.cs | 32 + .../ConfigurationKeys2.CIVisibility.g.cs | 163 ++++ ...figurationKeys2.DataStreamsMonitoring.g.cs | 31 + .../ConfigurationKeys2.Debug.g.cs | 28 + .../ConfigurationKeys2.Debugger.g.cs | 157 ++++ ...onfigurationKeys2.DirectLogSubmission.g.cs | 84 ++ .../ConfigurationKeys2.FeatureFlags.g.cs | 119 +++ .../ConfigurationKeys2.Iast.g.cs | 113 +++ .../ConfigurationKeys2.OpenTelemetry.g.cs | 187 +++++ .../ConfigurationKeys2.Profiler.g.cs | 26 + .../ConfigurationKeys2.Proxy.g.cs | 29 + .../ConfigurationKeys2.Rcm.g.cs | 34 + .../ConfigurationKeys2.TagPropagation.g.cs | 27 + .../ConfigurationKeys2.Telemetry.g.cs | 81 ++ .../ConfigurationKeys2.g.cs | 736 ++++++++++++++++++ .../ConfigurationKeys2.AppSec.g.cs | 160 ++++ .../ConfigurationKeys2.AzureAppService.g.cs | 32 + .../ConfigurationKeys2.CIVisibility.g.cs | 163 ++++ ...figurationKeys2.DataStreamsMonitoring.g.cs | 31 + .../ConfigurationKeys2.Debug.g.cs | 28 + .../ConfigurationKeys2.Debugger.g.cs | 157 ++++ ...onfigurationKeys2.DirectLogSubmission.g.cs | 84 ++ .../ConfigurationKeys2.FeatureFlags.g.cs | 119 +++ .../ConfigurationKeys2.Iast.g.cs | 113 +++ .../ConfigurationKeys2.OpenTelemetry.g.cs | 187 +++++ .../ConfigurationKeys2.Profiler.g.cs | 26 + .../ConfigurationKeys2.Proxy.g.cs | 29 + .../ConfigurationKeys2.Rcm.g.cs | 34 + .../ConfigurationKeys2.TagPropagation.g.cs | 27 + .../ConfigurationKeys2.Telemetry.g.cs | 81 ++ .../ConfigurationKeys2.g.cs | 736 ++++++++++++++++++ 65 files changed, 8032 insertions(+), 1 deletion(-) create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs create mode 100644 tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs diff --git a/tracer/src/Datadog.Trace/Configuration/ConfigurationKeys.cs b/tracer/src/Datadog.Trace/Configuration/ConfigurationKeys.cs index f9e5994d85e6..b346757dd77a 100644 --- a/tracer/src/Datadog.Trace/Configuration/ConfigurationKeys.cs +++ b/tracer/src/Datadog.Trace/Configuration/ConfigurationKeys.cs @@ -14,6 +14,9 @@ namespace Datadog.Trace.Configuration /// internal static partial class ConfigurationKeys { + // temporary so that ConfigurationKeys2 can resolve reference, all this is removed later + public const string TraceLogPath = "DD_TRACE_LOG_PATH"; + /// /// Configuration key to enable experimental features. /// @@ -994,7 +997,7 @@ internal static class DataStreamsMonitoring /// Configuration key for enabling legacy binary headers in Data Streams Monitoring. /// false by default if DSM is in default state, true otherwise /// - /// + /// public const string LegacyHeadersEnabled = "DD_DATA_STREAMS_LEGACY_HEADERS"; } } diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs new file mode 100644 index 000000000000..482c940fe668 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs @@ -0,0 +1,160 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class AppSec + { + /// + /// When ASM is enabled, collects in spans endpoints apis schemas analyzed by the waf, default value is true. + /// + public const string ApiSecurityEnabled = "DD_API_SECURITY_ENABLED"; + + /// + /// with a default value of true, it allows a customer to disable the collection of endpoints for API Security. + /// + public const string ApiSecurityEndpointCollectionEnabled = "DD_API_SECURITY_ENDPOINT_COLLECTION_ENABLED"; + + /// + /// with a default value of 300, it defines the maximum number of endpoints to be collected (serialized) for API Security. + /// + public const string ApiSecurityEndpointCollectionMessageLimit = "DD_API_SECURITY_ENDPOINT_COLLECTION_MESSAGE_LIMIT"; + + /// + /// Enables the parsing of the response body in the API Security module. Defaults to true + /// + public const string ApiSecurityParseResponseBody = "DD_API_SECURITY_PARSE_RESPONSE_BODY"; + + /// + /// Api security sample delay in seconds , should be a float. Set to 0 for testing purposes. default value of 30. + /// + public const string ApiSecuritySampleDelay = "DD_API_SECURITY_SAMPLE_DELAY"; + + /// + /// Automatic instrumentation of user event mode. Values can be ident, disabled, anon. + /// + public const string UserEventsAutoInstrumentationMode = "DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE"; + + /// + /// Deprecate. Automatic tracking of user events mode. Values can be disabled, safe or extended. + /// This config is in the process of being deprecated. Please use DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE + /// instead. + /// Values will be automatically translated: + /// disabled = disabled + /// safe = anon + /// extended = ident + /// + public const string UserEventsAutomatedTracking = "DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING"; + + /// + /// Configuration key for enabling or disabling the AppSec. + /// Default is value is false (disabled). + /// + public const string Enabled = "DD_APPSEC_ENABLED"; + + /// + /// Comma separated keys indicating the optional custom headers the user wants to send. + /// Default is value is null. + /// + public const string ExtraHeaders = "DD_APPSEC_EXTRA_HEADERS"; + + /// + /// Blocking response template for HTML content. This template is used in combination with the status code to craft and send a response upon blocking the request. + /// + public const string HtmlBlockedTemplate = "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_HTML"; + + /// + /// Blocking response template for Json content. This template is used in combination with the status code to craft and send a response upon blocking the request. + /// + public const string JsonBlockedTemplate = "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_JSON"; + + /// + /// Configuration key indicating the optional name of the custom header to take into account for the ip address. + /// Default is value is null (do not override). + /// + public const string CustomIpHeader = "DD_APPSEC_IPHEADER"; + + /// + /// Specifies if the AppSec traces should be explicitly kept or dropped. + /// Default is true, to keep all traces, false means drop all traces (by setting AutoReject as sampling priority). + /// For internal testing only. + /// + public const string KeepTraces = "DD_APPSEC_KEEP_TRACES"; + + /// + /// with a default value of 32, defines the maximum depth of a stack trace to be reported due to RASP events. O for unlimited. + /// + public const string MaxStackTraceDepth = "DD_APPSEC_MAX_STACK_TRACE_DEPTH"; + + /// + /// with a default value of 75, defines the percentage of frames taken from the top of the stack when trimming. Min 0, Max 100 + /// + public const string MaxStackTraceDepthTopPercent = "DD_APPSEC_MAX_STACK_TRACE_DEPTH_TOP_PERCENT"; + + /// + /// with a default value of 2, defines the maximum number of stack traces to be reported due to RASP events. 0 for unlimited. + /// + public const string MaxStackTraces = "DD_APPSEC_MAX_STACK_TRACES"; + + /// + /// The regex that will be used to obfuscate possible sensitive data in keys that are highlighted WAF as potentially malicious + /// + public const string ObfuscationParameterKeyRegex = "DD_APPSEC_OBFUSCATION_PARAMETER_KEY_REGEXP"; + + /// + /// The regex that will be used to obfuscate possible sensitive data in values that are highlighted WAF as potentially malicious + /// + public const string ObfuscationParameterValueRegex = "DD_APPSEC_OBFUSCATION_PARAMETER_VALUE_REGEXP"; + + /// + /// default value to true. Set to false to disable exploit prevention. + /// + public const string RaspEnabled = "DD_APPSEC_RASP_ENABLED"; + + /// + /// Override the default rules file provided. Must be a path to a valid JSON rules file. + /// Default is value is null (do not override). + /// + public const string Rules = "DD_APPSEC_RULES"; + + /// + /// Activate SCA (Software Composition Analysis), used in the backend + /// + public const string ScaEnabled = "DD_APPSEC_SCA_ENABLED"; + + /// + /// with a default value of true, it allows a customer to disable the generation of stack traces, for any ASM-specific purpose such as RASP. + /// + public const string StackTraceEnabled = "DD_APPSEC_STACK_TRACE_ENABLED"; + + /// + /// Limits the amount of AppSec traces sent per second with an integer value, strictly positive. + /// + public const string TraceRateLimit = "DD_APPSEC_TRACE_RATE_LIMIT"; + + /// + /// Activate debug logs for the WAF + /// + public const string WafDebugEnabled = "DD_APPSEC_WAF_DEBUG"; + + /// + /// WAF timeout in microseconds of each WAF execution (the timeout value passed to ddwaf_run). + /// + public const string WafTimeout = "DD_APPSEC_WAF_TIMEOUT"; + + /// + /// Use new unsafe encoder for the waf + /// + public const string UseUnsafeEncoder = "DD_EXPERIMENTAL_APPSEC_USE_UNSAFE_ENCODER"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs new file mode 100644 index 000000000000..38658802fc64 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs @@ -0,0 +1,32 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class AzureAppService + { + public const string SiteExtensionVersionKey = "DD_AAS_DOTNET_EXTENSION_VERSION"; + + /// + /// Used to force the loader to start dogstatsd (in case automatic instrumentation is disabled) + /// + public const string AasEnableCustomMetrics = "DD_AAS_ENABLE_CUSTOM_METRICS"; + + /// + /// Used to force the loader to start the trace agent (in case automatic instrumentation is disabled) + /// + public const string AasEnableCustomTracing = "DD_AAS_ENABLE_CUSTOM_TRACING"; + + public const string AzureAppServicesContextKey = "DD_AZURE_APP_SERVICES"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs new file mode 100644 index 000000000000..050fb9cac569 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs @@ -0,0 +1,163 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class CIVisibility + { + /// + /// An internal key used to "tell" tracer settings that we're running in CI Visibility mode + /// + public const string IsRunningInCiVisMode = "_DD_INTERNAL_IS_RUNNING_IN_CIVISIBILITY"; + + /// + /// Configuration key for enabling or disabling Agentless in CI Visibility. + /// Default value is false (disabled). + /// + public const string AgentlessEnabled = "DD_CIVISIBILITY_AGENTLESS_ENABLED"; + + /// + /// Configuration key for setting the agentless url endpoint + /// + public const string AgentlessUrl = "DD_CIVISIBILITY_AGENTLESS_URL"; + + /// + /// Configuration key for setting the code coverage collector path + /// + public const string CodeCoverageCollectorPath = "DD_CIVISIBILITY_CODE_COVERAGE_COLLECTORPATH"; + + /// + /// Configuration key for enabling or disabling jit optimizations in the Code Coverage + /// + public const string CodeCoverageEnableJitOptimizations = "DD_CIVISIBILITY_CODE_COVERAGE_ENABLE_JIT_OPTIMIZATIONS"; + + /// + /// Configuration key for enabling or disabling Code Coverage in CI Visibility. + /// + public const string CodeCoverage = "DD_CIVISIBILITY_CODE_COVERAGE_ENABLED"; + + /// + /// Configuration key for selecting the code coverage mode LineExecution or LineCallCount + /// + public const string CodeCoverageMode = "DD_CIVISIBILITY_CODE_COVERAGE_MODE"; + + /// + /// Configuration key for setting the code coverage jsons destination path. + /// + public const string CodeCoveragePath = "DD_CIVISIBILITY_CODE_COVERAGE_PATH"; + + /// + /// Configuration key for re-signing assemblies after the Code Coverage modification. + /// + public const string CodeCoverageSnkFile = "DD_CIVISIBILITY_CODE_COVERAGE_SNK_FILEPATH"; + + /// + /// Configuration key for a kill-switch that allows to explicitly disable dynamic instrumentation even if the remote setting is enabled. + /// + public const string DynamicInstrumentationEnabled = "DD_CIVISIBILITY_DI_ENABLED"; + + /// + /// Configuration key for enabling or disabling the early flake detection feature in CI Visibility + /// + public const string EarlyFlakeDetectionEnabled = "DD_CIVISIBILITY_EARLY_FLAKE_DETECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling CI Visibility. + /// Default value is false (disabled). + /// + public const string Enabled = "DD_CIVISIBILITY_ENABLED"; + + /// + /// Configuration key for setting the external code coverage file path + /// + public const string ExternalCodeCoveragePath = "DD_CIVISIBILITY_EXTERNAL_CODE_COVERAGE_PATH"; + + /// + /// Configuration key for the maximum number of retry attempts for a single test case. + /// + public const string FlakyRetryCount = "DD_CIVISIBILITY_FLAKY_RETRY_COUNT"; + + /// + /// Configuration key for a kill-switch that allows to explicitly disable retries even if the remote setting is enabled. + /// + public const string FlakyRetryEnabled = "DD_CIVISIBILITY_FLAKY_RETRY_ENABLED"; + + /// + /// Configuration key for forcing Agent's EVP Proxy + /// + public const string ForceAgentsEvpProxy = "DD_CIVISIBILITY_FORCE_AGENT_EVP_PROXY"; + + /// + /// Configuration key for enabling or disabling Datadog.Trace GAC installation + /// + public const string InstallDatadogTraceInGac = "DD_CIVISIBILITY_GAC_INSTALL_ENABLED"; + + /// + /// Configuration key for enabling or disabling Uploading Git Metadata in CI Visibility + /// Default Value is false (disabled) + /// + public const string GitUploadEnabled = "DD_CIVISIBILITY_GIT_UPLOAD_ENABLED"; + + /// + /// Configuration key for enabling Impacted Tests Detection. + /// + public const string ImpactedTestsDetectionEnabled = "DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling Intelligent Test Runner in CI Visibility + /// Default Value is false (disabled) + /// + public const string IntelligentTestRunnerEnabled = "DD_CIVISIBILITY_ITR_ENABLED"; + + /// + /// Configuration key for enabling or disabling the known tests feature in CI Visibility + /// + public const string KnownTestsEnabled = "DD_CIVISIBILITY_KNOWN_TESTS_ENABLED"; + + /// + /// Configuration key for enabling or disabling Logs direct submission. + /// Default value is false (disabled). + /// + public const string Logs = "DD_CIVISIBILITY_LOGS_ENABLED"; + + /// + /// Configuration key for set the rum flushing wait in milliseconds + /// + public const string RumFlushWaitMillis = "DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS"; + + /// + /// Configuration key for enabling or disabling Intelligent Test Runner test skipping feature in CI Visibility + /// + public const string TestsSkippingEnabled = "DD_CIVISIBILITY_TESTSSKIPPING_ENABLED"; + + /// + /// Configuration key for the maximum number of retry attempts for the entire session. + /// + public const string TotalFlakyRetryCount = "DD_CIVISIBILITY_TOTAL_FLAKY_RETRY_COUNT"; + + /// + /// Configuration key for the number of retries to fix a flaky test. + /// + public const string TestManagementAttemptToFixRetries = "DD_TEST_MANAGEMENT_ATTEMPT_TO_FIX_RETRIES"; + + /// + /// Configuration key for enabling or disabling the Test Management feature. + /// + public const string TestManagementEnabled = "DD_TEST_MANAGEMENT_ENABLED"; + + /// + /// Configuration key for set the test session name + /// + public const string TestSessionName = "DD_TEST_SESSION_NAME"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs new file mode 100644 index 000000000000..2c29ca80c29f --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs @@ -0,0 +1,31 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class DataStreamsMonitoring + { + /// + /// Enables data streams monitoring support + /// + /// + public const string Enabled = "DD_DATA_STREAMS_ENABLED"; + + /// + /// Configuration key for enabling legacy binary headers in Data Streams Monitoring. + /// false by default if DSM is in default state, true otherwise + /// + /// + public const string LegacyHeadersEnabled = "DD_DATA_STREAMS_LEGACY_HEADERS"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs new file mode 100644 index 000000000000..41d60c3ccd61 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs @@ -0,0 +1,28 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Debug + { + /// + /// Configuration key for forcing the automatic instrumentation to only use the fallback method lookup mechanism. + /// + public const string ForceFallbackLookup = "DD_TRACE_DEBUG_LOOKUP_FALLBACK"; + + /// + /// Configuration key for forcing the automatic instrumentation to only use the mdToken method lookup mechanism. + /// + public const string ForceMdTokenLookup = "DD_TRACE_DEBUG_LOOKUP_MDTOKEN"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs new file mode 100644 index 000000000000..b83f273e5822 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs @@ -0,0 +1,157 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Debugger + { + /// + /// Configuration key to enable tag code origin for span. + /// Default value is false. + /// + public const string CodeOriginForSpansEnabled = "DD_CODE_ORIGIN_FOR_SPANS_ENABLED"; + + /// + /// Configuration key for setting the number of frames to be tagged in exit span code origin. + /// Default value is 8. + /// + public const string CodeOriginMaxUserFrames = "DD_CODE_ORIGIN_FOR_SPANS_MAX_USER_FRAMES"; + + /// + /// Configuration key for the interval (in seconds) between sending probe statuses. + /// Default value is 3600. + /// + public const string DiagnosticsInterval = "DD_DYNAMIC_INSTRUMENTATION_DIAGNOSTICS_INTERVAL"; + + /// + /// Configuration key for enabling or disabling Dynamic Instrumentation. + /// Default value is false (disabled). + /// + public const string DynamicInstrumentationEnabled = "DD_DYNAMIC_INSTRUMENTATION_ENABLED"; + + /// + /// Configuration key for the max object depth to serialize for probe snapshots. + /// Default value is 1. + /// + public const string MaxDepthToSerialize = "DD_DYNAMIC_INSTRUMENTATION_MAX_DEPTH_TO_SERIALIZE"; + + /// + /// Configuration key for the maximum duration (in milliseconds) to run serialization for probe snapshots. + /// Default value is 150 ms. + /// + public const string MaxTimeToSerialize = "DD_DYNAMIC_INSTRUMENTATION_MAX_TIME_TO_SERIALIZE"; + + /// + /// Configuration key for set of identifiers that are excluded from redaction decisions. + /// + public const string RedactedExcludedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_EXCLUDED_IDENTIFIERS"; + + /// + /// Configuration key for set of identifiers that are used in redaction decisions. + /// + public const string RedactedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS"; + + /// + /// Configuration key for set of types that are used in redaction decisions. + /// + public const string RedactedTypes = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_TYPES"; + + /// + /// Configuration key for set of identifiers that are excluded from redaction decisions. + /// + public const string RedactionExcludedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTION_EXCLUDED_IDENTIFIERS"; + + /// + /// Configuration key for the maximum upload batch size. + /// Default value is 100. + /// + public const string UploadBatchSize = "DD_DYNAMIC_INSTRUMENTATION_UPLOAD_BATCH_SIZE"; + + /// + /// Configuration key for the interval (in milliseconds) between flushing statuses. + /// Default value is 0 (dynamic). + /// + public const string UploadFlushInterval = "DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL"; + + /// + /// Configuration key to enable capturing the variables of all the frames in exception call stack. + /// Default value is false. + /// + public const string ExceptionReplayCaptureFullCallStackEnabled = "DD_EXCEPTION_REPLAY_CAPTURE_FULL_CALLSTACK_ENABLED"; + + /// + /// Configuration key for the maximum number of frames in a call stack we would like to capture values for. + /// + public const string ExceptionReplayCaptureMaxFrames = "DD_EXCEPTION_REPLAY_CAPTURE_MAX_FRAMES"; + + /// + /// Configuration key for enabling or disabling Exception Replay. + /// Default value is false (disabled). + /// + public const string ExceptionReplayEnabled = "DD_EXCEPTION_REPLAY_ENABLED"; + + /// + /// Configuration key for setting the maximum number of exceptions to be analyzed by Exception Replay within a 1-second time interval. + /// Default value is 100. + /// + public const string MaxExceptionAnalysisLimit = "DD_EXCEPTION_REPLAY_MAX_EXCEPTION_ANALYSIS_LIMIT"; + + /// + /// Configuration key for the interval used to track exceptions + /// Default value is 1h. + /// + public const string RateLimitSeconds = "DD_EXCEPTION_REPLAY_RATE_LIMIT_SECONDS"; + + /// + /// Configuration key for the maximum symbol size to upload (in bytes). + /// Default value is 1 mb. + /// + public const string SymbolDatabaseBatchSizeInBytes = "DD_SYMBOL_DATABASE_BATCH_SIZE_BYTES"; + + /// + /// Configuration key for enabling or disabling compression for symbols payload. + /// Default value is true (enabled). + /// + public const string SymbolDatabaseCompressionEnabled = "DD_SYMBOL_DATABASE_COMPRESSION_ENABLED"; + + /// + /// Configuration key for a separated comma list of libraries to exclude in the 3rd party detection + /// Default value is empty. + /// + public const string SymDbThirdPartyDetectionExcludes = "DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_EXCLUDES"; + + /// + /// Configuration key for a separated comma list of libraries to include in the 3rd party detection + /// Default value is empty. + /// + public const string SymDbThirdPartyDetectionIncludes = "DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_INCLUDES"; + + /// + /// Configuration key for allowing upload of symbol data (such as method names, parameter names, etc) to Datadog. + /// Default value is true (enabled). + /// + public const string SymbolDatabaseUploadEnabled = "DD_SYMBOL_DATABASE_UPLOAD_ENABLED"; + + /// + /// Configuration key for a separated comma list of libraries to exclude for the 3rd party detection + /// Default value is empty. + /// + public const string ThirdPartyDetectionExcludes = "DD_THIRD_PARTY_DETECTION_EXCLUDES"; + + /// + /// Configuration key for a separated comma list of libraries to include in the 3rd party detection + /// Default value is empty. + /// + public const string ThirdPartyDetectionIncludes = "DD_THIRD_PARTY_DETECTION_INCLUDES"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs new file mode 100644 index 000000000000..ac45d3790064 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs @@ -0,0 +1,84 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class DirectLogSubmission + { + /// + /// Configuration key to enable or disable direct log submission for Azure Functions host. + /// Default value is false. + /// + public const string AzureFunctionsHostEnabled = "DD_LOGS_DIRECT_SUBMISSION_AZURE_FUNCTIONS_HOST_ENABLED"; + + /// + /// Configuration key for the time to wait between checking for batches + /// Default value is 2s. + /// + public const string BatchPeriodSeconds = "DD_LOGS_DIRECT_SUBMISSION_BATCH_PERIOD_SECONDS"; + + /// + /// Set the name of the originating host for direct logs submission. + /// Required for direct logs submission (default is machine name). + /// + public const string Host = "DD_LOGS_DIRECT_SUBMISSION_HOST"; + + /// + /// Configuration key for a list of direct log submission integrations to enable. + /// Only selected integrations are enabled for direct log submission + /// Default is empty (direct log submission disabled). + /// Supports multiple values separated with semi-colons. + /// + public const string EnabledIntegrations = "DD_LOGS_DIRECT_SUBMISSION_INTEGRATIONS"; + + /// + /// Configuration key for the maximum number of logs to send at one time + /// Default value is 1,000, the maximum accepted by the Datadog log API + /// + public const string BatchSizeLimit = "DD_LOGS_DIRECT_SUBMISSION_MAX_BATCH_SIZE"; + + /// + /// Configuration key for the maximum number of logs to hold in internal queue at any one time + /// Default value is 100,000. + /// + public const string QueueSizeLimit = "DD_LOGS_DIRECT_SUBMISSION_MAX_QUEUE_SIZE"; + + /// + /// Configuration key for the minimum level logs should have to be sent to the intake. + /// Default value is Information. + /// Should be one of Verbose,Debug,Information,Warning,Error,Fatal + /// + public const string MinimumLevel = "DD_LOGS_DIRECT_SUBMISSION_MINIMUM_LEVEL"; + + /// + /// Set the originating source for direct logs submission. + /// Default is 'csharp' + /// + public const string Source = "DD_LOGS_DIRECT_SUBMISSION_SOURCE"; + + /// + /// Configuration key for a list of tags to be applied globally to all logs directly submitted. + /// Supports multiple key key-value pairs which are comma-separated, and for which the key and + /// value are colon-separated. For example Key1:Value1, Key2:Value2. If not provided, + /// are used instead + /// + public const string GlobalTags = "DD_LOGS_DIRECT_SUBMISSION_TAGS"; + + /// + /// Configuration key for the url to send logs to. + /// Default value uses the domain set in , so defaults to + /// https://http-intake.logs.datadoghq.com:443. + /// + public const string Url = "DD_LOGS_DIRECT_SUBMISSION_URL"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs new file mode 100644 index 000000000000..45544f8f1af7 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs @@ -0,0 +1,119 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class FeatureFlags + { + /// + /// Enables support for collecting and exporting logs generated by the the OpenTelemetry Logs API. + /// This feature is available starting with .NET 3.1 when using Microsoft.Extensions.Logging + /// + public const string OpenTelemetryLogsEnabled = "DD_LOGS_OTEL_ENABLED"; + + /// + /// Enables experimental support for exporting OTLP metrics generated by the OpenTelemetry Metrics API. + /// This feature is only available starting with .NET 6.0, as it relies on the BCL class MeterListener + /// which is shipped in-box starting with .NET 6. + /// + public const string OpenTelemetryMetricsEnabled = "DD_METRICS_OTEL_ENABLED"; + + /// + /// List of meters to add to the metrics exporter for the experimental OpenTelemetry Metrics API support. + /// + public const string OpenTelemetryMeterNames = "DD_METRICS_OTEL_METER_NAMES"; + + /// + /// Enables generating 128-bit trace ids instead of 64-bit trace ids. + /// Note that a 128-bit trace id may be received from an upstream service or from + /// an Activity even if we are not generating them ourselves. + /// Default value is true (enabled). + /// + public const string TraceId128BitGenerationEnabled = "DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED"; + + /// + /// Enables injecting 128-bit trace ids into logs as a hexadecimal string. + /// If disabled, 128-bit trace ids will be truncated to the lower 64 bits, + /// and injected as decimal strings. 64-bit trace ids are + /// always injected as decimal strings, regardless of this setting. + /// If unset, this configuration will take the value of the configuration, + /// which is true by default. + /// Note: This configuration can be set independently of the configuration, + /// 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 + /// services may contain 128-bit trace ids. + /// + public const string TraceId128BitLoggingEnabled = "DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED"; + + public const string BypassHttpRequestUrlCachingEnabled = "DD_TRACE_BYPASS_HTTP_REQUEST_URL_CACHING_ENABLED"; + + public const string CommandsCollectionEnabled = "DD_TRACE_COMMANDS_COLLECTION_ENABLED"; + + /// + /// Configuration key to enable or disable the updated WCF instrumentation that delays execution + /// until later in the WCF pipeline when the WCF server exception handling is established. + /// + /// + public const string DelayWcfInstrumentationEnabled = "DD_TRACE_DELAY_WCF_INSTRUMENTATION_ENABLED"; + + /// + /// Enables a fix for header tags normalization. + /// We used to normalize tag names even if they were specified in user configuration, but we should not. + /// Default value is true. + /// + public const string HeaderTagsNormalizationFixEnabled = "DD_TRACE_HEADER_TAG_NORMALIZATION_FIX_ENABLED"; + + public const string InferredProxySpansEnabled = "DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED"; + + /// + /// Configuration key to enable or disable the injection of the Datadog trace context into stored procedures. + /// Default value is false (enabled). + /// When enabled, Datadog trace context will be injected into individual stored procedure calls when the following requirements are met: + ///
    + ///
  • The database is Microsoft SQL Server and is set to + /// service or + /// full.
  • + ///
  • The stored procedure call does not have Output, InputOutput, or Return ADO.NET command parameters.
  • + ///
+ ///
+ public const string InjectContextIntoStoredProceduresEnabled = "DD_TRACE_INJECT_CONTEXT_INTO_STORED_PROCEDURES_ENABLED"; + + /// + /// Enables beta support for instrumentation via the System.Diagnostics API and the OpenTelemetry SDK. + /// + public const string OpenTelemetryEnabled = "DD_TRACE_OTEL_ENABLED"; + + /// + /// Feature Flag: enables updated resource names on `aspnet.request`, `aspnet-mvc.request`, + /// `aspnet-webapi.request`, and `aspnet_core.request` spans. Enables `aspnet_core_mvc.request` spans and + /// additional features on `aspnet_core.request` spans. + /// + /// + public const string RouteTemplateResourceNamesEnabled = "DD_TRACE_ROUTE_TEMPLATE_RESOURCE_NAMES_ENABLED"; + + /// + /// Feature flag to enable obfuscating the LocalPath of a WCF request that goes + /// into the resourceName of a span. + /// Note: that this only applies when the WCF action is an empty string. + /// + /// + public const string WcfObfuscationEnabled = "DD_TRACE_WCF_RESOURCE_OBFUSCATION_ENABLED"; + + /// + /// Configuration key to enable or disable improved template-based resource names + /// when using WCF Web HTTP. Requires be set + /// to true. Enabled by default + /// + /// + public const string WcfWebHttpResourceNamesEnabled = "DD_TRACE_WCF_WEB_HTTP_RESOURCE_NAMES_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs new file mode 100644 index 000000000000..70d5e7dc0eb5 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs @@ -0,0 +1,113 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Iast + { + /// + /// Configuration key for number of rows to taint on each Db query in IAST. + /// Default value is 1 + /// + public const string CookieFilterRegex = "DD_IAST_COOKIE_FILTER_PATTERN"; + + /// + /// Configuration key for number of rows to taint on each Db query in IAST. + /// Default value is 1 + /// + public const string DataBaseRowsToTaint = "DD_IAST_DB_ROWS_TO_TAINT"; + + /// + /// Configuration key for enabling or disabling the vulnerability duplication detection. + /// When enabled, a vulnerability will only be reported once in the lifetime of an app, + /// instead of on every usage. Default is value is true (enabled). + /// + public const string IsIastDeduplicationEnabled = "DD_IAST_DEDUPLICATION_ENABLED"; + + /// + /// Configuration key for enabling or disabling the IAST. + /// Default is value is false (disabled). + /// + public const string Enabled = "DD_IAST_ENABLED"; + + /// + /// Configuration key for the maximum number of requests + /// to be analyzed by IAST concurrently. Defaults to 2. + /// + public const string MaxConcurrentRequests = "DD_IAST_MAX_CONCURRENT_REQUESTS"; + + /// + /// Configuration key for the maximum number of ranges + /// a tainted object can hold. Defaults to 10. + /// + public const string MaxRangeCount = "DD_IAST_MAX_RANGE_COUNT"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source keys. + /// Default value is in TracerSettings + /// + public const string RedactionEnabled = "DD_IAST_REDACTION_ENABLED"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source keys. + /// Default value is in TracerSettings + /// + public const string RedactionKeysRegex = "DD_IAST_REDACTION_NAME_PATTERN"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source values. + /// Default value is in TracerSettings + /// + public const string RedactionValuesRegex = "DD_IAST_REDACTION_VALUE_PATTERN"; + + /// + /// Configuration key for specifying a timeout in milliseconds to the execution of regexes in IAST + /// Default value is 200ms + /// + public const string RegexTimeout = "DD_IAST_REGEXP_TIMEOUT"; + + /// + /// Configuration key for controlling the percentage of requests + /// to be analyzed by IAST, between 1 and 100. Defaults to 30. + /// + public const string RequestSampling = "DD_IAST_REQUEST_SAMPLING"; + + /// + /// Configuration key for IAST verbosity. + /// Default value is INFORMATION + /// + public const string TelemetryVerbosity = "DD_IAST_TELEMETRY_VERBOSITY"; + + /// + /// Configuration key for IAST evidence max lenght in chars. + /// Default value is 250 + /// + public const string TruncationMaxValueLength = "DD_IAST_TRUNCATION_MAX_VALUE_LENGTH"; + + /// + /// Configuration key for the maximum number of IAST vulnerabilities to + /// detect in a request. Defaults to 2. + /// + public const string VulnerabilitiesPerRequest = "DD_IAST_VULNERABILITIES_PER_REQUEST"; + + /// + /// Configuration key for controlling which weak cipher algorithms are reported. + /// + public const string WeakCipherAlgorithms = "DD_IAST_WEAK_CIPHER_ALGORITHMS"; + + /// + /// Configuration key for controlling which weak hashing algorithms are reported. + /// + public const string WeakHashAlgorithms = "DD_IAST_WEAK_HASH_ALGORITHMS"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs new file mode 100644 index 000000000000..b579ba304a13 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs @@ -0,0 +1,187 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class OpenTelemetry + { + /// + /// Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). + /// Used when is not set. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318 + /// + public const string ExporterOtlpEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP export (fallback for metrics-specific headers). + /// Used when is not set. + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpHeaders = "OTEL_EXPORTER_OTLP_HEADERS"; + + /// + /// Configuration key to set the OTLP endpoint URL for logs. + /// Takes precedence over `OTEL_EXPORTER_OTLP_ENDPOINT`. + /// This value typically ends with `/v1/logs` when using OTLP/HTTP. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipe\name` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318/v1/logs + /// + public const string ExporterOtlpLogsEndpoint = "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP logs export. + /// Takes precedence over . + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpLogsHeaders = "OTEL_EXPORTER_OTLP_LOGS_HEADERS"; + + public const string ExporterOtlpLogsProtocol = "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL"; + + /// + /// Configuration key to set the request timeout for OTLP logs export in milliseconds. + /// Takes precedence over . + /// Default value is 10000ms. + /// + public const string ExporterOtlpLogsTimeoutMs = "OTEL_EXPORTER_OTLP_LOGS_TIMEOUT"; + + /// + /// Configuration key to set the OTLP endpoint URL for metrics. + /// Takes precedence over . + /// This value typically ends with v1/metrics when using OTLP/HTTP. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318/v1/metrics + /// + public const string ExporterOtlpMetricsEndpoint = "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP metrics export. + /// Takes precedence over . + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpMetricsHeaders = "OTEL_EXPORTER_OTLP_METRICS_HEADERS"; + + /// + /// Configuration key to set the OTLP protocol for metrics export. + /// Takes precedence over . + /// Valid values: grpc, http/protobuf, http/json, defaults to http/protobuf. + /// + public const string ExporterOtlpMetricsProtocol = "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL"; + + /// + /// Configuration key to set the temporality preference for OTLP metrics export. + /// Supported values: delta, cumulative, lowmemory. + /// Default value is delta for Datadog. + /// This deviates from OpenTelemetry specification default of cumulative. + /// + public const string ExporterOtlpMetricsTemporalityPreference = "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"; + + /// + /// Configuration key to set the request timeout for OTLP metrics export in milliseconds. + /// Takes precedence over . + /// Default value is 10000ms. + /// + public const string ExporterOtlpMetricsTimeoutMs = "OTEL_EXPORTER_OTLP_METRICS_TIMEOUT"; + + /// + /// Configuration key to set the OTLP protocol (fallback for metrics-specific protocol). + /// Used when is not set. + /// Valid values: grpc, http/protobuf, http/json, defaults to http/protobuf. + /// + public const string ExporterOtlpProtocol = "OTEL_EXPORTER_OTLP_PROTOCOL"; + + /// + /// Configuration key to set the request timeout for OTLP export (fallback for metrics-specific timeout). + /// Used when is not set. + /// Default value is 10000ms. + /// + public const string ExporterOtlpTimeoutMs = "OTEL_EXPORTER_OTLP_TIMEOUT"; + + /// + /// Configuration key to set the log level. + /// + public const string LogLevel = "OTEL_LOG_LEVEL"; + + public const string LogsExporter = "OTEL_LOGS_EXPORTER"; + + /// + /// Configuration key to set the export interval for metrics in milliseconds. + /// Specifies the time interval between the start of two export attempts. + /// Default value is 10000ms (10s) for Datadog. + /// This deviates from OpenTelemetry specification default of 60000ms (60s). + /// + public const string MetricExportIntervalMs = "OTEL_METRIC_EXPORT_INTERVAL"; + + /// + /// Configuration key to set the export timeout for metrics in milliseconds. + /// Specifies the maximum time allowed for collecting and exporting metrics. + /// Default value is 7500ms (7.5s) for Datadog. + /// This deviates from OpenTelemetry specification default of 30000ms (30s). + /// + public const string MetricExportTimeoutMs = "OTEL_METRIC_EXPORT_TIMEOUT"; + + /// + /// Configuration key to set the exporter for metrics. + /// We only recognize the values of 'otlp' and 'none', a value of + /// 'none' disables the emission of metrics which is the + /// equivalent of setting + /// to false. + /// + public const string MetricsExporter = "OTEL_METRICS_EXPORTER"; + + /// + /// Configuration key for a list of tracing propagators. + /// Datadog only supports a subset of the OpenTelemetry propagators. + /// Also, the 'b3' OpenTelemetry propagator is mapped to the + /// 'b3 single header' Datadog propagator. + /// + public const string Propagators = "OTEL_PROPAGATORS"; + + /// + /// Configuration key for a list of key-value pairs to be set as + /// resource attributes. We currently map these to span tags. + /// + public const string ResourceAttributes = "OTEL_RESOURCE_ATTRIBUTES"; + + /// + /// Configuration key for disabling the OpenTelemetry API's. + /// + public const string SdkDisabled = "OTEL_SDK_DISABLED"; + + /// + /// Configuration key to set the application's default service name. + /// + public const string ServiceName = "OTEL_SERVICE_NAME"; + + /// + /// Configuration key to set the exporter for traces. + /// We only recognize the value 'none', which is the + /// equivalent of setting + /// to false. + /// + public const string TracesExporter = "OTEL_TRACES_EXPORTER"; + + /// + /// Configuration key to set the sampler for traces. + /// to false. + /// + public const string TracesSampler = "OTEL_TRACES_SAMPLER"; + + /// + /// Configuration key to set an additional argument for the + /// traces sampler. + /// to false. + /// + public const string TracesSamplerArg = "OTEL_TRACES_SAMPLER_ARG"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs new file mode 100644 index 000000000000..214e0fd43188 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs @@ -0,0 +1,26 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Profiler + { + public const string CodeHotspotsEnabled = "DD_PROFILING_CODEHOTSPOTS_ENABLED"; + + public const string ProfilingEnabled = "DD_PROFILING_ENABLED"; + + public const string EndpointProfilingEnabled = "DD_PROFILING_ENDPOINT_COLLECTION_ENABLED"; + + public const string ProfilerManagedActivationEnabled = "DD_PROFILING_MANAGED_ACTIVATION_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs new file mode 100644 index 000000000000..e472649bb94e --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs @@ -0,0 +1,29 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Proxy + { + /// + /// Configuration key to set a proxy server for https requests. + /// + public const string ProxyHttps = "DD_PROXY_HTTPS"; + + /// + /// Configuration key to set a list of hosts that should bypass the proxy. + /// The list is space-separated. + /// + public const string ProxyNoProxy = "DD_PROXY_NO_PROXY"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs new file mode 100644 index 000000000000..fad55b9a2a80 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs @@ -0,0 +1,34 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Rcm + { + public const string PollIntervalInternal = "DD_INTERNAL_RCM_POLL_INTERVAL"; + + /// + /// Configuration key for RCM poll interval (in seconds). + /// Default value is 5 s + /// Maximum value is 5 s + /// + public const string PollInterval = "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS"; + + /// + /// Is remote configuration management (RCM) enabled. Defaults to true. RCM requires + /// the use of the full agent, so will not always be available. This switch is primarily + /// intended for testing and for explicitly disabling RCM even though it is available. + /// + public const string RemoteConfigurationEnabled = "DD_REMOTE_CONFIGURATION_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs new file mode 100644 index 000000000000..34d2069e80b6 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs @@ -0,0 +1,27 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class TagPropagation + { + /// + /// Configuration key for the maximum length of an outgoing propagation header's value ("x-datadog-tags") + /// when injecting it into downstream service calls. + /// + /// This value is not used when extracting an incoming propagation header from an upstream service. + /// + /// + public const string HeaderMaxLength = "DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs new file mode 100644 index 000000000000..a2d654a00591 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -0,0 +1,81 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Telemetry + { + /// + /// Configuration key for sending telemetry via agent proxy. If enabled, sends telemetry + /// via agent proxy. Enabled by default. If disabled, or agent is not available, telemetry + /// is sent to agentless endpoint, based on setting. + /// + public const string AgentProxyEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENT_PROXY_ENABLED"; + + /// + /// Configuration key for sending telemetry direct to telemetry intake. If enabled, and + /// is set, sends telemetry direct to intake if agent is not + /// available. Enabled by default if is available. + /// + public const string AgentlessEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENTLESS_ENABLED"; + + /// + /// Configuration key for enabling or disabling internal telemetry. + /// Default value is true (enabled). + /// + public const string Enabled = "DD_INSTRUMENTATION_TELEMETRY_ENABLED"; + + /// + /// Configuration key for the telemetry URL where the Tracer sends telemetry. Only applies when agentless + /// telemetry is in use (otherwise telemetry is sent to the agent using + /// instead) + /// + public const string Uri = "DD_INSTRUMENTATION_TELEMETRY_URL"; + + /// + /// Configuration key for whether to enable debug mode of telemetry. + /// + /// + public const string DebugEnabled = "DD_INTERNAL_TELEMETRY_DEBUG_ENABLED"; + + /// + /// Configuration key for whether dependency data is sent via telemetry. + /// Required for some ASM features. Default value is true (enabled). + /// + /// + public const string DependencyCollectionEnabled = "DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED"; + + /// + /// Configuration key for how often telemetry should be sent, in seconds. Must be between 1 and 3600. + /// For testing purposes. Defaults to 60 + /// + /// + public const string HeartbeatIntervalSeconds = "DD_TELEMETRY_HEARTBEAT_INTERVAL"; + + /// + /// Configuration key for whether to enable redacted error log collection. + /// + public const string TelemetryLogsEnabled = "DD_TELEMETRY_LOG_COLLECTION_ENABLED"; + + /// + /// Configuration key for whether telemetry metrics should be sent. + /// + /// + public const string MetricsEnabled = "DD_TELEMETRY_METRICS_ENABLED"; + + /// + /// Configuration key to enable or disable the ActivityListener. + /// + public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs new file mode 100644 index 000000000000..b43bb9af380a --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -0,0 +1,736 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +/// +/// String constants for standard Datadog configuration keys. +/// Auto-generated from supported-configurations.json and supported-configurations-docs.yaml +/// +internal static partial class ConfigurationKeys2 +{ + /// + /// Configuration key for configuring the interval (in seconds) for sending stats (aka trace metrics) + /// + /// # Keys without documentation in ConfigurationKeys.cs + /// # These keys exist in supported-configurations.json but need documentation + /// + public const string StatsComputationInterval = "_DD_TRACE_STATS_COMPUTATION_INTERVAL"; + + /// + /// Configuration key for the Agent host where the Tracer can send traces. + /// Overridden by if present. + /// Default value is "localhost". + /// + /// + public const string AgentHost = "DD_AGENT_HOST"; + + /// + /// Configuration key for setting the API key, used by the Agent. + /// + public const string ApiKey = "DD_API_KEY"; + + public const string RareSamplerEnabled = "DD_APM_ENABLE_RARE_SAMPLER"; + + /// + /// Used to force a specific port binding for the Trace Agent. + /// Default value is 8126. + /// + /// + public const string TraceAgentPortKey = "DD_APM_RECEIVER_PORT"; + + /// + /// Configuration key for the unix domain socket where the Tracer can send traces. + /// Default value is null. + /// + /// + public const string TracesUnixDomainSocketPath = "DD_APM_RECEIVER_SOCKET"; + + /// + /// Configuration key for enabling or disabling the generation of APM traces. + /// Default is value is true (enabled). + /// + public const string ApmTracingEnabled = "DD_APM_TRACING_ENABLED"; + + /// + /// Configuration key for deactivating reading the application monitoring config file through libdatadog (hands off config). + /// True by default + /// + public const string ApplicationMonitoringConfigFileEnabled = "DD_APPLICATION_MONITORING_CONFIG_FILE_ENABLED"; + + /// + /// Configuration key for setting DBM propagation mode + /// Default value is disabled, expected values are either: disabled, service or full + /// + /// + public const string DbmPropagationMode = "DD_DBM_PROPAGATION_MODE"; + + /// + /// Configuration key for enabling or disabling the use of System.Diagnostics.DiagnosticSource. + /// Default value is true (enabled). + /// + public const string DiagnosticSourceEnabled = "DD_DIAGNOSTIC_SOURCE_ENABLED"; + + /// + /// Configuration key for a list of integrations to disable. All other integrations remain enabled. + /// Default is empty (all integrations are enabled). + /// Supports multiple values separated with semi-colons. + /// + /// + public const string DisabledIntegrations = "DD_DISABLED_INTEGRATIONS"; + + /// + /// Configuration key for arguments to pass to the DogStatsD process. + /// + public const string DogStatsDArgs = "DD_DOGSTATSD_ARGS"; + + /// + /// Configuration key for when a standalone instance of DogStatsD needs to be started. + /// + public const string DogStatsDPath = "DD_DOGSTATSD_PATH"; + + /// + /// Configuration key for the named pipe that DogStatsD binds to. + /// Default value is null. + /// + /// + public const string MetricsPipeName = "DD_DOGSTATSD_PIPE_NAME"; + + /// + /// Configuration key for the DogStatsd port where the Tracer can send metrics. + /// Default value is 8125. + /// + /// + public const string DogStatsdPort = "DD_DOGSTATSD_PORT"; + + /// + /// Configuration key for the unix domain socket that DogStatsD binds to. + /// Default value is null. + /// + /// + public const string MetricsUnixDomainSocketPath = "DD_DOGSTATSD_SOCKET"; + + /// + /// Configuration key for the location where the Tracer can send DogStatsD metrics. + /// Default value is "udp://127.0.0.1:8125". + /// + /// + public const string MetricsUri = "DD_DOGSTATSD_URL"; + + /// + /// Configuration key for the application's environment. Sets the "env" tag on every . + /// + /// + public const string Environment = "DD_ENV"; + + /// + /// Configuration key for the application's git commit hash. Sets the "_dd.git.commit.sha" tag on every . + /// + /// + public const string GitCommitSha = "DD_GIT_COMMIT_SHA"; + + /// + /// Configuration key for the application's git repo URL. Sets the "_dd.git.repository_url" tag on every . + /// + /// + public const string GitRepositoryUrl = "DD_GIT_REPOSITORY_URL"; + + /// + /// Configuration key for the application's client http statuses to set spans as errors by. + /// + /// + public const string DeprecatedHttpClientErrorStatusCodes = "DD_HTTP_CLIENT_ERROR_STATUSES"; + + /// + /// Configuration key for the application's server http statuses to set spans as errors by. + /// + /// + public const string DeprecatedHttpServerErrorStatusCodes = "DD_HTTP_SERVER_ERROR_STATUSES"; + + /// + /// Configuration key for enabling/disabling reporting query string + /// Default value is true + /// + /// + public const string QueryStringReportingEnabled = "DD_HTTP_SERVER_TAG_QUERY_STRING"; + + /// + /// Configuration key for setting the max size of the querystring to report, before obfuscation + /// Default value is 5000, 0 means that we don't limit the size. + /// + /// + public const string QueryStringReportingSize = "DD_HTTP_SERVER_TAG_QUERY_STRING_SIZE"; + + /// + /// Configuration key for enabling or disabling the injection of products via single step instrumentation. + /// + public const string SsiDeployed = "DD_INJECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling the Tracer's debugger mode. + /// Default is value is false (disabled). + /// + public const string WaitForDebuggerAttach = "DD_INTERNAL_WAIT_FOR_DEBUGGER_ATTACH"; + + /// + /// Configuration key for enabling or disabling the Tracer's native debugger mode. + /// Default is value is false (disabled). + /// + public const string WaitForNativeDebuggerAttach = "DD_INTERNAL_WAIT_FOR_NATIVE_DEBUGGER_ATTACH"; + + /// + /// Configuration key for enabling or disabling the automatic injection + /// of correlation identifiers into the logging context. + /// + /// + public const string LogsInjectionEnabled = "DD_LOGS_INJECTION"; + + /// + /// Configuration key for setting the approximate maximum size, + /// in bytes, for Tracer log files. + /// Default value is 10 MB. + /// + public const string MaxLogFileSize = "DD_MAX_LOGFILE_SIZE"; + + /// + /// Configuration key for setting the number of traces allowed + /// to be submitted per second. + /// + /// + [System.Obsolete("This parameter is obsolete and should be replaced by `DD_TRACE_RATE_LIMIT`")] + public const string MaxTracesSubmittedPerSecond = "DD_MAX_TRACES_PER_SECOND"; + + /// + /// Configuration key for enabling or disabling runtime metrics sent to DogStatsD. + /// Default value is false (disabled). + /// + public const string RuntimeMetricsEnabled = "DD_RUNTIME_METRICS_ENABLED"; + + /// + /// Configuration key for the application's default service name. + /// Used as the service name for top-level spans, + /// and used to determine service name of some child spans. + /// + /// + public const string ServiceName = "DD_SERVICE"; + + /// + /// Configuration key for setting the default Datadog destination site. + /// Defaults to "datadoghq.com". + /// + public const string Site = "DD_SITE"; + + /// + /// Configuration key for setting custom span sampling rules based on glob patterns. + /// Comma separated list of span sampling rules. + /// The rule is matched in order of specification. The first match in a list is used. + /// The supported glob pattern characters are '*' and '?'. + /// A '*' matches any contiguous substring. + /// A '?' matches exactly one character. + /// + /// Per entry: + /// The item "service" is a glob pattern string, to match on the service name. + /// Optional and defaults to '*'. + /// The item "name" is a glob pattern string, to match on the operation name. + /// Optional and defaults to '*'. + /// The item "sample_rate" is a float and is the probability of keeping a matched span. + /// Optional and defaults to 1.0 (keep all). + /// The item "max_per_second" is a float and is the maximum number of spans that can be kept per second for the rule. + /// Optional and defaults to unlimited. + /// + /// Examples: + /// Match all spans that have a service name of "cart" and an operation name of "checkout" with a kept limit of 1000 per second. + /// "[{"service": "cart", "name": "checkout", "max_per_second": 1000}]" + /// + /// Match 50% of spans that have a service name of "cart" and an operation name of "checkout" with a kept limit of 1000 per second. + /// "[{"service": "cart", "name": "checkout", "sample_rate": 0.5, "max_per_second": 1000}]" + /// + /// Match all spans that start with "cart" without any limits and any operation name. + /// "[{"service": "cart*"}]" + /// + /// + public const string SpanSamplingRules = "DD_SPAN_SAMPLING_RULES"; + + /// + /// Configuration key for a list of tags to be applied globally to spans. + /// Supports multiple key key-value pairs which are comma-separated, and for which the key and + /// value are colon-separated. For example Key1:Value1, Key2:Value2 + /// + /// + public const string GlobalTags = "DD_TAGS"; + + /// + /// Configuration key for arguments to pass to the Trace Agent process. + /// + public const string TraceAgentArgs = "DD_TRACE_AGENT_ARGS"; + + /// + /// Configuration key for when a standalone instance of the Trace Agent needs to be started. + /// + public const string TraceAgentPath = "DD_TRACE_AGENT_PATH"; + + /// + /// Configuration key for the Agent port where the Tracer can send traces. + /// Default value is 8126. + /// + /// + public const string AgentPort = "DD_TRACE_AGENT_PORT"; + + /// + /// Configuration key for the Agent URL where the Tracer can send traces. + /// Default value is "http://localhost:8126". + /// + /// + public const string AgentUri = "DD_TRACE_AGENT_URL"; + + /// + /// Configuration key for enabling or disabling default Analytics. + /// + /// + [System.Obsolete("Deprecated - App Analytics is deprecated")] + public const string GlobalAnalyticsEnabled = "DD_TRACE_ANALYTICS_ENABLED"; + + /// + /// Configuration key for toggling span pointers on AWS requests. + /// Default value is true + /// + public const string SpanPointersEnabled = "DD_TRACE_AWS_ADD_SPAN_POINTERS"; + + /// + /// Configuration key for enabling or disabling span links creation for Azure EventHubs batch operations. + /// When enabled, TryAdd spans are created and linked to the send span. + /// When disabled, TryAdd spans are not created, and therefore they are never linked to the send span. + /// Default value is true (enabled). + /// + /// + public const string AzureEventHubsBatchLinksEnabled = "DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED"; + + /// + /// Configuration key to enable or disable the creation of individual message spans and span links + /// when using Azure Service Bus batch operations. + /// Default value is true (enabled). + /// + /// + public const string AzureServiceBusBatchLinksEnabled = "DD_TRACE_AZURE_SERVICEBUS_BATCH_LINKS_ENABLED"; + + /// + /// Configuration key to set the maximum number of bytes that can be + /// injected into the baggage header when propagating to a downstream service. + /// Default value is 8192 bytes. + /// + /// + public const string BaggageMaximumBytes = "DD_TRACE_BAGGAGE_MAX_BYTES"; + + /// + /// Configuration key to set the maximum number of items that can be + /// injected into the baggage header when propagating to a downstream service. + /// Default value is 64 items. + /// + /// + public const string BaggageMaximumItems = "DD_TRACE_BAGGAGE_MAX_ITEMS"; + + /// + /// Configuration key for controlling which baggage keys are converted into span tags. + /// Default value is "user.id,session.id,account.id". + /// + /// Behavior options: + /// - Empty string: No baggage keys are converted into span tags (feature disabled) + /// - Comma-separated list: Only baggage keys matching exact, case-sensitive names in the list are added as span tags + /// - Wildcard (*): All baggage keys are converted into span tags + /// + /// + public const string BaggageTagKeys = "DD_TRACE_BAGGAGE_TAG_KEYS"; + + /// + /// Configuration key for setting the batch interval in milliseconds for the serialization queue. + /// Set to 0 to disable. + /// + public const string SerializationBatchInterval = "DD_TRACE_BATCH_INTERVAL"; + + /// + /// Configuration key for setting the size in bytes of the trace buffer + /// + public const string BufferSize = "DD_TRACE_BUFFER_SIZE"; + + /// + /// Configuration key indicating if the header should be collected. The default for DD_TRACE_CLIENT_IP_ENABLED is false. + /// + /// + public const string IpHeaderEnabled = "DD_TRACE_CLIENT_IP_ENABLED"; + + /// + /// Configuration key indicating the optional name of the custom header to take into account to report the ip address from. + /// If this variable is set all other IP related headers should be ignored + /// Default is value is null (do not override). + /// + /// + public const string IpHeader = "DD_TRACE_CLIENT_IP_HEADER"; + + /// + /// Configuration key for the path to the configuration file. + /// Can only be set with an environment variable + /// or in the app.config/web.config file. + /// + public const string ConfigurationFileName = "DD_TRACE_CONFIG_FILE"; + + /// + /// Use libdatadog data pipeline to send traces. + /// Default value is false (disabled). + /// + public const string TraceDataPipelineEnabled = "DD_TRACE_DATA_PIPELINE_ENABLED"; + + /// + /// Configuration key for enabling or disabling the Tracer's debug mode. + /// Default is value is false (disabled). + /// + public const string DebugEnabled = "DD_TRACE_DEBUG"; + + /// + /// Configuration key for a list of ActivitySource names (supports globbing) that will be disabled. + /// Default is empty (all ActivitySources will be subscribed to by default). + /// Disabling ActivitySources may break distributed tracing if those Activities are used to propagate trace context. + /// + /// Supports multiple values separated with commas. + /// For example: "SomeGlob.*.PatternSource,Some.Specific.Source" + /// + /// + /// + /// When the tracer doesn't subscribe to an ActivitySource, we will NOT propagate the trace context from those Activities (we don't see them anymore). + ///
This means that distributed tracing flows that rely on these Activities for context propagation + /// will break and cause disconnected traces. + ///
+ /// + /// Potential impact on distributed tracing: + /// + /// + /// + /// Service A -> Ignored Activity -> Service B + /// Creates a single trace with Service A as root and Service B as child + /// + /// + /// + /// + /// Service A -> Disabled Activity -> Service B + /// Creates TWO separate traces with Service A and Service B each as root spans + /// + /// + /// + /// + ///
+ ///
+ public const string DisabledActivitySources = "DD_TRACE_DISABLED_ACTIVITY_SOURCES"; + + /// + /// Configuration key for the comma-separated list of user disabled + /// ADO.NET CommandType names that should not have Span created for them. + /// "InterceptableDbCommand" and "ProfiledDbCommand" are always disabled by default. + /// + /// + public const string DisabledAdoNetCommandTypes = "DD_TRACE_DISABLED_ADONET_COMMAND_TYPES"; + + /// + /// Configuration key for enabling or disabling the Tracer. + /// Default is value is true (enabled). + /// + /// + public const string TraceEnabled = "DD_TRACE_ENABLED"; + + /// + /// Configuration key for controlling whether route parameters in ASP.NET and ASP.NET Core resource names + /// should be expanded with their values. Only applies when + /// is enabled. + /// + /// + public const string ExpandRouteTemplatesEnabled = "DD_TRACE_EXPAND_ROUTE_TEMPLATES_ENABLED"; + + /// + /// Configuration key to enable experimental features. + /// + public const string ExperimentalFeaturesEnabled = "DD_TRACE_EXPERIMENTAL_FEATURES_ENABLED"; + + /// + /// Configuration key for enabling the tagging of every telemetry event with git metadata. + /// Default is value is true (enabled). + /// + /// + public const string GitMetadataEnabled = "DD_TRACE_GIT_METADATA_ENABLED"; + + /// + /// Configuration key for specifying which GraphQL error extensions to capture. + /// A comma-separated list of extension keys to capture. Empty or not present means no extensions are captured. + /// + /// + public const string GraphQLErrorExtensions = "DD_TRACE_GRAPHQL_ERROR_EXTENSIONS"; + + /// + /// Configuration key for a map of metadata keys to tag names. + /// Automatically apply GRPC metadata values as tags on traces. + /// + /// + public const string GrpcTags = "DD_TRACE_GRPC_TAGS"; + + /// + /// Configuration key for a map of header keys to tag names. + /// Automatically apply header values as tags on traces. + /// + /// + public const string HeaderTags = "DD_TRACE_HEADER_TAGS"; + + /// + /// Configuration key for the application's client http statuses to set spans as errors by. + /// + /// + public const string HttpClientErrorStatusCodes = "DD_TRACE_HTTP_CLIENT_ERROR_STATUSES"; + + /// + /// Configuration key for overriding which URLs are skipped by the tracer. + /// + /// + public const string HttpClientExcludedUrlSubstrings = "DD_TRACE_HTTP_CLIENT_EXCLUDED_URL_SUBSTRINGS"; + + /// + /// Configuration key for the application's server http statuses to set spans as errors by. + /// + /// + public const string HttpServerErrorStatusCodes = "DD_TRACE_HTTP_SERVER_ERROR_STATUSES"; + + /// + /// Configuration key to enable or disable the creation of a span context on exiting a successful Kafka + /// Consumer.Consume() call, and closing the scope on entering Consumer.Consume(). + /// Default value is true (enabled). + /// + /// + public const string KafkaCreateConsumerScopeEnabled = "DD_TRACE_KAFKA_CREATE_CONSUMER_SCOPE_ENABLED"; + + /// + /// Configuration key for setting the directory of the .NET Tracer logs. + /// Overrides the value in if present. + /// Default value is "%ProgramData%"\Datadog .NET Tracer\logs\" on Windows + /// or "/var/log/datadog/dotnet/" on Linux. + /// + public const string LogDirectory = "DD_TRACE_LOG_DIRECTORY"; + + [System.Obsolete("Deprecated, use DD_TRACE_LOG_DIRECTORY instead, and make sure it is a directory and not a file path")] + public const string TraceLogPath = "DD_TRACE_LOG_PATH"; + + /// + /// Configuration key for locations to write internal diagnostic logs. + /// Currently only file is supported + /// Defaults to file + /// + public const string LogSinks = "DD_TRACE_LOG_SINKS"; + + /// + /// Configuration key for setting in number of days when to delete log files based on their last writetime date. + /// + public const string LogFileRetentionDays = "DD_TRACE_LOGFILE_RETENTION_DAYS"; + + /// + /// Configuration key for setting the number of seconds between, + /// identical log messages, for Tracer log files. + /// Default value is 0 and setting to 0 disables rate limiting. + /// + public const string LogRateLimit = "DD_TRACE_LOGGING_RATE"; + + /// + /// Configuration key for enabling automatic instrumentation on specified methods. + /// Default value is "" (disabled). + /// + public const string TraceMethods = "DD_TRACE_METHODS"; + + /// + /// Configuration key for enabling or disabling internal metrics sent to DogStatsD. + /// Default value is false (disabled). + /// + public const string TracerMetricsEnabled = "DD_TRACE_METRICS_ENABLED"; + + /// + /// Configuration key for specifying a custom regex to obfuscate query strings. + /// Default value is in TracerSettingsConstants + /// WARNING: This regex cause crashes under netcoreapp2.1 / linux / arm64, dont use on manual instrumentation in this environment + /// + /// + public const string ObfuscationQueryStringRegex = "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP"; + + /// + /// Configuration key for specifying a timeout in milliseconds to the execution of the query string obfuscation regex + /// Default value is 200ms + /// + /// + public const string ObfuscationQueryStringRegexTimeout = "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP_TIMEOUT"; + + /// + /// Configuration key to enable sending partial traces to the agent + /// + public const string PartialFlushEnabled = "DD_TRACE_PARTIAL_FLUSH_ENABLED"; + + /// + /// Configuration key to set the minimum number of closed spans in a trace before it's partially flushed + /// + public const string PartialFlushMinSpans = "DD_TRACE_PARTIAL_FLUSH_MIN_SPANS"; + + /// + /// Configuration key for automatically populating the peer.service tag + /// from predefined precursor attributes when the span attribute schema is v0. + /// This is ignored when the span attribute schema is v1 or later. + /// Default value is false + /// + public const string PeerServiceDefaultsEnabled = "DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED"; + + /// + /// Configuration key for a map of services to rename. + /// + /// + public const string PeerServiceNameMappings = "DD_TRACE_PEER_SERVICE_MAPPING"; + + /// + /// Configuration key for the named pipe where the Tracer can send traces. + /// Default value is null. + /// + /// + public const string TracesPipeName = "DD_TRACE_PIPE_NAME"; + + /// + /// Configuration key for setting the timeout in milliseconds for named pipes communication. + /// Default value is 0. + /// + /// + public const string TracesPipeTimeoutMs = "DD_TRACE_PIPE_TIMEOUT_MS"; + + /// + /// Configuration key for setting the header extraction propagation behavior. Accepted values are: + ///
    + ///
  • continue: Extracted span context becomes the parent and baggage is propagated
  • + ///
  • restart: Extracted span context becomes a span link (a new trace is started) and baggage is propagated
  • + ///
  • ignore: We disregard the incoming trace context headers and we also disregard baggage
  • + ///
+ /// Default value is continue. + ///
+ public const string PropagationBehaviorExtract = "DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT"; + + /// + /// Configuration key to configure if propagation should only extract the first header once a configure + /// propagator extracts a valid trace context. + /// + /// + public const string PropagationExtractFirstOnly = "DD_TRACE_PROPAGATION_EXTRACT_FIRST"; + + /// + /// Configuration key for setting the propagation style for both header injection and extraction. + /// If or are also defined, + /// they will override any header injections or extraction styled defined here, respectively. + /// + /// + public const string PropagationStyle = "DD_TRACE_PROPAGATION_STYLE"; + + /// + /// Configuration key for setting the header extraction propagation style. + /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header extraction styles. + /// + /// + /// + public const string PropagationStyleExtract = "DD_TRACE_PROPAGATION_STYLE_EXTRACT"; + + /// + /// Configuration key for setting the header injection propagation style. + /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header injection styles. + /// + /// + /// + public const string PropagationStyleInject = "DD_TRACE_PROPAGATION_STYLE_INJECT"; + + /// + /// Configuration key for setting the number of traces allowed + /// to be submitted per second. + /// + /// + public const string TraceRateLimit = "DD_TRACE_RATE_LIMIT"; + + /// + /// Configuration key for unifying client service names when the span + /// attribute schema is v0. This is ignored when the span attribute + /// schema is v1 or later. + /// Default value is false + /// + public const string RemoveClientServiceNamesEnabled = "DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED"; + + /// + /// Configuration key for setting the global rate for the sampler. + /// + public const string GlobalSamplingRate = "DD_TRACE_SAMPLE_RATE"; + + /// + /// Configuration key for setting custom sampling rules based on regular expressions. + /// Semi-colon separated list of sampling rules. + /// The rule is matched in order of specification. The first match in a list is used. + /// + /// Per entry: + /// The item "sample_rate" is required in decimal format. + /// The item "service" is optional in regular expression format, to match on service name. + /// The item "name" is optional in regular expression format, to match on operation name. + /// + /// To give a rate of 50% to any traces in a service starting with the text "cart": + /// '[{"sample_rate":0.5, "service":"cart.*"}]' + /// + /// To give a rate of 20% to any traces which have an operation name of "http.request": + /// '[{"sample_rate":0.2, "name":"http.request"}]' + /// + /// To give a rate of 100% to any traces within a service named "background" and with an operation name of "sql.query": + /// '[{"sample_rate":1.0, "service":"background", "name":"sql.query"}] + /// + /// To give a rate of 10% to all traces + /// '[{"sample_rate":0.1}]' + /// + /// To configure multiple rules, separate by semi-colon and order from most specific to least specific: + /// '[{"sample_rate":0.5, "service":"cart.*"}, {"sample_rate":0.2, "name":"http.request"}, {"sample_rate":1.0, "service":"background", "name":"sql.query"}, {"sample_rate":0.1}]' + /// + /// If no rules are specified, or none match, default internal sampling logic will be used. + /// + /// + public const string CustomSamplingRules = "DD_TRACE_SAMPLING_RULES"; + + /// + /// Configuration key for setting the format of . + /// Valid values are regex or glob. + /// If the value is not recognized, trace sampling rules are disabled. + /// + public const string CustomSamplingRulesFormat = "DD_TRACE_SAMPLING_RULES_FORMAT"; + + /// + /// Configuration key for a map of services to rename. + /// + /// + public const string ServiceNameMappings = "DD_TRACE_SERVICE_MAPPING"; + + /// + /// Configuration key for setting the schema version for service naming and span attributes + /// Accepted values are: "v1", "v0" + /// Default value is "v0" + /// + public const string MetadataSchemaVersion = "DD_TRACE_SPAN_ATTRIBUTE_SCHEMA"; + + /// + /// Configuration key for enabling or disabling the diagnostic log at startup + /// + /// + public const string StartupDiagnosticLogEnabled = "DD_TRACE_STARTUP_LOGS"; + + /// + /// Configuration key for enabling computation of stats (aka trace metrics) on the tracer side + /// + public const string StatsComputationEnabled = "DD_TRACE_STATS_COMPUTATION_ENABLED"; + + /// + /// Configuration key for the application's version. Sets the "version" tag on every . + /// + /// + public const string ServiceVersion = "DD_VERSION"; +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs new file mode 100644 index 000000000000..482c940fe668 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs @@ -0,0 +1,160 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class AppSec + { + /// + /// When ASM is enabled, collects in spans endpoints apis schemas analyzed by the waf, default value is true. + /// + public const string ApiSecurityEnabled = "DD_API_SECURITY_ENABLED"; + + /// + /// with a default value of true, it allows a customer to disable the collection of endpoints for API Security. + /// + public const string ApiSecurityEndpointCollectionEnabled = "DD_API_SECURITY_ENDPOINT_COLLECTION_ENABLED"; + + /// + /// with a default value of 300, it defines the maximum number of endpoints to be collected (serialized) for API Security. + /// + public const string ApiSecurityEndpointCollectionMessageLimit = "DD_API_SECURITY_ENDPOINT_COLLECTION_MESSAGE_LIMIT"; + + /// + /// Enables the parsing of the response body in the API Security module. Defaults to true + /// + public const string ApiSecurityParseResponseBody = "DD_API_SECURITY_PARSE_RESPONSE_BODY"; + + /// + /// Api security sample delay in seconds , should be a float. Set to 0 for testing purposes. default value of 30. + /// + public const string ApiSecuritySampleDelay = "DD_API_SECURITY_SAMPLE_DELAY"; + + /// + /// Automatic instrumentation of user event mode. Values can be ident, disabled, anon. + /// + public const string UserEventsAutoInstrumentationMode = "DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE"; + + /// + /// Deprecate. Automatic tracking of user events mode. Values can be disabled, safe or extended. + /// This config is in the process of being deprecated. Please use DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE + /// instead. + /// Values will be automatically translated: + /// disabled = disabled + /// safe = anon + /// extended = ident + /// + public const string UserEventsAutomatedTracking = "DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING"; + + /// + /// Configuration key for enabling or disabling the AppSec. + /// Default is value is false (disabled). + /// + public const string Enabled = "DD_APPSEC_ENABLED"; + + /// + /// Comma separated keys indicating the optional custom headers the user wants to send. + /// Default is value is null. + /// + public const string ExtraHeaders = "DD_APPSEC_EXTRA_HEADERS"; + + /// + /// Blocking response template for HTML content. This template is used in combination with the status code to craft and send a response upon blocking the request. + /// + public const string HtmlBlockedTemplate = "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_HTML"; + + /// + /// Blocking response template for Json content. This template is used in combination with the status code to craft and send a response upon blocking the request. + /// + public const string JsonBlockedTemplate = "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_JSON"; + + /// + /// Configuration key indicating the optional name of the custom header to take into account for the ip address. + /// Default is value is null (do not override). + /// + public const string CustomIpHeader = "DD_APPSEC_IPHEADER"; + + /// + /// Specifies if the AppSec traces should be explicitly kept or dropped. + /// Default is true, to keep all traces, false means drop all traces (by setting AutoReject as sampling priority). + /// For internal testing only. + /// + public const string KeepTraces = "DD_APPSEC_KEEP_TRACES"; + + /// + /// with a default value of 32, defines the maximum depth of a stack trace to be reported due to RASP events. O for unlimited. + /// + public const string MaxStackTraceDepth = "DD_APPSEC_MAX_STACK_TRACE_DEPTH"; + + /// + /// with a default value of 75, defines the percentage of frames taken from the top of the stack when trimming. Min 0, Max 100 + /// + public const string MaxStackTraceDepthTopPercent = "DD_APPSEC_MAX_STACK_TRACE_DEPTH_TOP_PERCENT"; + + /// + /// with a default value of 2, defines the maximum number of stack traces to be reported due to RASP events. 0 for unlimited. + /// + public const string MaxStackTraces = "DD_APPSEC_MAX_STACK_TRACES"; + + /// + /// The regex that will be used to obfuscate possible sensitive data in keys that are highlighted WAF as potentially malicious + /// + public const string ObfuscationParameterKeyRegex = "DD_APPSEC_OBFUSCATION_PARAMETER_KEY_REGEXP"; + + /// + /// The regex that will be used to obfuscate possible sensitive data in values that are highlighted WAF as potentially malicious + /// + public const string ObfuscationParameterValueRegex = "DD_APPSEC_OBFUSCATION_PARAMETER_VALUE_REGEXP"; + + /// + /// default value to true. Set to false to disable exploit prevention. + /// + public const string RaspEnabled = "DD_APPSEC_RASP_ENABLED"; + + /// + /// Override the default rules file provided. Must be a path to a valid JSON rules file. + /// Default is value is null (do not override). + /// + public const string Rules = "DD_APPSEC_RULES"; + + /// + /// Activate SCA (Software Composition Analysis), used in the backend + /// + public const string ScaEnabled = "DD_APPSEC_SCA_ENABLED"; + + /// + /// with a default value of true, it allows a customer to disable the generation of stack traces, for any ASM-specific purpose such as RASP. + /// + public const string StackTraceEnabled = "DD_APPSEC_STACK_TRACE_ENABLED"; + + /// + /// Limits the amount of AppSec traces sent per second with an integer value, strictly positive. + /// + public const string TraceRateLimit = "DD_APPSEC_TRACE_RATE_LIMIT"; + + /// + /// Activate debug logs for the WAF + /// + public const string WafDebugEnabled = "DD_APPSEC_WAF_DEBUG"; + + /// + /// WAF timeout in microseconds of each WAF execution (the timeout value passed to ddwaf_run). + /// + public const string WafTimeout = "DD_APPSEC_WAF_TIMEOUT"; + + /// + /// Use new unsafe encoder for the waf + /// + public const string UseUnsafeEncoder = "DD_EXPERIMENTAL_APPSEC_USE_UNSAFE_ENCODER"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs new file mode 100644 index 000000000000..38658802fc64 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs @@ -0,0 +1,32 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class AzureAppService + { + public const string SiteExtensionVersionKey = "DD_AAS_DOTNET_EXTENSION_VERSION"; + + /// + /// Used to force the loader to start dogstatsd (in case automatic instrumentation is disabled) + /// + public const string AasEnableCustomMetrics = "DD_AAS_ENABLE_CUSTOM_METRICS"; + + /// + /// Used to force the loader to start the trace agent (in case automatic instrumentation is disabled) + /// + public const string AasEnableCustomTracing = "DD_AAS_ENABLE_CUSTOM_TRACING"; + + public const string AzureAppServicesContextKey = "DD_AZURE_APP_SERVICES"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs new file mode 100644 index 000000000000..050fb9cac569 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs @@ -0,0 +1,163 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class CIVisibility + { + /// + /// An internal key used to "tell" tracer settings that we're running in CI Visibility mode + /// + public const string IsRunningInCiVisMode = "_DD_INTERNAL_IS_RUNNING_IN_CIVISIBILITY"; + + /// + /// Configuration key for enabling or disabling Agentless in CI Visibility. + /// Default value is false (disabled). + /// + public const string AgentlessEnabled = "DD_CIVISIBILITY_AGENTLESS_ENABLED"; + + /// + /// Configuration key for setting the agentless url endpoint + /// + public const string AgentlessUrl = "DD_CIVISIBILITY_AGENTLESS_URL"; + + /// + /// Configuration key for setting the code coverage collector path + /// + public const string CodeCoverageCollectorPath = "DD_CIVISIBILITY_CODE_COVERAGE_COLLECTORPATH"; + + /// + /// Configuration key for enabling or disabling jit optimizations in the Code Coverage + /// + public const string CodeCoverageEnableJitOptimizations = "DD_CIVISIBILITY_CODE_COVERAGE_ENABLE_JIT_OPTIMIZATIONS"; + + /// + /// Configuration key for enabling or disabling Code Coverage in CI Visibility. + /// + public const string CodeCoverage = "DD_CIVISIBILITY_CODE_COVERAGE_ENABLED"; + + /// + /// Configuration key for selecting the code coverage mode LineExecution or LineCallCount + /// + public const string CodeCoverageMode = "DD_CIVISIBILITY_CODE_COVERAGE_MODE"; + + /// + /// Configuration key for setting the code coverage jsons destination path. + /// + public const string CodeCoveragePath = "DD_CIVISIBILITY_CODE_COVERAGE_PATH"; + + /// + /// Configuration key for re-signing assemblies after the Code Coverage modification. + /// + public const string CodeCoverageSnkFile = "DD_CIVISIBILITY_CODE_COVERAGE_SNK_FILEPATH"; + + /// + /// Configuration key for a kill-switch that allows to explicitly disable dynamic instrumentation even if the remote setting is enabled. + /// + public const string DynamicInstrumentationEnabled = "DD_CIVISIBILITY_DI_ENABLED"; + + /// + /// Configuration key for enabling or disabling the early flake detection feature in CI Visibility + /// + public const string EarlyFlakeDetectionEnabled = "DD_CIVISIBILITY_EARLY_FLAKE_DETECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling CI Visibility. + /// Default value is false (disabled). + /// + public const string Enabled = "DD_CIVISIBILITY_ENABLED"; + + /// + /// Configuration key for setting the external code coverage file path + /// + public const string ExternalCodeCoveragePath = "DD_CIVISIBILITY_EXTERNAL_CODE_COVERAGE_PATH"; + + /// + /// Configuration key for the maximum number of retry attempts for a single test case. + /// + public const string FlakyRetryCount = "DD_CIVISIBILITY_FLAKY_RETRY_COUNT"; + + /// + /// Configuration key for a kill-switch that allows to explicitly disable retries even if the remote setting is enabled. + /// + public const string FlakyRetryEnabled = "DD_CIVISIBILITY_FLAKY_RETRY_ENABLED"; + + /// + /// Configuration key for forcing Agent's EVP Proxy + /// + public const string ForceAgentsEvpProxy = "DD_CIVISIBILITY_FORCE_AGENT_EVP_PROXY"; + + /// + /// Configuration key for enabling or disabling Datadog.Trace GAC installation + /// + public const string InstallDatadogTraceInGac = "DD_CIVISIBILITY_GAC_INSTALL_ENABLED"; + + /// + /// Configuration key for enabling or disabling Uploading Git Metadata in CI Visibility + /// Default Value is false (disabled) + /// + public const string GitUploadEnabled = "DD_CIVISIBILITY_GIT_UPLOAD_ENABLED"; + + /// + /// Configuration key for enabling Impacted Tests Detection. + /// + public const string ImpactedTestsDetectionEnabled = "DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling Intelligent Test Runner in CI Visibility + /// Default Value is false (disabled) + /// + public const string IntelligentTestRunnerEnabled = "DD_CIVISIBILITY_ITR_ENABLED"; + + /// + /// Configuration key for enabling or disabling the known tests feature in CI Visibility + /// + public const string KnownTestsEnabled = "DD_CIVISIBILITY_KNOWN_TESTS_ENABLED"; + + /// + /// Configuration key for enabling or disabling Logs direct submission. + /// Default value is false (disabled). + /// + public const string Logs = "DD_CIVISIBILITY_LOGS_ENABLED"; + + /// + /// Configuration key for set the rum flushing wait in milliseconds + /// + public const string RumFlushWaitMillis = "DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS"; + + /// + /// Configuration key for enabling or disabling Intelligent Test Runner test skipping feature in CI Visibility + /// + public const string TestsSkippingEnabled = "DD_CIVISIBILITY_TESTSSKIPPING_ENABLED"; + + /// + /// Configuration key for the maximum number of retry attempts for the entire session. + /// + public const string TotalFlakyRetryCount = "DD_CIVISIBILITY_TOTAL_FLAKY_RETRY_COUNT"; + + /// + /// Configuration key for the number of retries to fix a flaky test. + /// + public const string TestManagementAttemptToFixRetries = "DD_TEST_MANAGEMENT_ATTEMPT_TO_FIX_RETRIES"; + + /// + /// Configuration key for enabling or disabling the Test Management feature. + /// + public const string TestManagementEnabled = "DD_TEST_MANAGEMENT_ENABLED"; + + /// + /// Configuration key for set the test session name + /// + public const string TestSessionName = "DD_TEST_SESSION_NAME"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs new file mode 100644 index 000000000000..2c29ca80c29f --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs @@ -0,0 +1,31 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class DataStreamsMonitoring + { + /// + /// Enables data streams monitoring support + /// + /// + public const string Enabled = "DD_DATA_STREAMS_ENABLED"; + + /// + /// Configuration key for enabling legacy binary headers in Data Streams Monitoring. + /// false by default if DSM is in default state, true otherwise + /// + /// + public const string LegacyHeadersEnabled = "DD_DATA_STREAMS_LEGACY_HEADERS"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs new file mode 100644 index 000000000000..41d60c3ccd61 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs @@ -0,0 +1,28 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Debug + { + /// + /// Configuration key for forcing the automatic instrumentation to only use the fallback method lookup mechanism. + /// + public const string ForceFallbackLookup = "DD_TRACE_DEBUG_LOOKUP_FALLBACK"; + + /// + /// Configuration key for forcing the automatic instrumentation to only use the mdToken method lookup mechanism. + /// + public const string ForceMdTokenLookup = "DD_TRACE_DEBUG_LOOKUP_MDTOKEN"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs new file mode 100644 index 000000000000..b83f273e5822 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs @@ -0,0 +1,157 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Debugger + { + /// + /// Configuration key to enable tag code origin for span. + /// Default value is false. + /// + public const string CodeOriginForSpansEnabled = "DD_CODE_ORIGIN_FOR_SPANS_ENABLED"; + + /// + /// Configuration key for setting the number of frames to be tagged in exit span code origin. + /// Default value is 8. + /// + public const string CodeOriginMaxUserFrames = "DD_CODE_ORIGIN_FOR_SPANS_MAX_USER_FRAMES"; + + /// + /// Configuration key for the interval (in seconds) between sending probe statuses. + /// Default value is 3600. + /// + public const string DiagnosticsInterval = "DD_DYNAMIC_INSTRUMENTATION_DIAGNOSTICS_INTERVAL"; + + /// + /// Configuration key for enabling or disabling Dynamic Instrumentation. + /// Default value is false (disabled). + /// + public const string DynamicInstrumentationEnabled = "DD_DYNAMIC_INSTRUMENTATION_ENABLED"; + + /// + /// Configuration key for the max object depth to serialize for probe snapshots. + /// Default value is 1. + /// + public const string MaxDepthToSerialize = "DD_DYNAMIC_INSTRUMENTATION_MAX_DEPTH_TO_SERIALIZE"; + + /// + /// Configuration key for the maximum duration (in milliseconds) to run serialization for probe snapshots. + /// Default value is 150 ms. + /// + public const string MaxTimeToSerialize = "DD_DYNAMIC_INSTRUMENTATION_MAX_TIME_TO_SERIALIZE"; + + /// + /// Configuration key for set of identifiers that are excluded from redaction decisions. + /// + public const string RedactedExcludedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_EXCLUDED_IDENTIFIERS"; + + /// + /// Configuration key for set of identifiers that are used in redaction decisions. + /// + public const string RedactedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS"; + + /// + /// Configuration key for set of types that are used in redaction decisions. + /// + public const string RedactedTypes = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_TYPES"; + + /// + /// Configuration key for set of identifiers that are excluded from redaction decisions. + /// + public const string RedactionExcludedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTION_EXCLUDED_IDENTIFIERS"; + + /// + /// Configuration key for the maximum upload batch size. + /// Default value is 100. + /// + public const string UploadBatchSize = "DD_DYNAMIC_INSTRUMENTATION_UPLOAD_BATCH_SIZE"; + + /// + /// Configuration key for the interval (in milliseconds) between flushing statuses. + /// Default value is 0 (dynamic). + /// + public const string UploadFlushInterval = "DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL"; + + /// + /// Configuration key to enable capturing the variables of all the frames in exception call stack. + /// Default value is false. + /// + public const string ExceptionReplayCaptureFullCallStackEnabled = "DD_EXCEPTION_REPLAY_CAPTURE_FULL_CALLSTACK_ENABLED"; + + /// + /// Configuration key for the maximum number of frames in a call stack we would like to capture values for. + /// + public const string ExceptionReplayCaptureMaxFrames = "DD_EXCEPTION_REPLAY_CAPTURE_MAX_FRAMES"; + + /// + /// Configuration key for enabling or disabling Exception Replay. + /// Default value is false (disabled). + /// + public const string ExceptionReplayEnabled = "DD_EXCEPTION_REPLAY_ENABLED"; + + /// + /// Configuration key for setting the maximum number of exceptions to be analyzed by Exception Replay within a 1-second time interval. + /// Default value is 100. + /// + public const string MaxExceptionAnalysisLimit = "DD_EXCEPTION_REPLAY_MAX_EXCEPTION_ANALYSIS_LIMIT"; + + /// + /// Configuration key for the interval used to track exceptions + /// Default value is 1h. + /// + public const string RateLimitSeconds = "DD_EXCEPTION_REPLAY_RATE_LIMIT_SECONDS"; + + /// + /// Configuration key for the maximum symbol size to upload (in bytes). + /// Default value is 1 mb. + /// + public const string SymbolDatabaseBatchSizeInBytes = "DD_SYMBOL_DATABASE_BATCH_SIZE_BYTES"; + + /// + /// Configuration key for enabling or disabling compression for symbols payload. + /// Default value is true (enabled). + /// + public const string SymbolDatabaseCompressionEnabled = "DD_SYMBOL_DATABASE_COMPRESSION_ENABLED"; + + /// + /// Configuration key for a separated comma list of libraries to exclude in the 3rd party detection + /// Default value is empty. + /// + public const string SymDbThirdPartyDetectionExcludes = "DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_EXCLUDES"; + + /// + /// Configuration key for a separated comma list of libraries to include in the 3rd party detection + /// Default value is empty. + /// + public const string SymDbThirdPartyDetectionIncludes = "DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_INCLUDES"; + + /// + /// Configuration key for allowing upload of symbol data (such as method names, parameter names, etc) to Datadog. + /// Default value is true (enabled). + /// + public const string SymbolDatabaseUploadEnabled = "DD_SYMBOL_DATABASE_UPLOAD_ENABLED"; + + /// + /// Configuration key for a separated comma list of libraries to exclude for the 3rd party detection + /// Default value is empty. + /// + public const string ThirdPartyDetectionExcludes = "DD_THIRD_PARTY_DETECTION_EXCLUDES"; + + /// + /// Configuration key for a separated comma list of libraries to include in the 3rd party detection + /// Default value is empty. + /// + public const string ThirdPartyDetectionIncludes = "DD_THIRD_PARTY_DETECTION_INCLUDES"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs new file mode 100644 index 000000000000..ac45d3790064 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs @@ -0,0 +1,84 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class DirectLogSubmission + { + /// + /// Configuration key to enable or disable direct log submission for Azure Functions host. + /// Default value is false. + /// + public const string AzureFunctionsHostEnabled = "DD_LOGS_DIRECT_SUBMISSION_AZURE_FUNCTIONS_HOST_ENABLED"; + + /// + /// Configuration key for the time to wait between checking for batches + /// Default value is 2s. + /// + public const string BatchPeriodSeconds = "DD_LOGS_DIRECT_SUBMISSION_BATCH_PERIOD_SECONDS"; + + /// + /// Set the name of the originating host for direct logs submission. + /// Required for direct logs submission (default is machine name). + /// + public const string Host = "DD_LOGS_DIRECT_SUBMISSION_HOST"; + + /// + /// Configuration key for a list of direct log submission integrations to enable. + /// Only selected integrations are enabled for direct log submission + /// Default is empty (direct log submission disabled). + /// Supports multiple values separated with semi-colons. + /// + public const string EnabledIntegrations = "DD_LOGS_DIRECT_SUBMISSION_INTEGRATIONS"; + + /// + /// Configuration key for the maximum number of logs to send at one time + /// Default value is 1,000, the maximum accepted by the Datadog log API + /// + public const string BatchSizeLimit = "DD_LOGS_DIRECT_SUBMISSION_MAX_BATCH_SIZE"; + + /// + /// Configuration key for the maximum number of logs to hold in internal queue at any one time + /// Default value is 100,000. + /// + public const string QueueSizeLimit = "DD_LOGS_DIRECT_SUBMISSION_MAX_QUEUE_SIZE"; + + /// + /// Configuration key for the minimum level logs should have to be sent to the intake. + /// Default value is Information. + /// Should be one of Verbose,Debug,Information,Warning,Error,Fatal + /// + public const string MinimumLevel = "DD_LOGS_DIRECT_SUBMISSION_MINIMUM_LEVEL"; + + /// + /// Set the originating source for direct logs submission. + /// Default is 'csharp' + /// + public const string Source = "DD_LOGS_DIRECT_SUBMISSION_SOURCE"; + + /// + /// Configuration key for a list of tags to be applied globally to all logs directly submitted. + /// Supports multiple key key-value pairs which are comma-separated, and for which the key and + /// value are colon-separated. For example Key1:Value1, Key2:Value2. If not provided, + /// are used instead + /// + public const string GlobalTags = "DD_LOGS_DIRECT_SUBMISSION_TAGS"; + + /// + /// Configuration key for the url to send logs to. + /// Default value uses the domain set in , so defaults to + /// https://http-intake.logs.datadoghq.com:443. + /// + public const string Url = "DD_LOGS_DIRECT_SUBMISSION_URL"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs new file mode 100644 index 000000000000..45544f8f1af7 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs @@ -0,0 +1,119 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class FeatureFlags + { + /// + /// Enables support for collecting and exporting logs generated by the the OpenTelemetry Logs API. + /// This feature is available starting with .NET 3.1 when using Microsoft.Extensions.Logging + /// + public const string OpenTelemetryLogsEnabled = "DD_LOGS_OTEL_ENABLED"; + + /// + /// Enables experimental support for exporting OTLP metrics generated by the OpenTelemetry Metrics API. + /// This feature is only available starting with .NET 6.0, as it relies on the BCL class MeterListener + /// which is shipped in-box starting with .NET 6. + /// + public const string OpenTelemetryMetricsEnabled = "DD_METRICS_OTEL_ENABLED"; + + /// + /// List of meters to add to the metrics exporter for the experimental OpenTelemetry Metrics API support. + /// + public const string OpenTelemetryMeterNames = "DD_METRICS_OTEL_METER_NAMES"; + + /// + /// Enables generating 128-bit trace ids instead of 64-bit trace ids. + /// Note that a 128-bit trace id may be received from an upstream service or from + /// an Activity even if we are not generating them ourselves. + /// Default value is true (enabled). + /// + public const string TraceId128BitGenerationEnabled = "DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED"; + + /// + /// Enables injecting 128-bit trace ids into logs as a hexadecimal string. + /// If disabled, 128-bit trace ids will be truncated to the lower 64 bits, + /// and injected as decimal strings. 64-bit trace ids are + /// always injected as decimal strings, regardless of this setting. + /// If unset, this configuration will take the value of the configuration, + /// which is true by default. + /// Note: This configuration can be set independently of the configuration, + /// 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 + /// services may contain 128-bit trace ids. + /// + public const string TraceId128BitLoggingEnabled = "DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED"; + + public const string BypassHttpRequestUrlCachingEnabled = "DD_TRACE_BYPASS_HTTP_REQUEST_URL_CACHING_ENABLED"; + + public const string CommandsCollectionEnabled = "DD_TRACE_COMMANDS_COLLECTION_ENABLED"; + + /// + /// Configuration key to enable or disable the updated WCF instrumentation that delays execution + /// until later in the WCF pipeline when the WCF server exception handling is established. + /// + /// + public const string DelayWcfInstrumentationEnabled = "DD_TRACE_DELAY_WCF_INSTRUMENTATION_ENABLED"; + + /// + /// Enables a fix for header tags normalization. + /// We used to normalize tag names even if they were specified in user configuration, but we should not. + /// Default value is true. + /// + public const string HeaderTagsNormalizationFixEnabled = "DD_TRACE_HEADER_TAG_NORMALIZATION_FIX_ENABLED"; + + public const string InferredProxySpansEnabled = "DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED"; + + /// + /// Configuration key to enable or disable the injection of the Datadog trace context into stored procedures. + /// Default value is false (enabled). + /// When enabled, Datadog trace context will be injected into individual stored procedure calls when the following requirements are met: + ///
    + ///
  • The database is Microsoft SQL Server and is set to + /// service or + /// full.
  • + ///
  • The stored procedure call does not have Output, InputOutput, or Return ADO.NET command parameters.
  • + ///
+ ///
+ public const string InjectContextIntoStoredProceduresEnabled = "DD_TRACE_INJECT_CONTEXT_INTO_STORED_PROCEDURES_ENABLED"; + + /// + /// Enables beta support for instrumentation via the System.Diagnostics API and the OpenTelemetry SDK. + /// + public const string OpenTelemetryEnabled = "DD_TRACE_OTEL_ENABLED"; + + /// + /// Feature Flag: enables updated resource names on `aspnet.request`, `aspnet-mvc.request`, + /// `aspnet-webapi.request`, and `aspnet_core.request` spans. Enables `aspnet_core_mvc.request` spans and + /// additional features on `aspnet_core.request` spans. + /// + /// + public const string RouteTemplateResourceNamesEnabled = "DD_TRACE_ROUTE_TEMPLATE_RESOURCE_NAMES_ENABLED"; + + /// + /// Feature flag to enable obfuscating the LocalPath of a WCF request that goes + /// into the resourceName of a span. + /// Note: that this only applies when the WCF action is an empty string. + /// + /// + public const string WcfObfuscationEnabled = "DD_TRACE_WCF_RESOURCE_OBFUSCATION_ENABLED"; + + /// + /// Configuration key to enable or disable improved template-based resource names + /// when using WCF Web HTTP. Requires be set + /// to true. Enabled by default + /// + /// + public const string WcfWebHttpResourceNamesEnabled = "DD_TRACE_WCF_WEB_HTTP_RESOURCE_NAMES_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs new file mode 100644 index 000000000000..70d5e7dc0eb5 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs @@ -0,0 +1,113 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Iast + { + /// + /// Configuration key for number of rows to taint on each Db query in IAST. + /// Default value is 1 + /// + public const string CookieFilterRegex = "DD_IAST_COOKIE_FILTER_PATTERN"; + + /// + /// Configuration key for number of rows to taint on each Db query in IAST. + /// Default value is 1 + /// + public const string DataBaseRowsToTaint = "DD_IAST_DB_ROWS_TO_TAINT"; + + /// + /// Configuration key for enabling or disabling the vulnerability duplication detection. + /// When enabled, a vulnerability will only be reported once in the lifetime of an app, + /// instead of on every usage. Default is value is true (enabled). + /// + public const string IsIastDeduplicationEnabled = "DD_IAST_DEDUPLICATION_ENABLED"; + + /// + /// Configuration key for enabling or disabling the IAST. + /// Default is value is false (disabled). + /// + public const string Enabled = "DD_IAST_ENABLED"; + + /// + /// Configuration key for the maximum number of requests + /// to be analyzed by IAST concurrently. Defaults to 2. + /// + public const string MaxConcurrentRequests = "DD_IAST_MAX_CONCURRENT_REQUESTS"; + + /// + /// Configuration key for the maximum number of ranges + /// a tainted object can hold. Defaults to 10. + /// + public const string MaxRangeCount = "DD_IAST_MAX_RANGE_COUNT"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source keys. + /// Default value is in TracerSettings + /// + public const string RedactionEnabled = "DD_IAST_REDACTION_ENABLED"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source keys. + /// Default value is in TracerSettings + /// + public const string RedactionKeysRegex = "DD_IAST_REDACTION_NAME_PATTERN"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source values. + /// Default value is in TracerSettings + /// + public const string RedactionValuesRegex = "DD_IAST_REDACTION_VALUE_PATTERN"; + + /// + /// Configuration key for specifying a timeout in milliseconds to the execution of regexes in IAST + /// Default value is 200ms + /// + public const string RegexTimeout = "DD_IAST_REGEXP_TIMEOUT"; + + /// + /// Configuration key for controlling the percentage of requests + /// to be analyzed by IAST, between 1 and 100. Defaults to 30. + /// + public const string RequestSampling = "DD_IAST_REQUEST_SAMPLING"; + + /// + /// Configuration key for IAST verbosity. + /// Default value is INFORMATION + /// + public const string TelemetryVerbosity = "DD_IAST_TELEMETRY_VERBOSITY"; + + /// + /// Configuration key for IAST evidence max lenght in chars. + /// Default value is 250 + /// + public const string TruncationMaxValueLength = "DD_IAST_TRUNCATION_MAX_VALUE_LENGTH"; + + /// + /// Configuration key for the maximum number of IAST vulnerabilities to + /// detect in a request. Defaults to 2. + /// + public const string VulnerabilitiesPerRequest = "DD_IAST_VULNERABILITIES_PER_REQUEST"; + + /// + /// Configuration key for controlling which weak cipher algorithms are reported. + /// + public const string WeakCipherAlgorithms = "DD_IAST_WEAK_CIPHER_ALGORITHMS"; + + /// + /// Configuration key for controlling which weak hashing algorithms are reported. + /// + public const string WeakHashAlgorithms = "DD_IAST_WEAK_HASH_ALGORITHMS"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs new file mode 100644 index 000000000000..b579ba304a13 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs @@ -0,0 +1,187 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class OpenTelemetry + { + /// + /// Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). + /// Used when is not set. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318 + /// + public const string ExporterOtlpEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP export (fallback for metrics-specific headers). + /// Used when is not set. + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpHeaders = "OTEL_EXPORTER_OTLP_HEADERS"; + + /// + /// Configuration key to set the OTLP endpoint URL for logs. + /// Takes precedence over `OTEL_EXPORTER_OTLP_ENDPOINT`. + /// This value typically ends with `/v1/logs` when using OTLP/HTTP. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipe\name` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318/v1/logs + /// + public const string ExporterOtlpLogsEndpoint = "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP logs export. + /// Takes precedence over . + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpLogsHeaders = "OTEL_EXPORTER_OTLP_LOGS_HEADERS"; + + public const string ExporterOtlpLogsProtocol = "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL"; + + /// + /// Configuration key to set the request timeout for OTLP logs export in milliseconds. + /// Takes precedence over . + /// Default value is 10000ms. + /// + public const string ExporterOtlpLogsTimeoutMs = "OTEL_EXPORTER_OTLP_LOGS_TIMEOUT"; + + /// + /// Configuration key to set the OTLP endpoint URL for metrics. + /// Takes precedence over . + /// This value typically ends with v1/metrics when using OTLP/HTTP. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318/v1/metrics + /// + public const string ExporterOtlpMetricsEndpoint = "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP metrics export. + /// Takes precedence over . + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpMetricsHeaders = "OTEL_EXPORTER_OTLP_METRICS_HEADERS"; + + /// + /// Configuration key to set the OTLP protocol for metrics export. + /// Takes precedence over . + /// Valid values: grpc, http/protobuf, http/json, defaults to http/protobuf. + /// + public const string ExporterOtlpMetricsProtocol = "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL"; + + /// + /// Configuration key to set the temporality preference for OTLP metrics export. + /// Supported values: delta, cumulative, lowmemory. + /// Default value is delta for Datadog. + /// This deviates from OpenTelemetry specification default of cumulative. + /// + public const string ExporterOtlpMetricsTemporalityPreference = "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"; + + /// + /// Configuration key to set the request timeout for OTLP metrics export in milliseconds. + /// Takes precedence over . + /// Default value is 10000ms. + /// + public const string ExporterOtlpMetricsTimeoutMs = "OTEL_EXPORTER_OTLP_METRICS_TIMEOUT"; + + /// + /// Configuration key to set the OTLP protocol (fallback for metrics-specific protocol). + /// Used when is not set. + /// Valid values: grpc, http/protobuf, http/json, defaults to http/protobuf. + /// + public const string ExporterOtlpProtocol = "OTEL_EXPORTER_OTLP_PROTOCOL"; + + /// + /// Configuration key to set the request timeout for OTLP export (fallback for metrics-specific timeout). + /// Used when is not set. + /// Default value is 10000ms. + /// + public const string ExporterOtlpTimeoutMs = "OTEL_EXPORTER_OTLP_TIMEOUT"; + + /// + /// Configuration key to set the log level. + /// + public const string LogLevel = "OTEL_LOG_LEVEL"; + + public const string LogsExporter = "OTEL_LOGS_EXPORTER"; + + /// + /// Configuration key to set the export interval for metrics in milliseconds. + /// Specifies the time interval between the start of two export attempts. + /// Default value is 10000ms (10s) for Datadog. + /// This deviates from OpenTelemetry specification default of 60000ms (60s). + /// + public const string MetricExportIntervalMs = "OTEL_METRIC_EXPORT_INTERVAL"; + + /// + /// Configuration key to set the export timeout for metrics in milliseconds. + /// Specifies the maximum time allowed for collecting and exporting metrics. + /// Default value is 7500ms (7.5s) for Datadog. + /// This deviates from OpenTelemetry specification default of 30000ms (30s). + /// + public const string MetricExportTimeoutMs = "OTEL_METRIC_EXPORT_TIMEOUT"; + + /// + /// Configuration key to set the exporter for metrics. + /// We only recognize the values of 'otlp' and 'none', a value of + /// 'none' disables the emission of metrics which is the + /// equivalent of setting + /// to false. + /// + public const string MetricsExporter = "OTEL_METRICS_EXPORTER"; + + /// + /// Configuration key for a list of tracing propagators. + /// Datadog only supports a subset of the OpenTelemetry propagators. + /// Also, the 'b3' OpenTelemetry propagator is mapped to the + /// 'b3 single header' Datadog propagator. + /// + public const string Propagators = "OTEL_PROPAGATORS"; + + /// + /// Configuration key for a list of key-value pairs to be set as + /// resource attributes. We currently map these to span tags. + /// + public const string ResourceAttributes = "OTEL_RESOURCE_ATTRIBUTES"; + + /// + /// Configuration key for disabling the OpenTelemetry API's. + /// + public const string SdkDisabled = "OTEL_SDK_DISABLED"; + + /// + /// Configuration key to set the application's default service name. + /// + public const string ServiceName = "OTEL_SERVICE_NAME"; + + /// + /// Configuration key to set the exporter for traces. + /// We only recognize the value 'none', which is the + /// equivalent of setting + /// to false. + /// + public const string TracesExporter = "OTEL_TRACES_EXPORTER"; + + /// + /// Configuration key to set the sampler for traces. + /// to false. + /// + public const string TracesSampler = "OTEL_TRACES_SAMPLER"; + + /// + /// Configuration key to set an additional argument for the + /// traces sampler. + /// to false. + /// + public const string TracesSamplerArg = "OTEL_TRACES_SAMPLER_ARG"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs new file mode 100644 index 000000000000..214e0fd43188 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs @@ -0,0 +1,26 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Profiler + { + public const string CodeHotspotsEnabled = "DD_PROFILING_CODEHOTSPOTS_ENABLED"; + + public const string ProfilingEnabled = "DD_PROFILING_ENABLED"; + + public const string EndpointProfilingEnabled = "DD_PROFILING_ENDPOINT_COLLECTION_ENABLED"; + + public const string ProfilerManagedActivationEnabled = "DD_PROFILING_MANAGED_ACTIVATION_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs new file mode 100644 index 000000000000..e472649bb94e --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs @@ -0,0 +1,29 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Proxy + { + /// + /// Configuration key to set a proxy server for https requests. + /// + public const string ProxyHttps = "DD_PROXY_HTTPS"; + + /// + /// Configuration key to set a list of hosts that should bypass the proxy. + /// The list is space-separated. + /// + public const string ProxyNoProxy = "DD_PROXY_NO_PROXY"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs new file mode 100644 index 000000000000..fad55b9a2a80 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs @@ -0,0 +1,34 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Rcm + { + public const string PollIntervalInternal = "DD_INTERNAL_RCM_POLL_INTERVAL"; + + /// + /// Configuration key for RCM poll interval (in seconds). + /// Default value is 5 s + /// Maximum value is 5 s + /// + public const string PollInterval = "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS"; + + /// + /// Is remote configuration management (RCM) enabled. Defaults to true. RCM requires + /// the use of the full agent, so will not always be available. This switch is primarily + /// intended for testing and for explicitly disabling RCM even though it is available. + /// + public const string RemoteConfigurationEnabled = "DD_REMOTE_CONFIGURATION_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs new file mode 100644 index 000000000000..34d2069e80b6 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs @@ -0,0 +1,27 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class TagPropagation + { + /// + /// Configuration key for the maximum length of an outgoing propagation header's value ("x-datadog-tags") + /// when injecting it into downstream service calls. + /// + /// This value is not used when extracting an incoming propagation header from an upstream service. + /// + /// + public const string HeaderMaxLength = "DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs new file mode 100644 index 000000000000..a2d654a00591 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -0,0 +1,81 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Telemetry + { + /// + /// Configuration key for sending telemetry via agent proxy. If enabled, sends telemetry + /// via agent proxy. Enabled by default. If disabled, or agent is not available, telemetry + /// is sent to agentless endpoint, based on setting. + /// + public const string AgentProxyEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENT_PROXY_ENABLED"; + + /// + /// Configuration key for sending telemetry direct to telemetry intake. If enabled, and + /// is set, sends telemetry direct to intake if agent is not + /// available. Enabled by default if is available. + /// + public const string AgentlessEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENTLESS_ENABLED"; + + /// + /// Configuration key for enabling or disabling internal telemetry. + /// Default value is true (enabled). + /// + public const string Enabled = "DD_INSTRUMENTATION_TELEMETRY_ENABLED"; + + /// + /// Configuration key for the telemetry URL where the Tracer sends telemetry. Only applies when agentless + /// telemetry is in use (otherwise telemetry is sent to the agent using + /// instead) + /// + public const string Uri = "DD_INSTRUMENTATION_TELEMETRY_URL"; + + /// + /// Configuration key for whether to enable debug mode of telemetry. + /// + /// + public const string DebugEnabled = "DD_INTERNAL_TELEMETRY_DEBUG_ENABLED"; + + /// + /// Configuration key for whether dependency data is sent via telemetry. + /// Required for some ASM features. Default value is true (enabled). + /// + /// + public const string DependencyCollectionEnabled = "DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED"; + + /// + /// Configuration key for how often telemetry should be sent, in seconds. Must be between 1 and 3600. + /// For testing purposes. Defaults to 60 + /// + /// + public const string HeartbeatIntervalSeconds = "DD_TELEMETRY_HEARTBEAT_INTERVAL"; + + /// + /// Configuration key for whether to enable redacted error log collection. + /// + public const string TelemetryLogsEnabled = "DD_TELEMETRY_LOG_COLLECTION_ENABLED"; + + /// + /// Configuration key for whether telemetry metrics should be sent. + /// + /// + public const string MetricsEnabled = "DD_TELEMETRY_METRICS_ENABLED"; + + /// + /// Configuration key to enable or disable the ActivityListener. + /// + public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs new file mode 100644 index 000000000000..b43bb9af380a --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -0,0 +1,736 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +/// +/// String constants for standard Datadog configuration keys. +/// Auto-generated from supported-configurations.json and supported-configurations-docs.yaml +/// +internal static partial class ConfigurationKeys2 +{ + /// + /// Configuration key for configuring the interval (in seconds) for sending stats (aka trace metrics) + /// + /// # Keys without documentation in ConfigurationKeys.cs + /// # These keys exist in supported-configurations.json but need documentation + /// + public const string StatsComputationInterval = "_DD_TRACE_STATS_COMPUTATION_INTERVAL"; + + /// + /// Configuration key for the Agent host where the Tracer can send traces. + /// Overridden by if present. + /// Default value is "localhost". + /// + /// + public const string AgentHost = "DD_AGENT_HOST"; + + /// + /// Configuration key for setting the API key, used by the Agent. + /// + public const string ApiKey = "DD_API_KEY"; + + public const string RareSamplerEnabled = "DD_APM_ENABLE_RARE_SAMPLER"; + + /// + /// Used to force a specific port binding for the Trace Agent. + /// Default value is 8126. + /// + /// + public const string TraceAgentPortKey = "DD_APM_RECEIVER_PORT"; + + /// + /// Configuration key for the unix domain socket where the Tracer can send traces. + /// Default value is null. + /// + /// + public const string TracesUnixDomainSocketPath = "DD_APM_RECEIVER_SOCKET"; + + /// + /// Configuration key for enabling or disabling the generation of APM traces. + /// Default is value is true (enabled). + /// + public const string ApmTracingEnabled = "DD_APM_TRACING_ENABLED"; + + /// + /// Configuration key for deactivating reading the application monitoring config file through libdatadog (hands off config). + /// True by default + /// + public const string ApplicationMonitoringConfigFileEnabled = "DD_APPLICATION_MONITORING_CONFIG_FILE_ENABLED"; + + /// + /// Configuration key for setting DBM propagation mode + /// Default value is disabled, expected values are either: disabled, service or full + /// + /// + public const string DbmPropagationMode = "DD_DBM_PROPAGATION_MODE"; + + /// + /// Configuration key for enabling or disabling the use of System.Diagnostics.DiagnosticSource. + /// Default value is true (enabled). + /// + public const string DiagnosticSourceEnabled = "DD_DIAGNOSTIC_SOURCE_ENABLED"; + + /// + /// Configuration key for a list of integrations to disable. All other integrations remain enabled. + /// Default is empty (all integrations are enabled). + /// Supports multiple values separated with semi-colons. + /// + /// + public const string DisabledIntegrations = "DD_DISABLED_INTEGRATIONS"; + + /// + /// Configuration key for arguments to pass to the DogStatsD process. + /// + public const string DogStatsDArgs = "DD_DOGSTATSD_ARGS"; + + /// + /// Configuration key for when a standalone instance of DogStatsD needs to be started. + /// + public const string DogStatsDPath = "DD_DOGSTATSD_PATH"; + + /// + /// Configuration key for the named pipe that DogStatsD binds to. + /// Default value is null. + /// + /// + public const string MetricsPipeName = "DD_DOGSTATSD_PIPE_NAME"; + + /// + /// Configuration key for the DogStatsd port where the Tracer can send metrics. + /// Default value is 8125. + /// + /// + public const string DogStatsdPort = "DD_DOGSTATSD_PORT"; + + /// + /// Configuration key for the unix domain socket that DogStatsD binds to. + /// Default value is null. + /// + /// + public const string MetricsUnixDomainSocketPath = "DD_DOGSTATSD_SOCKET"; + + /// + /// Configuration key for the location where the Tracer can send DogStatsD metrics. + /// Default value is "udp://127.0.0.1:8125". + /// + /// + public const string MetricsUri = "DD_DOGSTATSD_URL"; + + /// + /// Configuration key for the application's environment. Sets the "env" tag on every . + /// + /// + public const string Environment = "DD_ENV"; + + /// + /// Configuration key for the application's git commit hash. Sets the "_dd.git.commit.sha" tag on every . + /// + /// + public const string GitCommitSha = "DD_GIT_COMMIT_SHA"; + + /// + /// Configuration key for the application's git repo URL. Sets the "_dd.git.repository_url" tag on every . + /// + /// + public const string GitRepositoryUrl = "DD_GIT_REPOSITORY_URL"; + + /// + /// Configuration key for the application's client http statuses to set spans as errors by. + /// + /// + public const string DeprecatedHttpClientErrorStatusCodes = "DD_HTTP_CLIENT_ERROR_STATUSES"; + + /// + /// Configuration key for the application's server http statuses to set spans as errors by. + /// + /// + public const string DeprecatedHttpServerErrorStatusCodes = "DD_HTTP_SERVER_ERROR_STATUSES"; + + /// + /// Configuration key for enabling/disabling reporting query string + /// Default value is true + /// + /// + public const string QueryStringReportingEnabled = "DD_HTTP_SERVER_TAG_QUERY_STRING"; + + /// + /// Configuration key for setting the max size of the querystring to report, before obfuscation + /// Default value is 5000, 0 means that we don't limit the size. + /// + /// + public const string QueryStringReportingSize = "DD_HTTP_SERVER_TAG_QUERY_STRING_SIZE"; + + /// + /// Configuration key for enabling or disabling the injection of products via single step instrumentation. + /// + public const string SsiDeployed = "DD_INJECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling the Tracer's debugger mode. + /// Default is value is false (disabled). + /// + public const string WaitForDebuggerAttach = "DD_INTERNAL_WAIT_FOR_DEBUGGER_ATTACH"; + + /// + /// Configuration key for enabling or disabling the Tracer's native debugger mode. + /// Default is value is false (disabled). + /// + public const string WaitForNativeDebuggerAttach = "DD_INTERNAL_WAIT_FOR_NATIVE_DEBUGGER_ATTACH"; + + /// + /// Configuration key for enabling or disabling the automatic injection + /// of correlation identifiers into the logging context. + /// + /// + public const string LogsInjectionEnabled = "DD_LOGS_INJECTION"; + + /// + /// Configuration key for setting the approximate maximum size, + /// in bytes, for Tracer log files. + /// Default value is 10 MB. + /// + public const string MaxLogFileSize = "DD_MAX_LOGFILE_SIZE"; + + /// + /// Configuration key for setting the number of traces allowed + /// to be submitted per second. + /// + /// + [System.Obsolete("This parameter is obsolete and should be replaced by `DD_TRACE_RATE_LIMIT`")] + public const string MaxTracesSubmittedPerSecond = "DD_MAX_TRACES_PER_SECOND"; + + /// + /// Configuration key for enabling or disabling runtime metrics sent to DogStatsD. + /// Default value is false (disabled). + /// + public const string RuntimeMetricsEnabled = "DD_RUNTIME_METRICS_ENABLED"; + + /// + /// Configuration key for the application's default service name. + /// Used as the service name for top-level spans, + /// and used to determine service name of some child spans. + /// + /// + public const string ServiceName = "DD_SERVICE"; + + /// + /// Configuration key for setting the default Datadog destination site. + /// Defaults to "datadoghq.com". + /// + public const string Site = "DD_SITE"; + + /// + /// Configuration key for setting custom span sampling rules based on glob patterns. + /// Comma separated list of span sampling rules. + /// The rule is matched in order of specification. The first match in a list is used. + /// The supported glob pattern characters are '*' and '?'. + /// A '*' matches any contiguous substring. + /// A '?' matches exactly one character. + /// + /// Per entry: + /// The item "service" is a glob pattern string, to match on the service name. + /// Optional and defaults to '*'. + /// The item "name" is a glob pattern string, to match on the operation name. + /// Optional and defaults to '*'. + /// The item "sample_rate" is a float and is the probability of keeping a matched span. + /// Optional and defaults to 1.0 (keep all). + /// The item "max_per_second" is a float and is the maximum number of spans that can be kept per second for the rule. + /// Optional and defaults to unlimited. + /// + /// Examples: + /// Match all spans that have a service name of "cart" and an operation name of "checkout" with a kept limit of 1000 per second. + /// "[{"service": "cart", "name": "checkout", "max_per_second": 1000}]" + /// + /// Match 50% of spans that have a service name of "cart" and an operation name of "checkout" with a kept limit of 1000 per second. + /// "[{"service": "cart", "name": "checkout", "sample_rate": 0.5, "max_per_second": 1000}]" + /// + /// Match all spans that start with "cart" without any limits and any operation name. + /// "[{"service": "cart*"}]" + /// + /// + public const string SpanSamplingRules = "DD_SPAN_SAMPLING_RULES"; + + /// + /// Configuration key for a list of tags to be applied globally to spans. + /// Supports multiple key key-value pairs which are comma-separated, and for which the key and + /// value are colon-separated. For example Key1:Value1, Key2:Value2 + /// + /// + public const string GlobalTags = "DD_TAGS"; + + /// + /// Configuration key for arguments to pass to the Trace Agent process. + /// + public const string TraceAgentArgs = "DD_TRACE_AGENT_ARGS"; + + /// + /// Configuration key for when a standalone instance of the Trace Agent needs to be started. + /// + public const string TraceAgentPath = "DD_TRACE_AGENT_PATH"; + + /// + /// Configuration key for the Agent port where the Tracer can send traces. + /// Default value is 8126. + /// + /// + public const string AgentPort = "DD_TRACE_AGENT_PORT"; + + /// + /// Configuration key for the Agent URL where the Tracer can send traces. + /// Default value is "http://localhost:8126". + /// + /// + public const string AgentUri = "DD_TRACE_AGENT_URL"; + + /// + /// Configuration key for enabling or disabling default Analytics. + /// + /// + [System.Obsolete("Deprecated - App Analytics is deprecated")] + public const string GlobalAnalyticsEnabled = "DD_TRACE_ANALYTICS_ENABLED"; + + /// + /// Configuration key for toggling span pointers on AWS requests. + /// Default value is true + /// + public const string SpanPointersEnabled = "DD_TRACE_AWS_ADD_SPAN_POINTERS"; + + /// + /// Configuration key for enabling or disabling span links creation for Azure EventHubs batch operations. + /// When enabled, TryAdd spans are created and linked to the send span. + /// When disabled, TryAdd spans are not created, and therefore they are never linked to the send span. + /// Default value is true (enabled). + /// + /// + public const string AzureEventHubsBatchLinksEnabled = "DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED"; + + /// + /// Configuration key to enable or disable the creation of individual message spans and span links + /// when using Azure Service Bus batch operations. + /// Default value is true (enabled). + /// + /// + public const string AzureServiceBusBatchLinksEnabled = "DD_TRACE_AZURE_SERVICEBUS_BATCH_LINKS_ENABLED"; + + /// + /// Configuration key to set the maximum number of bytes that can be + /// injected into the baggage header when propagating to a downstream service. + /// Default value is 8192 bytes. + /// + /// + public const string BaggageMaximumBytes = "DD_TRACE_BAGGAGE_MAX_BYTES"; + + /// + /// Configuration key to set the maximum number of items that can be + /// injected into the baggage header when propagating to a downstream service. + /// Default value is 64 items. + /// + /// + public const string BaggageMaximumItems = "DD_TRACE_BAGGAGE_MAX_ITEMS"; + + /// + /// Configuration key for controlling which baggage keys are converted into span tags. + /// Default value is "user.id,session.id,account.id". + /// + /// Behavior options: + /// - Empty string: No baggage keys are converted into span tags (feature disabled) + /// - Comma-separated list: Only baggage keys matching exact, case-sensitive names in the list are added as span tags + /// - Wildcard (*): All baggage keys are converted into span tags + /// + /// + public const string BaggageTagKeys = "DD_TRACE_BAGGAGE_TAG_KEYS"; + + /// + /// Configuration key for setting the batch interval in milliseconds for the serialization queue. + /// Set to 0 to disable. + /// + public const string SerializationBatchInterval = "DD_TRACE_BATCH_INTERVAL"; + + /// + /// Configuration key for setting the size in bytes of the trace buffer + /// + public const string BufferSize = "DD_TRACE_BUFFER_SIZE"; + + /// + /// Configuration key indicating if the header should be collected. The default for DD_TRACE_CLIENT_IP_ENABLED is false. + /// + /// + public const string IpHeaderEnabled = "DD_TRACE_CLIENT_IP_ENABLED"; + + /// + /// Configuration key indicating the optional name of the custom header to take into account to report the ip address from. + /// If this variable is set all other IP related headers should be ignored + /// Default is value is null (do not override). + /// + /// + public const string IpHeader = "DD_TRACE_CLIENT_IP_HEADER"; + + /// + /// Configuration key for the path to the configuration file. + /// Can only be set with an environment variable + /// or in the app.config/web.config file. + /// + public const string ConfigurationFileName = "DD_TRACE_CONFIG_FILE"; + + /// + /// Use libdatadog data pipeline to send traces. + /// Default value is false (disabled). + /// + public const string TraceDataPipelineEnabled = "DD_TRACE_DATA_PIPELINE_ENABLED"; + + /// + /// Configuration key for enabling or disabling the Tracer's debug mode. + /// Default is value is false (disabled). + /// + public const string DebugEnabled = "DD_TRACE_DEBUG"; + + /// + /// Configuration key for a list of ActivitySource names (supports globbing) that will be disabled. + /// Default is empty (all ActivitySources will be subscribed to by default). + /// Disabling ActivitySources may break distributed tracing if those Activities are used to propagate trace context. + /// + /// Supports multiple values separated with commas. + /// For example: "SomeGlob.*.PatternSource,Some.Specific.Source" + /// + /// + /// + /// When the tracer doesn't subscribe to an ActivitySource, we will NOT propagate the trace context from those Activities (we don't see them anymore). + ///
This means that distributed tracing flows that rely on these Activities for context propagation + /// will break and cause disconnected traces. + ///
+ /// + /// Potential impact on distributed tracing: + /// + /// + /// + /// Service A -> Ignored Activity -> Service B + /// Creates a single trace with Service A as root and Service B as child + /// + /// + /// + /// + /// Service A -> Disabled Activity -> Service B + /// Creates TWO separate traces with Service A and Service B each as root spans + /// + /// + /// + /// + ///
+ ///
+ public const string DisabledActivitySources = "DD_TRACE_DISABLED_ACTIVITY_SOURCES"; + + /// + /// Configuration key for the comma-separated list of user disabled + /// ADO.NET CommandType names that should not have Span created for them. + /// "InterceptableDbCommand" and "ProfiledDbCommand" are always disabled by default. + /// + /// + public const string DisabledAdoNetCommandTypes = "DD_TRACE_DISABLED_ADONET_COMMAND_TYPES"; + + /// + /// Configuration key for enabling or disabling the Tracer. + /// Default is value is true (enabled). + /// + /// + public const string TraceEnabled = "DD_TRACE_ENABLED"; + + /// + /// Configuration key for controlling whether route parameters in ASP.NET and ASP.NET Core resource names + /// should be expanded with their values. Only applies when + /// is enabled. + /// + /// + public const string ExpandRouteTemplatesEnabled = "DD_TRACE_EXPAND_ROUTE_TEMPLATES_ENABLED"; + + /// + /// Configuration key to enable experimental features. + /// + public const string ExperimentalFeaturesEnabled = "DD_TRACE_EXPERIMENTAL_FEATURES_ENABLED"; + + /// + /// Configuration key for enabling the tagging of every telemetry event with git metadata. + /// Default is value is true (enabled). + /// + /// + public const string GitMetadataEnabled = "DD_TRACE_GIT_METADATA_ENABLED"; + + /// + /// Configuration key for specifying which GraphQL error extensions to capture. + /// A comma-separated list of extension keys to capture. Empty or not present means no extensions are captured. + /// + /// + public const string GraphQLErrorExtensions = "DD_TRACE_GRAPHQL_ERROR_EXTENSIONS"; + + /// + /// Configuration key for a map of metadata keys to tag names. + /// Automatically apply GRPC metadata values as tags on traces. + /// + /// + public const string GrpcTags = "DD_TRACE_GRPC_TAGS"; + + /// + /// Configuration key for a map of header keys to tag names. + /// Automatically apply header values as tags on traces. + /// + /// + public const string HeaderTags = "DD_TRACE_HEADER_TAGS"; + + /// + /// Configuration key for the application's client http statuses to set spans as errors by. + /// + /// + public const string HttpClientErrorStatusCodes = "DD_TRACE_HTTP_CLIENT_ERROR_STATUSES"; + + /// + /// Configuration key for overriding which URLs are skipped by the tracer. + /// + /// + public const string HttpClientExcludedUrlSubstrings = "DD_TRACE_HTTP_CLIENT_EXCLUDED_URL_SUBSTRINGS"; + + /// + /// Configuration key for the application's server http statuses to set spans as errors by. + /// + /// + public const string HttpServerErrorStatusCodes = "DD_TRACE_HTTP_SERVER_ERROR_STATUSES"; + + /// + /// Configuration key to enable or disable the creation of a span context on exiting a successful Kafka + /// Consumer.Consume() call, and closing the scope on entering Consumer.Consume(). + /// Default value is true (enabled). + /// + /// + public const string KafkaCreateConsumerScopeEnabled = "DD_TRACE_KAFKA_CREATE_CONSUMER_SCOPE_ENABLED"; + + /// + /// Configuration key for setting the directory of the .NET Tracer logs. + /// Overrides the value in if present. + /// Default value is "%ProgramData%"\Datadog .NET Tracer\logs\" on Windows + /// or "/var/log/datadog/dotnet/" on Linux. + /// + public const string LogDirectory = "DD_TRACE_LOG_DIRECTORY"; + + [System.Obsolete("Deprecated, use DD_TRACE_LOG_DIRECTORY instead, and make sure it is a directory and not a file path")] + public const string TraceLogPath = "DD_TRACE_LOG_PATH"; + + /// + /// Configuration key for locations to write internal diagnostic logs. + /// Currently only file is supported + /// Defaults to file + /// + public const string LogSinks = "DD_TRACE_LOG_SINKS"; + + /// + /// Configuration key for setting in number of days when to delete log files based on their last writetime date. + /// + public const string LogFileRetentionDays = "DD_TRACE_LOGFILE_RETENTION_DAYS"; + + /// + /// Configuration key for setting the number of seconds between, + /// identical log messages, for Tracer log files. + /// Default value is 0 and setting to 0 disables rate limiting. + /// + public const string LogRateLimit = "DD_TRACE_LOGGING_RATE"; + + /// + /// Configuration key for enabling automatic instrumentation on specified methods. + /// Default value is "" (disabled). + /// + public const string TraceMethods = "DD_TRACE_METHODS"; + + /// + /// Configuration key for enabling or disabling internal metrics sent to DogStatsD. + /// Default value is false (disabled). + /// + public const string TracerMetricsEnabled = "DD_TRACE_METRICS_ENABLED"; + + /// + /// Configuration key for specifying a custom regex to obfuscate query strings. + /// Default value is in TracerSettingsConstants + /// WARNING: This regex cause crashes under netcoreapp2.1 / linux / arm64, dont use on manual instrumentation in this environment + /// + /// + public const string ObfuscationQueryStringRegex = "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP"; + + /// + /// Configuration key for specifying a timeout in milliseconds to the execution of the query string obfuscation regex + /// Default value is 200ms + /// + /// + public const string ObfuscationQueryStringRegexTimeout = "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP_TIMEOUT"; + + /// + /// Configuration key to enable sending partial traces to the agent + /// + public const string PartialFlushEnabled = "DD_TRACE_PARTIAL_FLUSH_ENABLED"; + + /// + /// Configuration key to set the minimum number of closed spans in a trace before it's partially flushed + /// + public const string PartialFlushMinSpans = "DD_TRACE_PARTIAL_FLUSH_MIN_SPANS"; + + /// + /// Configuration key for automatically populating the peer.service tag + /// from predefined precursor attributes when the span attribute schema is v0. + /// This is ignored when the span attribute schema is v1 or later. + /// Default value is false + /// + public const string PeerServiceDefaultsEnabled = "DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED"; + + /// + /// Configuration key for a map of services to rename. + /// + /// + public const string PeerServiceNameMappings = "DD_TRACE_PEER_SERVICE_MAPPING"; + + /// + /// Configuration key for the named pipe where the Tracer can send traces. + /// Default value is null. + /// + /// + public const string TracesPipeName = "DD_TRACE_PIPE_NAME"; + + /// + /// Configuration key for setting the timeout in milliseconds for named pipes communication. + /// Default value is 0. + /// + /// + public const string TracesPipeTimeoutMs = "DD_TRACE_PIPE_TIMEOUT_MS"; + + /// + /// Configuration key for setting the header extraction propagation behavior. Accepted values are: + ///
    + ///
  • continue: Extracted span context becomes the parent and baggage is propagated
  • + ///
  • restart: Extracted span context becomes a span link (a new trace is started) and baggage is propagated
  • + ///
  • ignore: We disregard the incoming trace context headers and we also disregard baggage
  • + ///
+ /// Default value is continue. + ///
+ public const string PropagationBehaviorExtract = "DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT"; + + /// + /// Configuration key to configure if propagation should only extract the first header once a configure + /// propagator extracts a valid trace context. + /// + /// + public const string PropagationExtractFirstOnly = "DD_TRACE_PROPAGATION_EXTRACT_FIRST"; + + /// + /// Configuration key for setting the propagation style for both header injection and extraction. + /// If or are also defined, + /// they will override any header injections or extraction styled defined here, respectively. + /// + /// + public const string PropagationStyle = "DD_TRACE_PROPAGATION_STYLE"; + + /// + /// Configuration key for setting the header extraction propagation style. + /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header extraction styles. + /// + /// + /// + public const string PropagationStyleExtract = "DD_TRACE_PROPAGATION_STYLE_EXTRACT"; + + /// + /// Configuration key for setting the header injection propagation style. + /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header injection styles. + /// + /// + /// + public const string PropagationStyleInject = "DD_TRACE_PROPAGATION_STYLE_INJECT"; + + /// + /// Configuration key for setting the number of traces allowed + /// to be submitted per second. + /// + /// + public const string TraceRateLimit = "DD_TRACE_RATE_LIMIT"; + + /// + /// Configuration key for unifying client service names when the span + /// attribute schema is v0. This is ignored when the span attribute + /// schema is v1 or later. + /// Default value is false + /// + public const string RemoveClientServiceNamesEnabled = "DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED"; + + /// + /// Configuration key for setting the global rate for the sampler. + /// + public const string GlobalSamplingRate = "DD_TRACE_SAMPLE_RATE"; + + /// + /// Configuration key for setting custom sampling rules based on regular expressions. + /// Semi-colon separated list of sampling rules. + /// The rule is matched in order of specification. The first match in a list is used. + /// + /// Per entry: + /// The item "sample_rate" is required in decimal format. + /// The item "service" is optional in regular expression format, to match on service name. + /// The item "name" is optional in regular expression format, to match on operation name. + /// + /// To give a rate of 50% to any traces in a service starting with the text "cart": + /// '[{"sample_rate":0.5, "service":"cart.*"}]' + /// + /// To give a rate of 20% to any traces which have an operation name of "http.request": + /// '[{"sample_rate":0.2, "name":"http.request"}]' + /// + /// To give a rate of 100% to any traces within a service named "background" and with an operation name of "sql.query": + /// '[{"sample_rate":1.0, "service":"background", "name":"sql.query"}] + /// + /// To give a rate of 10% to all traces + /// '[{"sample_rate":0.1}]' + /// + /// To configure multiple rules, separate by semi-colon and order from most specific to least specific: + /// '[{"sample_rate":0.5, "service":"cart.*"}, {"sample_rate":0.2, "name":"http.request"}, {"sample_rate":1.0, "service":"background", "name":"sql.query"}, {"sample_rate":0.1}]' + /// + /// If no rules are specified, or none match, default internal sampling logic will be used. + /// + /// + public const string CustomSamplingRules = "DD_TRACE_SAMPLING_RULES"; + + /// + /// Configuration key for setting the format of . + /// Valid values are regex or glob. + /// If the value is not recognized, trace sampling rules are disabled. + /// + public const string CustomSamplingRulesFormat = "DD_TRACE_SAMPLING_RULES_FORMAT"; + + /// + /// Configuration key for a map of services to rename. + /// + /// + public const string ServiceNameMappings = "DD_TRACE_SERVICE_MAPPING"; + + /// + /// Configuration key for setting the schema version for service naming and span attributes + /// Accepted values are: "v1", "v0" + /// Default value is "v0" + /// + public const string MetadataSchemaVersion = "DD_TRACE_SPAN_ATTRIBUTE_SCHEMA"; + + /// + /// Configuration key for enabling or disabling the diagnostic log at startup + /// + /// + public const string StartupDiagnosticLogEnabled = "DD_TRACE_STARTUP_LOGS"; + + /// + /// Configuration key for enabling computation of stats (aka trace metrics) on the tracer side + /// + public const string StatsComputationEnabled = "DD_TRACE_STATS_COMPUTATION_ENABLED"; + + /// + /// Configuration key for the application's version. Sets the "version" tag on every . + /// + /// + public const string ServiceVersion = "DD_VERSION"; +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs new file mode 100644 index 000000000000..482c940fe668 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs @@ -0,0 +1,160 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class AppSec + { + /// + /// When ASM is enabled, collects in spans endpoints apis schemas analyzed by the waf, default value is true. + /// + public const string ApiSecurityEnabled = "DD_API_SECURITY_ENABLED"; + + /// + /// with a default value of true, it allows a customer to disable the collection of endpoints for API Security. + /// + public const string ApiSecurityEndpointCollectionEnabled = "DD_API_SECURITY_ENDPOINT_COLLECTION_ENABLED"; + + /// + /// with a default value of 300, it defines the maximum number of endpoints to be collected (serialized) for API Security. + /// + public const string ApiSecurityEndpointCollectionMessageLimit = "DD_API_SECURITY_ENDPOINT_COLLECTION_MESSAGE_LIMIT"; + + /// + /// Enables the parsing of the response body in the API Security module. Defaults to true + /// + public const string ApiSecurityParseResponseBody = "DD_API_SECURITY_PARSE_RESPONSE_BODY"; + + /// + /// Api security sample delay in seconds , should be a float. Set to 0 for testing purposes. default value of 30. + /// + public const string ApiSecuritySampleDelay = "DD_API_SECURITY_SAMPLE_DELAY"; + + /// + /// Automatic instrumentation of user event mode. Values can be ident, disabled, anon. + /// + public const string UserEventsAutoInstrumentationMode = "DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE"; + + /// + /// Deprecate. Automatic tracking of user events mode. Values can be disabled, safe or extended. + /// This config is in the process of being deprecated. Please use DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE + /// instead. + /// Values will be automatically translated: + /// disabled = disabled + /// safe = anon + /// extended = ident + /// + public const string UserEventsAutomatedTracking = "DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING"; + + /// + /// Configuration key for enabling or disabling the AppSec. + /// Default is value is false (disabled). + /// + public const string Enabled = "DD_APPSEC_ENABLED"; + + /// + /// Comma separated keys indicating the optional custom headers the user wants to send. + /// Default is value is null. + /// + public const string ExtraHeaders = "DD_APPSEC_EXTRA_HEADERS"; + + /// + /// Blocking response template for HTML content. This template is used in combination with the status code to craft and send a response upon blocking the request. + /// + public const string HtmlBlockedTemplate = "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_HTML"; + + /// + /// Blocking response template for Json content. This template is used in combination with the status code to craft and send a response upon blocking the request. + /// + public const string JsonBlockedTemplate = "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_JSON"; + + /// + /// Configuration key indicating the optional name of the custom header to take into account for the ip address. + /// Default is value is null (do not override). + /// + public const string CustomIpHeader = "DD_APPSEC_IPHEADER"; + + /// + /// Specifies if the AppSec traces should be explicitly kept or dropped. + /// Default is true, to keep all traces, false means drop all traces (by setting AutoReject as sampling priority). + /// For internal testing only. + /// + public const string KeepTraces = "DD_APPSEC_KEEP_TRACES"; + + /// + /// with a default value of 32, defines the maximum depth of a stack trace to be reported due to RASP events. O for unlimited. + /// + public const string MaxStackTraceDepth = "DD_APPSEC_MAX_STACK_TRACE_DEPTH"; + + /// + /// with a default value of 75, defines the percentage of frames taken from the top of the stack when trimming. Min 0, Max 100 + /// + public const string MaxStackTraceDepthTopPercent = "DD_APPSEC_MAX_STACK_TRACE_DEPTH_TOP_PERCENT"; + + /// + /// with a default value of 2, defines the maximum number of stack traces to be reported due to RASP events. 0 for unlimited. + /// + public const string MaxStackTraces = "DD_APPSEC_MAX_STACK_TRACES"; + + /// + /// The regex that will be used to obfuscate possible sensitive data in keys that are highlighted WAF as potentially malicious + /// + public const string ObfuscationParameterKeyRegex = "DD_APPSEC_OBFUSCATION_PARAMETER_KEY_REGEXP"; + + /// + /// The regex that will be used to obfuscate possible sensitive data in values that are highlighted WAF as potentially malicious + /// + public const string ObfuscationParameterValueRegex = "DD_APPSEC_OBFUSCATION_PARAMETER_VALUE_REGEXP"; + + /// + /// default value to true. Set to false to disable exploit prevention. + /// + public const string RaspEnabled = "DD_APPSEC_RASP_ENABLED"; + + /// + /// Override the default rules file provided. Must be a path to a valid JSON rules file. + /// Default is value is null (do not override). + /// + public const string Rules = "DD_APPSEC_RULES"; + + /// + /// Activate SCA (Software Composition Analysis), used in the backend + /// + public const string ScaEnabled = "DD_APPSEC_SCA_ENABLED"; + + /// + /// with a default value of true, it allows a customer to disable the generation of stack traces, for any ASM-specific purpose such as RASP. + /// + public const string StackTraceEnabled = "DD_APPSEC_STACK_TRACE_ENABLED"; + + /// + /// Limits the amount of AppSec traces sent per second with an integer value, strictly positive. + /// + public const string TraceRateLimit = "DD_APPSEC_TRACE_RATE_LIMIT"; + + /// + /// Activate debug logs for the WAF + /// + public const string WafDebugEnabled = "DD_APPSEC_WAF_DEBUG"; + + /// + /// WAF timeout in microseconds of each WAF execution (the timeout value passed to ddwaf_run). + /// + public const string WafTimeout = "DD_APPSEC_WAF_TIMEOUT"; + + /// + /// Use new unsafe encoder for the waf + /// + public const string UseUnsafeEncoder = "DD_EXPERIMENTAL_APPSEC_USE_UNSAFE_ENCODER"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs new file mode 100644 index 000000000000..38658802fc64 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs @@ -0,0 +1,32 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class AzureAppService + { + public const string SiteExtensionVersionKey = "DD_AAS_DOTNET_EXTENSION_VERSION"; + + /// + /// Used to force the loader to start dogstatsd (in case automatic instrumentation is disabled) + /// + public const string AasEnableCustomMetrics = "DD_AAS_ENABLE_CUSTOM_METRICS"; + + /// + /// Used to force the loader to start the trace agent (in case automatic instrumentation is disabled) + /// + public const string AasEnableCustomTracing = "DD_AAS_ENABLE_CUSTOM_TRACING"; + + public const string AzureAppServicesContextKey = "DD_AZURE_APP_SERVICES"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs new file mode 100644 index 000000000000..050fb9cac569 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs @@ -0,0 +1,163 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class CIVisibility + { + /// + /// An internal key used to "tell" tracer settings that we're running in CI Visibility mode + /// + public const string IsRunningInCiVisMode = "_DD_INTERNAL_IS_RUNNING_IN_CIVISIBILITY"; + + /// + /// Configuration key for enabling or disabling Agentless in CI Visibility. + /// Default value is false (disabled). + /// + public const string AgentlessEnabled = "DD_CIVISIBILITY_AGENTLESS_ENABLED"; + + /// + /// Configuration key for setting the agentless url endpoint + /// + public const string AgentlessUrl = "DD_CIVISIBILITY_AGENTLESS_URL"; + + /// + /// Configuration key for setting the code coverage collector path + /// + public const string CodeCoverageCollectorPath = "DD_CIVISIBILITY_CODE_COVERAGE_COLLECTORPATH"; + + /// + /// Configuration key for enabling or disabling jit optimizations in the Code Coverage + /// + public const string CodeCoverageEnableJitOptimizations = "DD_CIVISIBILITY_CODE_COVERAGE_ENABLE_JIT_OPTIMIZATIONS"; + + /// + /// Configuration key for enabling or disabling Code Coverage in CI Visibility. + /// + public const string CodeCoverage = "DD_CIVISIBILITY_CODE_COVERAGE_ENABLED"; + + /// + /// Configuration key for selecting the code coverage mode LineExecution or LineCallCount + /// + public const string CodeCoverageMode = "DD_CIVISIBILITY_CODE_COVERAGE_MODE"; + + /// + /// Configuration key for setting the code coverage jsons destination path. + /// + public const string CodeCoveragePath = "DD_CIVISIBILITY_CODE_COVERAGE_PATH"; + + /// + /// Configuration key for re-signing assemblies after the Code Coverage modification. + /// + public const string CodeCoverageSnkFile = "DD_CIVISIBILITY_CODE_COVERAGE_SNK_FILEPATH"; + + /// + /// Configuration key for a kill-switch that allows to explicitly disable dynamic instrumentation even if the remote setting is enabled. + /// + public const string DynamicInstrumentationEnabled = "DD_CIVISIBILITY_DI_ENABLED"; + + /// + /// Configuration key for enabling or disabling the early flake detection feature in CI Visibility + /// + public const string EarlyFlakeDetectionEnabled = "DD_CIVISIBILITY_EARLY_FLAKE_DETECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling CI Visibility. + /// Default value is false (disabled). + /// + public const string Enabled = "DD_CIVISIBILITY_ENABLED"; + + /// + /// Configuration key for setting the external code coverage file path + /// + public const string ExternalCodeCoveragePath = "DD_CIVISIBILITY_EXTERNAL_CODE_COVERAGE_PATH"; + + /// + /// Configuration key for the maximum number of retry attempts for a single test case. + /// + public const string FlakyRetryCount = "DD_CIVISIBILITY_FLAKY_RETRY_COUNT"; + + /// + /// Configuration key for a kill-switch that allows to explicitly disable retries even if the remote setting is enabled. + /// + public const string FlakyRetryEnabled = "DD_CIVISIBILITY_FLAKY_RETRY_ENABLED"; + + /// + /// Configuration key for forcing Agent's EVP Proxy + /// + public const string ForceAgentsEvpProxy = "DD_CIVISIBILITY_FORCE_AGENT_EVP_PROXY"; + + /// + /// Configuration key for enabling or disabling Datadog.Trace GAC installation + /// + public const string InstallDatadogTraceInGac = "DD_CIVISIBILITY_GAC_INSTALL_ENABLED"; + + /// + /// Configuration key for enabling or disabling Uploading Git Metadata in CI Visibility + /// Default Value is false (disabled) + /// + public const string GitUploadEnabled = "DD_CIVISIBILITY_GIT_UPLOAD_ENABLED"; + + /// + /// Configuration key for enabling Impacted Tests Detection. + /// + public const string ImpactedTestsDetectionEnabled = "DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling Intelligent Test Runner in CI Visibility + /// Default Value is false (disabled) + /// + public const string IntelligentTestRunnerEnabled = "DD_CIVISIBILITY_ITR_ENABLED"; + + /// + /// Configuration key for enabling or disabling the known tests feature in CI Visibility + /// + public const string KnownTestsEnabled = "DD_CIVISIBILITY_KNOWN_TESTS_ENABLED"; + + /// + /// Configuration key for enabling or disabling Logs direct submission. + /// Default value is false (disabled). + /// + public const string Logs = "DD_CIVISIBILITY_LOGS_ENABLED"; + + /// + /// Configuration key for set the rum flushing wait in milliseconds + /// + public const string RumFlushWaitMillis = "DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS"; + + /// + /// Configuration key for enabling or disabling Intelligent Test Runner test skipping feature in CI Visibility + /// + public const string TestsSkippingEnabled = "DD_CIVISIBILITY_TESTSSKIPPING_ENABLED"; + + /// + /// Configuration key for the maximum number of retry attempts for the entire session. + /// + public const string TotalFlakyRetryCount = "DD_CIVISIBILITY_TOTAL_FLAKY_RETRY_COUNT"; + + /// + /// Configuration key for the number of retries to fix a flaky test. + /// + public const string TestManagementAttemptToFixRetries = "DD_TEST_MANAGEMENT_ATTEMPT_TO_FIX_RETRIES"; + + /// + /// Configuration key for enabling or disabling the Test Management feature. + /// + public const string TestManagementEnabled = "DD_TEST_MANAGEMENT_ENABLED"; + + /// + /// Configuration key for set the test session name + /// + public const string TestSessionName = "DD_TEST_SESSION_NAME"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs new file mode 100644 index 000000000000..2c29ca80c29f --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs @@ -0,0 +1,31 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class DataStreamsMonitoring + { + /// + /// Enables data streams monitoring support + /// + /// + public const string Enabled = "DD_DATA_STREAMS_ENABLED"; + + /// + /// Configuration key for enabling legacy binary headers in Data Streams Monitoring. + /// false by default if DSM is in default state, true otherwise + /// + /// + public const string LegacyHeadersEnabled = "DD_DATA_STREAMS_LEGACY_HEADERS"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs new file mode 100644 index 000000000000..41d60c3ccd61 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs @@ -0,0 +1,28 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Debug + { + /// + /// Configuration key for forcing the automatic instrumentation to only use the fallback method lookup mechanism. + /// + public const string ForceFallbackLookup = "DD_TRACE_DEBUG_LOOKUP_FALLBACK"; + + /// + /// Configuration key for forcing the automatic instrumentation to only use the mdToken method lookup mechanism. + /// + public const string ForceMdTokenLookup = "DD_TRACE_DEBUG_LOOKUP_MDTOKEN"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs new file mode 100644 index 000000000000..b83f273e5822 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs @@ -0,0 +1,157 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Debugger + { + /// + /// Configuration key to enable tag code origin for span. + /// Default value is false. + /// + public const string CodeOriginForSpansEnabled = "DD_CODE_ORIGIN_FOR_SPANS_ENABLED"; + + /// + /// Configuration key for setting the number of frames to be tagged in exit span code origin. + /// Default value is 8. + /// + public const string CodeOriginMaxUserFrames = "DD_CODE_ORIGIN_FOR_SPANS_MAX_USER_FRAMES"; + + /// + /// Configuration key for the interval (in seconds) between sending probe statuses. + /// Default value is 3600. + /// + public const string DiagnosticsInterval = "DD_DYNAMIC_INSTRUMENTATION_DIAGNOSTICS_INTERVAL"; + + /// + /// Configuration key for enabling or disabling Dynamic Instrumentation. + /// Default value is false (disabled). + /// + public const string DynamicInstrumentationEnabled = "DD_DYNAMIC_INSTRUMENTATION_ENABLED"; + + /// + /// Configuration key for the max object depth to serialize for probe snapshots. + /// Default value is 1. + /// + public const string MaxDepthToSerialize = "DD_DYNAMIC_INSTRUMENTATION_MAX_DEPTH_TO_SERIALIZE"; + + /// + /// Configuration key for the maximum duration (in milliseconds) to run serialization for probe snapshots. + /// Default value is 150 ms. + /// + public const string MaxTimeToSerialize = "DD_DYNAMIC_INSTRUMENTATION_MAX_TIME_TO_SERIALIZE"; + + /// + /// Configuration key for set of identifiers that are excluded from redaction decisions. + /// + public const string RedactedExcludedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_EXCLUDED_IDENTIFIERS"; + + /// + /// Configuration key for set of identifiers that are used in redaction decisions. + /// + public const string RedactedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS"; + + /// + /// Configuration key for set of types that are used in redaction decisions. + /// + public const string RedactedTypes = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_TYPES"; + + /// + /// Configuration key for set of identifiers that are excluded from redaction decisions. + /// + public const string RedactionExcludedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTION_EXCLUDED_IDENTIFIERS"; + + /// + /// Configuration key for the maximum upload batch size. + /// Default value is 100. + /// + public const string UploadBatchSize = "DD_DYNAMIC_INSTRUMENTATION_UPLOAD_BATCH_SIZE"; + + /// + /// Configuration key for the interval (in milliseconds) between flushing statuses. + /// Default value is 0 (dynamic). + /// + public const string UploadFlushInterval = "DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL"; + + /// + /// Configuration key to enable capturing the variables of all the frames in exception call stack. + /// Default value is false. + /// + public const string ExceptionReplayCaptureFullCallStackEnabled = "DD_EXCEPTION_REPLAY_CAPTURE_FULL_CALLSTACK_ENABLED"; + + /// + /// Configuration key for the maximum number of frames in a call stack we would like to capture values for. + /// + public const string ExceptionReplayCaptureMaxFrames = "DD_EXCEPTION_REPLAY_CAPTURE_MAX_FRAMES"; + + /// + /// Configuration key for enabling or disabling Exception Replay. + /// Default value is false (disabled). + /// + public const string ExceptionReplayEnabled = "DD_EXCEPTION_REPLAY_ENABLED"; + + /// + /// Configuration key for setting the maximum number of exceptions to be analyzed by Exception Replay within a 1-second time interval. + /// Default value is 100. + /// + public const string MaxExceptionAnalysisLimit = "DD_EXCEPTION_REPLAY_MAX_EXCEPTION_ANALYSIS_LIMIT"; + + /// + /// Configuration key for the interval used to track exceptions + /// Default value is 1h. + /// + public const string RateLimitSeconds = "DD_EXCEPTION_REPLAY_RATE_LIMIT_SECONDS"; + + /// + /// Configuration key for the maximum symbol size to upload (in bytes). + /// Default value is 1 mb. + /// + public const string SymbolDatabaseBatchSizeInBytes = "DD_SYMBOL_DATABASE_BATCH_SIZE_BYTES"; + + /// + /// Configuration key for enabling or disabling compression for symbols payload. + /// Default value is true (enabled). + /// + public const string SymbolDatabaseCompressionEnabled = "DD_SYMBOL_DATABASE_COMPRESSION_ENABLED"; + + /// + /// Configuration key for a separated comma list of libraries to exclude in the 3rd party detection + /// Default value is empty. + /// + public const string SymDbThirdPartyDetectionExcludes = "DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_EXCLUDES"; + + /// + /// Configuration key for a separated comma list of libraries to include in the 3rd party detection + /// Default value is empty. + /// + public const string SymDbThirdPartyDetectionIncludes = "DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_INCLUDES"; + + /// + /// Configuration key for allowing upload of symbol data (such as method names, parameter names, etc) to Datadog. + /// Default value is true (enabled). + /// + public const string SymbolDatabaseUploadEnabled = "DD_SYMBOL_DATABASE_UPLOAD_ENABLED"; + + /// + /// Configuration key for a separated comma list of libraries to exclude for the 3rd party detection + /// Default value is empty. + /// + public const string ThirdPartyDetectionExcludes = "DD_THIRD_PARTY_DETECTION_EXCLUDES"; + + /// + /// Configuration key for a separated comma list of libraries to include in the 3rd party detection + /// Default value is empty. + /// + public const string ThirdPartyDetectionIncludes = "DD_THIRD_PARTY_DETECTION_INCLUDES"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs new file mode 100644 index 000000000000..ac45d3790064 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs @@ -0,0 +1,84 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class DirectLogSubmission + { + /// + /// Configuration key to enable or disable direct log submission for Azure Functions host. + /// Default value is false. + /// + public const string AzureFunctionsHostEnabled = "DD_LOGS_DIRECT_SUBMISSION_AZURE_FUNCTIONS_HOST_ENABLED"; + + /// + /// Configuration key for the time to wait between checking for batches + /// Default value is 2s. + /// + public const string BatchPeriodSeconds = "DD_LOGS_DIRECT_SUBMISSION_BATCH_PERIOD_SECONDS"; + + /// + /// Set the name of the originating host for direct logs submission. + /// Required for direct logs submission (default is machine name). + /// + public const string Host = "DD_LOGS_DIRECT_SUBMISSION_HOST"; + + /// + /// Configuration key for a list of direct log submission integrations to enable. + /// Only selected integrations are enabled for direct log submission + /// Default is empty (direct log submission disabled). + /// Supports multiple values separated with semi-colons. + /// + public const string EnabledIntegrations = "DD_LOGS_DIRECT_SUBMISSION_INTEGRATIONS"; + + /// + /// Configuration key for the maximum number of logs to send at one time + /// Default value is 1,000, the maximum accepted by the Datadog log API + /// + public const string BatchSizeLimit = "DD_LOGS_DIRECT_SUBMISSION_MAX_BATCH_SIZE"; + + /// + /// Configuration key for the maximum number of logs to hold in internal queue at any one time + /// Default value is 100,000. + /// + public const string QueueSizeLimit = "DD_LOGS_DIRECT_SUBMISSION_MAX_QUEUE_SIZE"; + + /// + /// Configuration key for the minimum level logs should have to be sent to the intake. + /// Default value is Information. + /// Should be one of Verbose,Debug,Information,Warning,Error,Fatal + /// + public const string MinimumLevel = "DD_LOGS_DIRECT_SUBMISSION_MINIMUM_LEVEL"; + + /// + /// Set the originating source for direct logs submission. + /// Default is 'csharp' + /// + public const string Source = "DD_LOGS_DIRECT_SUBMISSION_SOURCE"; + + /// + /// Configuration key for a list of tags to be applied globally to all logs directly submitted. + /// Supports multiple key key-value pairs which are comma-separated, and for which the key and + /// value are colon-separated. For example Key1:Value1, Key2:Value2. If not provided, + /// are used instead + /// + public const string GlobalTags = "DD_LOGS_DIRECT_SUBMISSION_TAGS"; + + /// + /// Configuration key for the url to send logs to. + /// Default value uses the domain set in , so defaults to + /// https://http-intake.logs.datadoghq.com:443. + /// + public const string Url = "DD_LOGS_DIRECT_SUBMISSION_URL"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs new file mode 100644 index 000000000000..45544f8f1af7 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs @@ -0,0 +1,119 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class FeatureFlags + { + /// + /// Enables support for collecting and exporting logs generated by the the OpenTelemetry Logs API. + /// This feature is available starting with .NET 3.1 when using Microsoft.Extensions.Logging + /// + public const string OpenTelemetryLogsEnabled = "DD_LOGS_OTEL_ENABLED"; + + /// + /// Enables experimental support for exporting OTLP metrics generated by the OpenTelemetry Metrics API. + /// This feature is only available starting with .NET 6.0, as it relies on the BCL class MeterListener + /// which is shipped in-box starting with .NET 6. + /// + public const string OpenTelemetryMetricsEnabled = "DD_METRICS_OTEL_ENABLED"; + + /// + /// List of meters to add to the metrics exporter for the experimental OpenTelemetry Metrics API support. + /// + public const string OpenTelemetryMeterNames = "DD_METRICS_OTEL_METER_NAMES"; + + /// + /// Enables generating 128-bit trace ids instead of 64-bit trace ids. + /// Note that a 128-bit trace id may be received from an upstream service or from + /// an Activity even if we are not generating them ourselves. + /// Default value is true (enabled). + /// + public const string TraceId128BitGenerationEnabled = "DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED"; + + /// + /// Enables injecting 128-bit trace ids into logs as a hexadecimal string. + /// If disabled, 128-bit trace ids will be truncated to the lower 64 bits, + /// and injected as decimal strings. 64-bit trace ids are + /// always injected as decimal strings, regardless of this setting. + /// If unset, this configuration will take the value of the configuration, + /// which is true by default. + /// Note: This configuration can be set independently of the configuration, + /// 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 + /// services may contain 128-bit trace ids. + /// + public const string TraceId128BitLoggingEnabled = "DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED"; + + public const string BypassHttpRequestUrlCachingEnabled = "DD_TRACE_BYPASS_HTTP_REQUEST_URL_CACHING_ENABLED"; + + public const string CommandsCollectionEnabled = "DD_TRACE_COMMANDS_COLLECTION_ENABLED"; + + /// + /// Configuration key to enable or disable the updated WCF instrumentation that delays execution + /// until later in the WCF pipeline when the WCF server exception handling is established. + /// + /// + public const string DelayWcfInstrumentationEnabled = "DD_TRACE_DELAY_WCF_INSTRUMENTATION_ENABLED"; + + /// + /// Enables a fix for header tags normalization. + /// We used to normalize tag names even if they were specified in user configuration, but we should not. + /// Default value is true. + /// + public const string HeaderTagsNormalizationFixEnabled = "DD_TRACE_HEADER_TAG_NORMALIZATION_FIX_ENABLED"; + + public const string InferredProxySpansEnabled = "DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED"; + + /// + /// Configuration key to enable or disable the injection of the Datadog trace context into stored procedures. + /// Default value is false (enabled). + /// When enabled, Datadog trace context will be injected into individual stored procedure calls when the following requirements are met: + ///
    + ///
  • The database is Microsoft SQL Server and is set to + /// service or + /// full.
  • + ///
  • The stored procedure call does not have Output, InputOutput, or Return ADO.NET command parameters.
  • + ///
+ ///
+ public const string InjectContextIntoStoredProceduresEnabled = "DD_TRACE_INJECT_CONTEXT_INTO_STORED_PROCEDURES_ENABLED"; + + /// + /// Enables beta support for instrumentation via the System.Diagnostics API and the OpenTelemetry SDK. + /// + public const string OpenTelemetryEnabled = "DD_TRACE_OTEL_ENABLED"; + + /// + /// Feature Flag: enables updated resource names on `aspnet.request`, `aspnet-mvc.request`, + /// `aspnet-webapi.request`, and `aspnet_core.request` spans. Enables `aspnet_core_mvc.request` spans and + /// additional features on `aspnet_core.request` spans. + /// + /// + public const string RouteTemplateResourceNamesEnabled = "DD_TRACE_ROUTE_TEMPLATE_RESOURCE_NAMES_ENABLED"; + + /// + /// Feature flag to enable obfuscating the LocalPath of a WCF request that goes + /// into the resourceName of a span. + /// Note: that this only applies when the WCF action is an empty string. + /// + /// + public const string WcfObfuscationEnabled = "DD_TRACE_WCF_RESOURCE_OBFUSCATION_ENABLED"; + + /// + /// Configuration key to enable or disable improved template-based resource names + /// when using WCF Web HTTP. Requires be set + /// to true. Enabled by default + /// + /// + public const string WcfWebHttpResourceNamesEnabled = "DD_TRACE_WCF_WEB_HTTP_RESOURCE_NAMES_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs new file mode 100644 index 000000000000..70d5e7dc0eb5 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs @@ -0,0 +1,113 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Iast + { + /// + /// Configuration key for number of rows to taint on each Db query in IAST. + /// Default value is 1 + /// + public const string CookieFilterRegex = "DD_IAST_COOKIE_FILTER_PATTERN"; + + /// + /// Configuration key for number of rows to taint on each Db query in IAST. + /// Default value is 1 + /// + public const string DataBaseRowsToTaint = "DD_IAST_DB_ROWS_TO_TAINT"; + + /// + /// Configuration key for enabling or disabling the vulnerability duplication detection. + /// When enabled, a vulnerability will only be reported once in the lifetime of an app, + /// instead of on every usage. Default is value is true (enabled). + /// + public const string IsIastDeduplicationEnabled = "DD_IAST_DEDUPLICATION_ENABLED"; + + /// + /// Configuration key for enabling or disabling the IAST. + /// Default is value is false (disabled). + /// + public const string Enabled = "DD_IAST_ENABLED"; + + /// + /// Configuration key for the maximum number of requests + /// to be analyzed by IAST concurrently. Defaults to 2. + /// + public const string MaxConcurrentRequests = "DD_IAST_MAX_CONCURRENT_REQUESTS"; + + /// + /// Configuration key for the maximum number of ranges + /// a tainted object can hold. Defaults to 10. + /// + public const string MaxRangeCount = "DD_IAST_MAX_RANGE_COUNT"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source keys. + /// Default value is in TracerSettings + /// + public const string RedactionEnabled = "DD_IAST_REDACTION_ENABLED"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source keys. + /// Default value is in TracerSettings + /// + public const string RedactionKeysRegex = "DD_IAST_REDACTION_NAME_PATTERN"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source values. + /// Default value is in TracerSettings + /// + public const string RedactionValuesRegex = "DD_IAST_REDACTION_VALUE_PATTERN"; + + /// + /// Configuration key for specifying a timeout in milliseconds to the execution of regexes in IAST + /// Default value is 200ms + /// + public const string RegexTimeout = "DD_IAST_REGEXP_TIMEOUT"; + + /// + /// Configuration key for controlling the percentage of requests + /// to be analyzed by IAST, between 1 and 100. Defaults to 30. + /// + public const string RequestSampling = "DD_IAST_REQUEST_SAMPLING"; + + /// + /// Configuration key for IAST verbosity. + /// Default value is INFORMATION + /// + public const string TelemetryVerbosity = "DD_IAST_TELEMETRY_VERBOSITY"; + + /// + /// Configuration key for IAST evidence max lenght in chars. + /// Default value is 250 + /// + public const string TruncationMaxValueLength = "DD_IAST_TRUNCATION_MAX_VALUE_LENGTH"; + + /// + /// Configuration key for the maximum number of IAST vulnerabilities to + /// detect in a request. Defaults to 2. + /// + public const string VulnerabilitiesPerRequest = "DD_IAST_VULNERABILITIES_PER_REQUEST"; + + /// + /// Configuration key for controlling which weak cipher algorithms are reported. + /// + public const string WeakCipherAlgorithms = "DD_IAST_WEAK_CIPHER_ALGORITHMS"; + + /// + /// Configuration key for controlling which weak hashing algorithms are reported. + /// + public const string WeakHashAlgorithms = "DD_IAST_WEAK_HASH_ALGORITHMS"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs new file mode 100644 index 000000000000..b579ba304a13 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs @@ -0,0 +1,187 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class OpenTelemetry + { + /// + /// Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). + /// Used when is not set. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318 + /// + public const string ExporterOtlpEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP export (fallback for metrics-specific headers). + /// Used when is not set. + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpHeaders = "OTEL_EXPORTER_OTLP_HEADERS"; + + /// + /// Configuration key to set the OTLP endpoint URL for logs. + /// Takes precedence over `OTEL_EXPORTER_OTLP_ENDPOINT`. + /// This value typically ends with `/v1/logs` when using OTLP/HTTP. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipe\name` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318/v1/logs + /// + public const string ExporterOtlpLogsEndpoint = "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP logs export. + /// Takes precedence over . + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpLogsHeaders = "OTEL_EXPORTER_OTLP_LOGS_HEADERS"; + + public const string ExporterOtlpLogsProtocol = "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL"; + + /// + /// Configuration key to set the request timeout for OTLP logs export in milliseconds. + /// Takes precedence over . + /// Default value is 10000ms. + /// + public const string ExporterOtlpLogsTimeoutMs = "OTEL_EXPORTER_OTLP_LOGS_TIMEOUT"; + + /// + /// Configuration key to set the OTLP endpoint URL for metrics. + /// Takes precedence over . + /// This value typically ends with v1/metrics when using OTLP/HTTP. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318/v1/metrics + /// + public const string ExporterOtlpMetricsEndpoint = "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP metrics export. + /// Takes precedence over . + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpMetricsHeaders = "OTEL_EXPORTER_OTLP_METRICS_HEADERS"; + + /// + /// Configuration key to set the OTLP protocol for metrics export. + /// Takes precedence over . + /// Valid values: grpc, http/protobuf, http/json, defaults to http/protobuf. + /// + public const string ExporterOtlpMetricsProtocol = "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL"; + + /// + /// Configuration key to set the temporality preference for OTLP metrics export. + /// Supported values: delta, cumulative, lowmemory. + /// Default value is delta for Datadog. + /// This deviates from OpenTelemetry specification default of cumulative. + /// + public const string ExporterOtlpMetricsTemporalityPreference = "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"; + + /// + /// Configuration key to set the request timeout for OTLP metrics export in milliseconds. + /// Takes precedence over . + /// Default value is 10000ms. + /// + public const string ExporterOtlpMetricsTimeoutMs = "OTEL_EXPORTER_OTLP_METRICS_TIMEOUT"; + + /// + /// Configuration key to set the OTLP protocol (fallback for metrics-specific protocol). + /// Used when is not set. + /// Valid values: grpc, http/protobuf, http/json, defaults to http/protobuf. + /// + public const string ExporterOtlpProtocol = "OTEL_EXPORTER_OTLP_PROTOCOL"; + + /// + /// Configuration key to set the request timeout for OTLP export (fallback for metrics-specific timeout). + /// Used when is not set. + /// Default value is 10000ms. + /// + public const string ExporterOtlpTimeoutMs = "OTEL_EXPORTER_OTLP_TIMEOUT"; + + /// + /// Configuration key to set the log level. + /// + public const string LogLevel = "OTEL_LOG_LEVEL"; + + public const string LogsExporter = "OTEL_LOGS_EXPORTER"; + + /// + /// Configuration key to set the export interval for metrics in milliseconds. + /// Specifies the time interval between the start of two export attempts. + /// Default value is 10000ms (10s) for Datadog. + /// This deviates from OpenTelemetry specification default of 60000ms (60s). + /// + public const string MetricExportIntervalMs = "OTEL_METRIC_EXPORT_INTERVAL"; + + /// + /// Configuration key to set the export timeout for metrics in milliseconds. + /// Specifies the maximum time allowed for collecting and exporting metrics. + /// Default value is 7500ms (7.5s) for Datadog. + /// This deviates from OpenTelemetry specification default of 30000ms (30s). + /// + public const string MetricExportTimeoutMs = "OTEL_METRIC_EXPORT_TIMEOUT"; + + /// + /// Configuration key to set the exporter for metrics. + /// We only recognize the values of 'otlp' and 'none', a value of + /// 'none' disables the emission of metrics which is the + /// equivalent of setting + /// to false. + /// + public const string MetricsExporter = "OTEL_METRICS_EXPORTER"; + + /// + /// Configuration key for a list of tracing propagators. + /// Datadog only supports a subset of the OpenTelemetry propagators. + /// Also, the 'b3' OpenTelemetry propagator is mapped to the + /// 'b3 single header' Datadog propagator. + /// + public const string Propagators = "OTEL_PROPAGATORS"; + + /// + /// Configuration key for a list of key-value pairs to be set as + /// resource attributes. We currently map these to span tags. + /// + public const string ResourceAttributes = "OTEL_RESOURCE_ATTRIBUTES"; + + /// + /// Configuration key for disabling the OpenTelemetry API's. + /// + public const string SdkDisabled = "OTEL_SDK_DISABLED"; + + /// + /// Configuration key to set the application's default service name. + /// + public const string ServiceName = "OTEL_SERVICE_NAME"; + + /// + /// Configuration key to set the exporter for traces. + /// We only recognize the value 'none', which is the + /// equivalent of setting + /// to false. + /// + public const string TracesExporter = "OTEL_TRACES_EXPORTER"; + + /// + /// Configuration key to set the sampler for traces. + /// to false. + /// + public const string TracesSampler = "OTEL_TRACES_SAMPLER"; + + /// + /// Configuration key to set an additional argument for the + /// traces sampler. + /// to false. + /// + public const string TracesSamplerArg = "OTEL_TRACES_SAMPLER_ARG"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs new file mode 100644 index 000000000000..214e0fd43188 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs @@ -0,0 +1,26 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Profiler + { + public const string CodeHotspotsEnabled = "DD_PROFILING_CODEHOTSPOTS_ENABLED"; + + public const string ProfilingEnabled = "DD_PROFILING_ENABLED"; + + public const string EndpointProfilingEnabled = "DD_PROFILING_ENDPOINT_COLLECTION_ENABLED"; + + public const string ProfilerManagedActivationEnabled = "DD_PROFILING_MANAGED_ACTIVATION_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs new file mode 100644 index 000000000000..e472649bb94e --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs @@ -0,0 +1,29 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Proxy + { + /// + /// Configuration key to set a proxy server for https requests. + /// + public const string ProxyHttps = "DD_PROXY_HTTPS"; + + /// + /// Configuration key to set a list of hosts that should bypass the proxy. + /// The list is space-separated. + /// + public const string ProxyNoProxy = "DD_PROXY_NO_PROXY"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs new file mode 100644 index 000000000000..fad55b9a2a80 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs @@ -0,0 +1,34 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Rcm + { + public const string PollIntervalInternal = "DD_INTERNAL_RCM_POLL_INTERVAL"; + + /// + /// Configuration key for RCM poll interval (in seconds). + /// Default value is 5 s + /// Maximum value is 5 s + /// + public const string PollInterval = "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS"; + + /// + /// Is remote configuration management (RCM) enabled. Defaults to true. RCM requires + /// the use of the full agent, so will not always be available. This switch is primarily + /// intended for testing and for explicitly disabling RCM even though it is available. + /// + public const string RemoteConfigurationEnabled = "DD_REMOTE_CONFIGURATION_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs new file mode 100644 index 000000000000..34d2069e80b6 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs @@ -0,0 +1,27 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class TagPropagation + { + /// + /// Configuration key for the maximum length of an outgoing propagation header's value ("x-datadog-tags") + /// when injecting it into downstream service calls. + /// + /// This value is not used when extracting an incoming propagation header from an upstream service. + /// + /// + public const string HeaderMaxLength = "DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs new file mode 100644 index 000000000000..a2d654a00591 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -0,0 +1,81 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Telemetry + { + /// + /// Configuration key for sending telemetry via agent proxy. If enabled, sends telemetry + /// via agent proxy. Enabled by default. If disabled, or agent is not available, telemetry + /// is sent to agentless endpoint, based on setting. + /// + public const string AgentProxyEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENT_PROXY_ENABLED"; + + /// + /// Configuration key for sending telemetry direct to telemetry intake. If enabled, and + /// is set, sends telemetry direct to intake if agent is not + /// available. Enabled by default if is available. + /// + public const string AgentlessEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENTLESS_ENABLED"; + + /// + /// Configuration key for enabling or disabling internal telemetry. + /// Default value is true (enabled). + /// + public const string Enabled = "DD_INSTRUMENTATION_TELEMETRY_ENABLED"; + + /// + /// Configuration key for the telemetry URL where the Tracer sends telemetry. Only applies when agentless + /// telemetry is in use (otherwise telemetry is sent to the agent using + /// instead) + /// + public const string Uri = "DD_INSTRUMENTATION_TELEMETRY_URL"; + + /// + /// Configuration key for whether to enable debug mode of telemetry. + /// + /// + public const string DebugEnabled = "DD_INTERNAL_TELEMETRY_DEBUG_ENABLED"; + + /// + /// Configuration key for whether dependency data is sent via telemetry. + /// Required for some ASM features. Default value is true (enabled). + /// + /// + public const string DependencyCollectionEnabled = "DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED"; + + /// + /// Configuration key for how often telemetry should be sent, in seconds. Must be between 1 and 3600. + /// For testing purposes. Defaults to 60 + /// + /// + public const string HeartbeatIntervalSeconds = "DD_TELEMETRY_HEARTBEAT_INTERVAL"; + + /// + /// Configuration key for whether to enable redacted error log collection. + /// + public const string TelemetryLogsEnabled = "DD_TELEMETRY_LOG_COLLECTION_ENABLED"; + + /// + /// Configuration key for whether telemetry metrics should be sent. + /// + /// + public const string MetricsEnabled = "DD_TELEMETRY_METRICS_ENABLED"; + + /// + /// Configuration key to enable or disable the ActivityListener. + /// + public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs new file mode 100644 index 000000000000..b43bb9af380a --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -0,0 +1,736 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +/// +/// String constants for standard Datadog configuration keys. +/// Auto-generated from supported-configurations.json and supported-configurations-docs.yaml +/// +internal static partial class ConfigurationKeys2 +{ + /// + /// Configuration key for configuring the interval (in seconds) for sending stats (aka trace metrics) + /// + /// # Keys without documentation in ConfigurationKeys.cs + /// # These keys exist in supported-configurations.json but need documentation + /// + public const string StatsComputationInterval = "_DD_TRACE_STATS_COMPUTATION_INTERVAL"; + + /// + /// Configuration key for the Agent host where the Tracer can send traces. + /// Overridden by if present. + /// Default value is "localhost". + /// + /// + public const string AgentHost = "DD_AGENT_HOST"; + + /// + /// Configuration key for setting the API key, used by the Agent. + /// + public const string ApiKey = "DD_API_KEY"; + + public const string RareSamplerEnabled = "DD_APM_ENABLE_RARE_SAMPLER"; + + /// + /// Used to force a specific port binding for the Trace Agent. + /// Default value is 8126. + /// + /// + public const string TraceAgentPortKey = "DD_APM_RECEIVER_PORT"; + + /// + /// Configuration key for the unix domain socket where the Tracer can send traces. + /// Default value is null. + /// + /// + public const string TracesUnixDomainSocketPath = "DD_APM_RECEIVER_SOCKET"; + + /// + /// Configuration key for enabling or disabling the generation of APM traces. + /// Default is value is true (enabled). + /// + public const string ApmTracingEnabled = "DD_APM_TRACING_ENABLED"; + + /// + /// Configuration key for deactivating reading the application monitoring config file through libdatadog (hands off config). + /// True by default + /// + public const string ApplicationMonitoringConfigFileEnabled = "DD_APPLICATION_MONITORING_CONFIG_FILE_ENABLED"; + + /// + /// Configuration key for setting DBM propagation mode + /// Default value is disabled, expected values are either: disabled, service or full + /// + /// + public const string DbmPropagationMode = "DD_DBM_PROPAGATION_MODE"; + + /// + /// Configuration key for enabling or disabling the use of System.Diagnostics.DiagnosticSource. + /// Default value is true (enabled). + /// + public const string DiagnosticSourceEnabled = "DD_DIAGNOSTIC_SOURCE_ENABLED"; + + /// + /// Configuration key for a list of integrations to disable. All other integrations remain enabled. + /// Default is empty (all integrations are enabled). + /// Supports multiple values separated with semi-colons. + /// + /// + public const string DisabledIntegrations = "DD_DISABLED_INTEGRATIONS"; + + /// + /// Configuration key for arguments to pass to the DogStatsD process. + /// + public const string DogStatsDArgs = "DD_DOGSTATSD_ARGS"; + + /// + /// Configuration key for when a standalone instance of DogStatsD needs to be started. + /// + public const string DogStatsDPath = "DD_DOGSTATSD_PATH"; + + /// + /// Configuration key for the named pipe that DogStatsD binds to. + /// Default value is null. + /// + /// + public const string MetricsPipeName = "DD_DOGSTATSD_PIPE_NAME"; + + /// + /// Configuration key for the DogStatsd port where the Tracer can send metrics. + /// Default value is 8125. + /// + /// + public const string DogStatsdPort = "DD_DOGSTATSD_PORT"; + + /// + /// Configuration key for the unix domain socket that DogStatsD binds to. + /// Default value is null. + /// + /// + public const string MetricsUnixDomainSocketPath = "DD_DOGSTATSD_SOCKET"; + + /// + /// Configuration key for the location where the Tracer can send DogStatsD metrics. + /// Default value is "udp://127.0.0.1:8125". + /// + /// + public const string MetricsUri = "DD_DOGSTATSD_URL"; + + /// + /// Configuration key for the application's environment. Sets the "env" tag on every . + /// + /// + public const string Environment = "DD_ENV"; + + /// + /// Configuration key for the application's git commit hash. Sets the "_dd.git.commit.sha" tag on every . + /// + /// + public const string GitCommitSha = "DD_GIT_COMMIT_SHA"; + + /// + /// Configuration key for the application's git repo URL. Sets the "_dd.git.repository_url" tag on every . + /// + /// + public const string GitRepositoryUrl = "DD_GIT_REPOSITORY_URL"; + + /// + /// Configuration key for the application's client http statuses to set spans as errors by. + /// + /// + public const string DeprecatedHttpClientErrorStatusCodes = "DD_HTTP_CLIENT_ERROR_STATUSES"; + + /// + /// Configuration key for the application's server http statuses to set spans as errors by. + /// + /// + public const string DeprecatedHttpServerErrorStatusCodes = "DD_HTTP_SERVER_ERROR_STATUSES"; + + /// + /// Configuration key for enabling/disabling reporting query string + /// Default value is true + /// + /// + public const string QueryStringReportingEnabled = "DD_HTTP_SERVER_TAG_QUERY_STRING"; + + /// + /// Configuration key for setting the max size of the querystring to report, before obfuscation + /// Default value is 5000, 0 means that we don't limit the size. + /// + /// + public const string QueryStringReportingSize = "DD_HTTP_SERVER_TAG_QUERY_STRING_SIZE"; + + /// + /// Configuration key for enabling or disabling the injection of products via single step instrumentation. + /// + public const string SsiDeployed = "DD_INJECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling the Tracer's debugger mode. + /// Default is value is false (disabled). + /// + public const string WaitForDebuggerAttach = "DD_INTERNAL_WAIT_FOR_DEBUGGER_ATTACH"; + + /// + /// Configuration key for enabling or disabling the Tracer's native debugger mode. + /// Default is value is false (disabled). + /// + public const string WaitForNativeDebuggerAttach = "DD_INTERNAL_WAIT_FOR_NATIVE_DEBUGGER_ATTACH"; + + /// + /// Configuration key for enabling or disabling the automatic injection + /// of correlation identifiers into the logging context. + /// + /// + public const string LogsInjectionEnabled = "DD_LOGS_INJECTION"; + + /// + /// Configuration key for setting the approximate maximum size, + /// in bytes, for Tracer log files. + /// Default value is 10 MB. + /// + public const string MaxLogFileSize = "DD_MAX_LOGFILE_SIZE"; + + /// + /// Configuration key for setting the number of traces allowed + /// to be submitted per second. + /// + /// + [System.Obsolete("This parameter is obsolete and should be replaced by `DD_TRACE_RATE_LIMIT`")] + public const string MaxTracesSubmittedPerSecond = "DD_MAX_TRACES_PER_SECOND"; + + /// + /// Configuration key for enabling or disabling runtime metrics sent to DogStatsD. + /// Default value is false (disabled). + /// + public const string RuntimeMetricsEnabled = "DD_RUNTIME_METRICS_ENABLED"; + + /// + /// Configuration key for the application's default service name. + /// Used as the service name for top-level spans, + /// and used to determine service name of some child spans. + /// + /// + public const string ServiceName = "DD_SERVICE"; + + /// + /// Configuration key for setting the default Datadog destination site. + /// Defaults to "datadoghq.com". + /// + public const string Site = "DD_SITE"; + + /// + /// Configuration key for setting custom span sampling rules based on glob patterns. + /// Comma separated list of span sampling rules. + /// The rule is matched in order of specification. The first match in a list is used. + /// The supported glob pattern characters are '*' and '?'. + /// A '*' matches any contiguous substring. + /// A '?' matches exactly one character. + /// + /// Per entry: + /// The item "service" is a glob pattern string, to match on the service name. + /// Optional and defaults to '*'. + /// The item "name" is a glob pattern string, to match on the operation name. + /// Optional and defaults to '*'. + /// The item "sample_rate" is a float and is the probability of keeping a matched span. + /// Optional and defaults to 1.0 (keep all). + /// The item "max_per_second" is a float and is the maximum number of spans that can be kept per second for the rule. + /// Optional and defaults to unlimited. + /// + /// Examples: + /// Match all spans that have a service name of "cart" and an operation name of "checkout" with a kept limit of 1000 per second. + /// "[{"service": "cart", "name": "checkout", "max_per_second": 1000}]" + /// + /// Match 50% of spans that have a service name of "cart" and an operation name of "checkout" with a kept limit of 1000 per second. + /// "[{"service": "cart", "name": "checkout", "sample_rate": 0.5, "max_per_second": 1000}]" + /// + /// Match all spans that start with "cart" without any limits and any operation name. + /// "[{"service": "cart*"}]" + /// + /// + public const string SpanSamplingRules = "DD_SPAN_SAMPLING_RULES"; + + /// + /// Configuration key for a list of tags to be applied globally to spans. + /// Supports multiple key key-value pairs which are comma-separated, and for which the key and + /// value are colon-separated. For example Key1:Value1, Key2:Value2 + /// + /// + public const string GlobalTags = "DD_TAGS"; + + /// + /// Configuration key for arguments to pass to the Trace Agent process. + /// + public const string TraceAgentArgs = "DD_TRACE_AGENT_ARGS"; + + /// + /// Configuration key for when a standalone instance of the Trace Agent needs to be started. + /// + public const string TraceAgentPath = "DD_TRACE_AGENT_PATH"; + + /// + /// Configuration key for the Agent port where the Tracer can send traces. + /// Default value is 8126. + /// + /// + public const string AgentPort = "DD_TRACE_AGENT_PORT"; + + /// + /// Configuration key for the Agent URL where the Tracer can send traces. + /// Default value is "http://localhost:8126". + /// + /// + public const string AgentUri = "DD_TRACE_AGENT_URL"; + + /// + /// Configuration key for enabling or disabling default Analytics. + /// + /// + [System.Obsolete("Deprecated - App Analytics is deprecated")] + public const string GlobalAnalyticsEnabled = "DD_TRACE_ANALYTICS_ENABLED"; + + /// + /// Configuration key for toggling span pointers on AWS requests. + /// Default value is true + /// + public const string SpanPointersEnabled = "DD_TRACE_AWS_ADD_SPAN_POINTERS"; + + /// + /// Configuration key for enabling or disabling span links creation for Azure EventHubs batch operations. + /// When enabled, TryAdd spans are created and linked to the send span. + /// When disabled, TryAdd spans are not created, and therefore they are never linked to the send span. + /// Default value is true (enabled). + /// + /// + public const string AzureEventHubsBatchLinksEnabled = "DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED"; + + /// + /// Configuration key to enable or disable the creation of individual message spans and span links + /// when using Azure Service Bus batch operations. + /// Default value is true (enabled). + /// + /// + public const string AzureServiceBusBatchLinksEnabled = "DD_TRACE_AZURE_SERVICEBUS_BATCH_LINKS_ENABLED"; + + /// + /// Configuration key to set the maximum number of bytes that can be + /// injected into the baggage header when propagating to a downstream service. + /// Default value is 8192 bytes. + /// + /// + public const string BaggageMaximumBytes = "DD_TRACE_BAGGAGE_MAX_BYTES"; + + /// + /// Configuration key to set the maximum number of items that can be + /// injected into the baggage header when propagating to a downstream service. + /// Default value is 64 items. + /// + /// + public const string BaggageMaximumItems = "DD_TRACE_BAGGAGE_MAX_ITEMS"; + + /// + /// Configuration key for controlling which baggage keys are converted into span tags. + /// Default value is "user.id,session.id,account.id". + /// + /// Behavior options: + /// - Empty string: No baggage keys are converted into span tags (feature disabled) + /// - Comma-separated list: Only baggage keys matching exact, case-sensitive names in the list are added as span tags + /// - Wildcard (*): All baggage keys are converted into span tags + /// + /// + public const string BaggageTagKeys = "DD_TRACE_BAGGAGE_TAG_KEYS"; + + /// + /// Configuration key for setting the batch interval in milliseconds for the serialization queue. + /// Set to 0 to disable. + /// + public const string SerializationBatchInterval = "DD_TRACE_BATCH_INTERVAL"; + + /// + /// Configuration key for setting the size in bytes of the trace buffer + /// + public const string BufferSize = "DD_TRACE_BUFFER_SIZE"; + + /// + /// Configuration key indicating if the header should be collected. The default for DD_TRACE_CLIENT_IP_ENABLED is false. + /// + /// + public const string IpHeaderEnabled = "DD_TRACE_CLIENT_IP_ENABLED"; + + /// + /// Configuration key indicating the optional name of the custom header to take into account to report the ip address from. + /// If this variable is set all other IP related headers should be ignored + /// Default is value is null (do not override). + /// + /// + public const string IpHeader = "DD_TRACE_CLIENT_IP_HEADER"; + + /// + /// Configuration key for the path to the configuration file. + /// Can only be set with an environment variable + /// or in the app.config/web.config file. + /// + public const string ConfigurationFileName = "DD_TRACE_CONFIG_FILE"; + + /// + /// Use libdatadog data pipeline to send traces. + /// Default value is false (disabled). + /// + public const string TraceDataPipelineEnabled = "DD_TRACE_DATA_PIPELINE_ENABLED"; + + /// + /// Configuration key for enabling or disabling the Tracer's debug mode. + /// Default is value is false (disabled). + /// + public const string DebugEnabled = "DD_TRACE_DEBUG"; + + /// + /// Configuration key for a list of ActivitySource names (supports globbing) that will be disabled. + /// Default is empty (all ActivitySources will be subscribed to by default). + /// Disabling ActivitySources may break distributed tracing if those Activities are used to propagate trace context. + /// + /// Supports multiple values separated with commas. + /// For example: "SomeGlob.*.PatternSource,Some.Specific.Source" + /// + /// + /// + /// When the tracer doesn't subscribe to an ActivitySource, we will NOT propagate the trace context from those Activities (we don't see them anymore). + ///
This means that distributed tracing flows that rely on these Activities for context propagation + /// will break and cause disconnected traces. + ///
+ /// + /// Potential impact on distributed tracing: + /// + /// + /// + /// Service A -> Ignored Activity -> Service B + /// Creates a single trace with Service A as root and Service B as child + /// + /// + /// + /// + /// Service A -> Disabled Activity -> Service B + /// Creates TWO separate traces with Service A and Service B each as root spans + /// + /// + /// + /// + ///
+ ///
+ public const string DisabledActivitySources = "DD_TRACE_DISABLED_ACTIVITY_SOURCES"; + + /// + /// Configuration key for the comma-separated list of user disabled + /// ADO.NET CommandType names that should not have Span created for them. + /// "InterceptableDbCommand" and "ProfiledDbCommand" are always disabled by default. + /// + /// + public const string DisabledAdoNetCommandTypes = "DD_TRACE_DISABLED_ADONET_COMMAND_TYPES"; + + /// + /// Configuration key for enabling or disabling the Tracer. + /// Default is value is true (enabled). + /// + /// + public const string TraceEnabled = "DD_TRACE_ENABLED"; + + /// + /// Configuration key for controlling whether route parameters in ASP.NET and ASP.NET Core resource names + /// should be expanded with their values. Only applies when + /// is enabled. + /// + /// + public const string ExpandRouteTemplatesEnabled = "DD_TRACE_EXPAND_ROUTE_TEMPLATES_ENABLED"; + + /// + /// Configuration key to enable experimental features. + /// + public const string ExperimentalFeaturesEnabled = "DD_TRACE_EXPERIMENTAL_FEATURES_ENABLED"; + + /// + /// Configuration key for enabling the tagging of every telemetry event with git metadata. + /// Default is value is true (enabled). + /// + /// + public const string GitMetadataEnabled = "DD_TRACE_GIT_METADATA_ENABLED"; + + /// + /// Configuration key for specifying which GraphQL error extensions to capture. + /// A comma-separated list of extension keys to capture. Empty or not present means no extensions are captured. + /// + /// + public const string GraphQLErrorExtensions = "DD_TRACE_GRAPHQL_ERROR_EXTENSIONS"; + + /// + /// Configuration key for a map of metadata keys to tag names. + /// Automatically apply GRPC metadata values as tags on traces. + /// + /// + public const string GrpcTags = "DD_TRACE_GRPC_TAGS"; + + /// + /// Configuration key for a map of header keys to tag names. + /// Automatically apply header values as tags on traces. + /// + /// + public const string HeaderTags = "DD_TRACE_HEADER_TAGS"; + + /// + /// Configuration key for the application's client http statuses to set spans as errors by. + /// + /// + public const string HttpClientErrorStatusCodes = "DD_TRACE_HTTP_CLIENT_ERROR_STATUSES"; + + /// + /// Configuration key for overriding which URLs are skipped by the tracer. + /// + /// + public const string HttpClientExcludedUrlSubstrings = "DD_TRACE_HTTP_CLIENT_EXCLUDED_URL_SUBSTRINGS"; + + /// + /// Configuration key for the application's server http statuses to set spans as errors by. + /// + /// + public const string HttpServerErrorStatusCodes = "DD_TRACE_HTTP_SERVER_ERROR_STATUSES"; + + /// + /// Configuration key to enable or disable the creation of a span context on exiting a successful Kafka + /// Consumer.Consume() call, and closing the scope on entering Consumer.Consume(). + /// Default value is true (enabled). + /// + /// + public const string KafkaCreateConsumerScopeEnabled = "DD_TRACE_KAFKA_CREATE_CONSUMER_SCOPE_ENABLED"; + + /// + /// Configuration key for setting the directory of the .NET Tracer logs. + /// Overrides the value in if present. + /// Default value is "%ProgramData%"\Datadog .NET Tracer\logs\" on Windows + /// or "/var/log/datadog/dotnet/" on Linux. + /// + public const string LogDirectory = "DD_TRACE_LOG_DIRECTORY"; + + [System.Obsolete("Deprecated, use DD_TRACE_LOG_DIRECTORY instead, and make sure it is a directory and not a file path")] + public const string TraceLogPath = "DD_TRACE_LOG_PATH"; + + /// + /// Configuration key for locations to write internal diagnostic logs. + /// Currently only file is supported + /// Defaults to file + /// + public const string LogSinks = "DD_TRACE_LOG_SINKS"; + + /// + /// Configuration key for setting in number of days when to delete log files based on their last writetime date. + /// + public const string LogFileRetentionDays = "DD_TRACE_LOGFILE_RETENTION_DAYS"; + + /// + /// Configuration key for setting the number of seconds between, + /// identical log messages, for Tracer log files. + /// Default value is 0 and setting to 0 disables rate limiting. + /// + public const string LogRateLimit = "DD_TRACE_LOGGING_RATE"; + + /// + /// Configuration key for enabling automatic instrumentation on specified methods. + /// Default value is "" (disabled). + /// + public const string TraceMethods = "DD_TRACE_METHODS"; + + /// + /// Configuration key for enabling or disabling internal metrics sent to DogStatsD. + /// Default value is false (disabled). + /// + public const string TracerMetricsEnabled = "DD_TRACE_METRICS_ENABLED"; + + /// + /// Configuration key for specifying a custom regex to obfuscate query strings. + /// Default value is in TracerSettingsConstants + /// WARNING: This regex cause crashes under netcoreapp2.1 / linux / arm64, dont use on manual instrumentation in this environment + /// + /// + public const string ObfuscationQueryStringRegex = "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP"; + + /// + /// Configuration key for specifying a timeout in milliseconds to the execution of the query string obfuscation regex + /// Default value is 200ms + /// + /// + public const string ObfuscationQueryStringRegexTimeout = "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP_TIMEOUT"; + + /// + /// Configuration key to enable sending partial traces to the agent + /// + public const string PartialFlushEnabled = "DD_TRACE_PARTIAL_FLUSH_ENABLED"; + + /// + /// Configuration key to set the minimum number of closed spans in a trace before it's partially flushed + /// + public const string PartialFlushMinSpans = "DD_TRACE_PARTIAL_FLUSH_MIN_SPANS"; + + /// + /// Configuration key for automatically populating the peer.service tag + /// from predefined precursor attributes when the span attribute schema is v0. + /// This is ignored when the span attribute schema is v1 or later. + /// Default value is false + /// + public const string PeerServiceDefaultsEnabled = "DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED"; + + /// + /// Configuration key for a map of services to rename. + /// + /// + public const string PeerServiceNameMappings = "DD_TRACE_PEER_SERVICE_MAPPING"; + + /// + /// Configuration key for the named pipe where the Tracer can send traces. + /// Default value is null. + /// + /// + public const string TracesPipeName = "DD_TRACE_PIPE_NAME"; + + /// + /// Configuration key for setting the timeout in milliseconds for named pipes communication. + /// Default value is 0. + /// + /// + public const string TracesPipeTimeoutMs = "DD_TRACE_PIPE_TIMEOUT_MS"; + + /// + /// Configuration key for setting the header extraction propagation behavior. Accepted values are: + ///
    + ///
  • continue: Extracted span context becomes the parent and baggage is propagated
  • + ///
  • restart: Extracted span context becomes a span link (a new trace is started) and baggage is propagated
  • + ///
  • ignore: We disregard the incoming trace context headers and we also disregard baggage
  • + ///
+ /// Default value is continue. + ///
+ public const string PropagationBehaviorExtract = "DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT"; + + /// + /// Configuration key to configure if propagation should only extract the first header once a configure + /// propagator extracts a valid trace context. + /// + /// + public const string PropagationExtractFirstOnly = "DD_TRACE_PROPAGATION_EXTRACT_FIRST"; + + /// + /// Configuration key for setting the propagation style for both header injection and extraction. + /// If or are also defined, + /// they will override any header injections or extraction styled defined here, respectively. + /// + /// + public const string PropagationStyle = "DD_TRACE_PROPAGATION_STYLE"; + + /// + /// Configuration key for setting the header extraction propagation style. + /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header extraction styles. + /// + /// + /// + public const string PropagationStyleExtract = "DD_TRACE_PROPAGATION_STYLE_EXTRACT"; + + /// + /// Configuration key for setting the header injection propagation style. + /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header injection styles. + /// + /// + /// + public const string PropagationStyleInject = "DD_TRACE_PROPAGATION_STYLE_INJECT"; + + /// + /// Configuration key for setting the number of traces allowed + /// to be submitted per second. + /// + /// + public const string TraceRateLimit = "DD_TRACE_RATE_LIMIT"; + + /// + /// Configuration key for unifying client service names when the span + /// attribute schema is v0. This is ignored when the span attribute + /// schema is v1 or later. + /// Default value is false + /// + public const string RemoveClientServiceNamesEnabled = "DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED"; + + /// + /// Configuration key for setting the global rate for the sampler. + /// + public const string GlobalSamplingRate = "DD_TRACE_SAMPLE_RATE"; + + /// + /// Configuration key for setting custom sampling rules based on regular expressions. + /// Semi-colon separated list of sampling rules. + /// The rule is matched in order of specification. The first match in a list is used. + /// + /// Per entry: + /// The item "sample_rate" is required in decimal format. + /// The item "service" is optional in regular expression format, to match on service name. + /// The item "name" is optional in regular expression format, to match on operation name. + /// + /// To give a rate of 50% to any traces in a service starting with the text "cart": + /// '[{"sample_rate":0.5, "service":"cart.*"}]' + /// + /// To give a rate of 20% to any traces which have an operation name of "http.request": + /// '[{"sample_rate":0.2, "name":"http.request"}]' + /// + /// To give a rate of 100% to any traces within a service named "background" and with an operation name of "sql.query": + /// '[{"sample_rate":1.0, "service":"background", "name":"sql.query"}] + /// + /// To give a rate of 10% to all traces + /// '[{"sample_rate":0.1}]' + /// + /// To configure multiple rules, separate by semi-colon and order from most specific to least specific: + /// '[{"sample_rate":0.5, "service":"cart.*"}, {"sample_rate":0.2, "name":"http.request"}, {"sample_rate":1.0, "service":"background", "name":"sql.query"}, {"sample_rate":0.1}]' + /// + /// If no rules are specified, or none match, default internal sampling logic will be used. + /// + /// + public const string CustomSamplingRules = "DD_TRACE_SAMPLING_RULES"; + + /// + /// Configuration key for setting the format of . + /// Valid values are regex or glob. + /// If the value is not recognized, trace sampling rules are disabled. + /// + public const string CustomSamplingRulesFormat = "DD_TRACE_SAMPLING_RULES_FORMAT"; + + /// + /// Configuration key for a map of services to rename. + /// + /// + public const string ServiceNameMappings = "DD_TRACE_SERVICE_MAPPING"; + + /// + /// Configuration key for setting the schema version for service naming and span attributes + /// Accepted values are: "v1", "v0" + /// Default value is "v0" + /// + public const string MetadataSchemaVersion = "DD_TRACE_SPAN_ATTRIBUTE_SCHEMA"; + + /// + /// Configuration key for enabling or disabling the diagnostic log at startup + /// + /// + public const string StartupDiagnosticLogEnabled = "DD_TRACE_STARTUP_LOGS"; + + /// + /// Configuration key for enabling computation of stats (aka trace metrics) on the tracer side + /// + public const string StatsComputationEnabled = "DD_TRACE_STATS_COMPUTATION_ENABLED"; + + /// + /// Configuration key for the application's version. Sets the "version" tag on every . + /// + /// + public const string ServiceVersion = "DD_VERSION"; +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs new file mode 100644 index 000000000000..482c940fe668 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs @@ -0,0 +1,160 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class AppSec + { + /// + /// When ASM is enabled, collects in spans endpoints apis schemas analyzed by the waf, default value is true. + /// + public const string ApiSecurityEnabled = "DD_API_SECURITY_ENABLED"; + + /// + /// with a default value of true, it allows a customer to disable the collection of endpoints for API Security. + /// + public const string ApiSecurityEndpointCollectionEnabled = "DD_API_SECURITY_ENDPOINT_COLLECTION_ENABLED"; + + /// + /// with a default value of 300, it defines the maximum number of endpoints to be collected (serialized) for API Security. + /// + public const string ApiSecurityEndpointCollectionMessageLimit = "DD_API_SECURITY_ENDPOINT_COLLECTION_MESSAGE_LIMIT"; + + /// + /// Enables the parsing of the response body in the API Security module. Defaults to true + /// + public const string ApiSecurityParseResponseBody = "DD_API_SECURITY_PARSE_RESPONSE_BODY"; + + /// + /// Api security sample delay in seconds , should be a float. Set to 0 for testing purposes. default value of 30. + /// + public const string ApiSecuritySampleDelay = "DD_API_SECURITY_SAMPLE_DELAY"; + + /// + /// Automatic instrumentation of user event mode. Values can be ident, disabled, anon. + /// + public const string UserEventsAutoInstrumentationMode = "DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE"; + + /// + /// Deprecate. Automatic tracking of user events mode. Values can be disabled, safe or extended. + /// This config is in the process of being deprecated. Please use DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE + /// instead. + /// Values will be automatically translated: + /// disabled = disabled + /// safe = anon + /// extended = ident + /// + public const string UserEventsAutomatedTracking = "DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING"; + + /// + /// Configuration key for enabling or disabling the AppSec. + /// Default is value is false (disabled). + /// + public const string Enabled = "DD_APPSEC_ENABLED"; + + /// + /// Comma separated keys indicating the optional custom headers the user wants to send. + /// Default is value is null. + /// + public const string ExtraHeaders = "DD_APPSEC_EXTRA_HEADERS"; + + /// + /// Blocking response template for HTML content. This template is used in combination with the status code to craft and send a response upon blocking the request. + /// + public const string HtmlBlockedTemplate = "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_HTML"; + + /// + /// Blocking response template for Json content. This template is used in combination with the status code to craft and send a response upon blocking the request. + /// + public const string JsonBlockedTemplate = "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_JSON"; + + /// + /// Configuration key indicating the optional name of the custom header to take into account for the ip address. + /// Default is value is null (do not override). + /// + public const string CustomIpHeader = "DD_APPSEC_IPHEADER"; + + /// + /// Specifies if the AppSec traces should be explicitly kept or dropped. + /// Default is true, to keep all traces, false means drop all traces (by setting AutoReject as sampling priority). + /// For internal testing only. + /// + public const string KeepTraces = "DD_APPSEC_KEEP_TRACES"; + + /// + /// with a default value of 32, defines the maximum depth of a stack trace to be reported due to RASP events. O for unlimited. + /// + public const string MaxStackTraceDepth = "DD_APPSEC_MAX_STACK_TRACE_DEPTH"; + + /// + /// with a default value of 75, defines the percentage of frames taken from the top of the stack when trimming. Min 0, Max 100 + /// + public const string MaxStackTraceDepthTopPercent = "DD_APPSEC_MAX_STACK_TRACE_DEPTH_TOP_PERCENT"; + + /// + /// with a default value of 2, defines the maximum number of stack traces to be reported due to RASP events. 0 for unlimited. + /// + public const string MaxStackTraces = "DD_APPSEC_MAX_STACK_TRACES"; + + /// + /// The regex that will be used to obfuscate possible sensitive data in keys that are highlighted WAF as potentially malicious + /// + public const string ObfuscationParameterKeyRegex = "DD_APPSEC_OBFUSCATION_PARAMETER_KEY_REGEXP"; + + /// + /// The regex that will be used to obfuscate possible sensitive data in values that are highlighted WAF as potentially malicious + /// + public const string ObfuscationParameterValueRegex = "DD_APPSEC_OBFUSCATION_PARAMETER_VALUE_REGEXP"; + + /// + /// default value to true. Set to false to disable exploit prevention. + /// + public const string RaspEnabled = "DD_APPSEC_RASP_ENABLED"; + + /// + /// Override the default rules file provided. Must be a path to a valid JSON rules file. + /// Default is value is null (do not override). + /// + public const string Rules = "DD_APPSEC_RULES"; + + /// + /// Activate SCA (Software Composition Analysis), used in the backend + /// + public const string ScaEnabled = "DD_APPSEC_SCA_ENABLED"; + + /// + /// with a default value of true, it allows a customer to disable the generation of stack traces, for any ASM-specific purpose such as RASP. + /// + public const string StackTraceEnabled = "DD_APPSEC_STACK_TRACE_ENABLED"; + + /// + /// Limits the amount of AppSec traces sent per second with an integer value, strictly positive. + /// + public const string TraceRateLimit = "DD_APPSEC_TRACE_RATE_LIMIT"; + + /// + /// Activate debug logs for the WAF + /// + public const string WafDebugEnabled = "DD_APPSEC_WAF_DEBUG"; + + /// + /// WAF timeout in microseconds of each WAF execution (the timeout value passed to ddwaf_run). + /// + public const string WafTimeout = "DD_APPSEC_WAF_TIMEOUT"; + + /// + /// Use new unsafe encoder for the waf + /// + public const string UseUnsafeEncoder = "DD_EXPERIMENTAL_APPSEC_USE_UNSAFE_ENCODER"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs new file mode 100644 index 000000000000..38658802fc64 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AzureAppService.g.cs @@ -0,0 +1,32 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class AzureAppService + { + public const string SiteExtensionVersionKey = "DD_AAS_DOTNET_EXTENSION_VERSION"; + + /// + /// Used to force the loader to start dogstatsd (in case automatic instrumentation is disabled) + /// + public const string AasEnableCustomMetrics = "DD_AAS_ENABLE_CUSTOM_METRICS"; + + /// + /// Used to force the loader to start the trace agent (in case automatic instrumentation is disabled) + /// + public const string AasEnableCustomTracing = "DD_AAS_ENABLE_CUSTOM_TRACING"; + + public const string AzureAppServicesContextKey = "DD_AZURE_APP_SERVICES"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs new file mode 100644 index 000000000000..050fb9cac569 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.CIVisibility.g.cs @@ -0,0 +1,163 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class CIVisibility + { + /// + /// An internal key used to "tell" tracer settings that we're running in CI Visibility mode + /// + public const string IsRunningInCiVisMode = "_DD_INTERNAL_IS_RUNNING_IN_CIVISIBILITY"; + + /// + /// Configuration key for enabling or disabling Agentless in CI Visibility. + /// Default value is false (disabled). + /// + public const string AgentlessEnabled = "DD_CIVISIBILITY_AGENTLESS_ENABLED"; + + /// + /// Configuration key for setting the agentless url endpoint + /// + public const string AgentlessUrl = "DD_CIVISIBILITY_AGENTLESS_URL"; + + /// + /// Configuration key for setting the code coverage collector path + /// + public const string CodeCoverageCollectorPath = "DD_CIVISIBILITY_CODE_COVERAGE_COLLECTORPATH"; + + /// + /// Configuration key for enabling or disabling jit optimizations in the Code Coverage + /// + public const string CodeCoverageEnableJitOptimizations = "DD_CIVISIBILITY_CODE_COVERAGE_ENABLE_JIT_OPTIMIZATIONS"; + + /// + /// Configuration key for enabling or disabling Code Coverage in CI Visibility. + /// + public const string CodeCoverage = "DD_CIVISIBILITY_CODE_COVERAGE_ENABLED"; + + /// + /// Configuration key for selecting the code coverage mode LineExecution or LineCallCount + /// + public const string CodeCoverageMode = "DD_CIVISIBILITY_CODE_COVERAGE_MODE"; + + /// + /// Configuration key for setting the code coverage jsons destination path. + /// + public const string CodeCoveragePath = "DD_CIVISIBILITY_CODE_COVERAGE_PATH"; + + /// + /// Configuration key for re-signing assemblies after the Code Coverage modification. + /// + public const string CodeCoverageSnkFile = "DD_CIVISIBILITY_CODE_COVERAGE_SNK_FILEPATH"; + + /// + /// Configuration key for a kill-switch that allows to explicitly disable dynamic instrumentation even if the remote setting is enabled. + /// + public const string DynamicInstrumentationEnabled = "DD_CIVISIBILITY_DI_ENABLED"; + + /// + /// Configuration key for enabling or disabling the early flake detection feature in CI Visibility + /// + public const string EarlyFlakeDetectionEnabled = "DD_CIVISIBILITY_EARLY_FLAKE_DETECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling CI Visibility. + /// Default value is false (disabled). + /// + public const string Enabled = "DD_CIVISIBILITY_ENABLED"; + + /// + /// Configuration key for setting the external code coverage file path + /// + public const string ExternalCodeCoveragePath = "DD_CIVISIBILITY_EXTERNAL_CODE_COVERAGE_PATH"; + + /// + /// Configuration key for the maximum number of retry attempts for a single test case. + /// + public const string FlakyRetryCount = "DD_CIVISIBILITY_FLAKY_RETRY_COUNT"; + + /// + /// Configuration key for a kill-switch that allows to explicitly disable retries even if the remote setting is enabled. + /// + public const string FlakyRetryEnabled = "DD_CIVISIBILITY_FLAKY_RETRY_ENABLED"; + + /// + /// Configuration key for forcing Agent's EVP Proxy + /// + public const string ForceAgentsEvpProxy = "DD_CIVISIBILITY_FORCE_AGENT_EVP_PROXY"; + + /// + /// Configuration key for enabling or disabling Datadog.Trace GAC installation + /// + public const string InstallDatadogTraceInGac = "DD_CIVISIBILITY_GAC_INSTALL_ENABLED"; + + /// + /// Configuration key for enabling or disabling Uploading Git Metadata in CI Visibility + /// Default Value is false (disabled) + /// + public const string GitUploadEnabled = "DD_CIVISIBILITY_GIT_UPLOAD_ENABLED"; + + /// + /// Configuration key for enabling Impacted Tests Detection. + /// + public const string ImpactedTestsDetectionEnabled = "DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling Intelligent Test Runner in CI Visibility + /// Default Value is false (disabled) + /// + public const string IntelligentTestRunnerEnabled = "DD_CIVISIBILITY_ITR_ENABLED"; + + /// + /// Configuration key for enabling or disabling the known tests feature in CI Visibility + /// + public const string KnownTestsEnabled = "DD_CIVISIBILITY_KNOWN_TESTS_ENABLED"; + + /// + /// Configuration key for enabling or disabling Logs direct submission. + /// Default value is false (disabled). + /// + public const string Logs = "DD_CIVISIBILITY_LOGS_ENABLED"; + + /// + /// Configuration key for set the rum flushing wait in milliseconds + /// + public const string RumFlushWaitMillis = "DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS"; + + /// + /// Configuration key for enabling or disabling Intelligent Test Runner test skipping feature in CI Visibility + /// + public const string TestsSkippingEnabled = "DD_CIVISIBILITY_TESTSSKIPPING_ENABLED"; + + /// + /// Configuration key for the maximum number of retry attempts for the entire session. + /// + public const string TotalFlakyRetryCount = "DD_CIVISIBILITY_TOTAL_FLAKY_RETRY_COUNT"; + + /// + /// Configuration key for the number of retries to fix a flaky test. + /// + public const string TestManagementAttemptToFixRetries = "DD_TEST_MANAGEMENT_ATTEMPT_TO_FIX_RETRIES"; + + /// + /// Configuration key for enabling or disabling the Test Management feature. + /// + public const string TestManagementEnabled = "DD_TEST_MANAGEMENT_ENABLED"; + + /// + /// Configuration key for set the test session name + /// + public const string TestSessionName = "DD_TEST_SESSION_NAME"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs new file mode 100644 index 000000000000..2c29ca80c29f --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DataStreamsMonitoring.g.cs @@ -0,0 +1,31 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class DataStreamsMonitoring + { + /// + /// Enables data streams monitoring support + /// + /// + public const string Enabled = "DD_DATA_STREAMS_ENABLED"; + + /// + /// Configuration key for enabling legacy binary headers in Data Streams Monitoring. + /// false by default if DSM is in default state, true otherwise + /// + /// + public const string LegacyHeadersEnabled = "DD_DATA_STREAMS_LEGACY_HEADERS"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs new file mode 100644 index 000000000000..41d60c3ccd61 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debug.g.cs @@ -0,0 +1,28 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Debug + { + /// + /// Configuration key for forcing the automatic instrumentation to only use the fallback method lookup mechanism. + /// + public const string ForceFallbackLookup = "DD_TRACE_DEBUG_LOOKUP_FALLBACK"; + + /// + /// Configuration key for forcing the automatic instrumentation to only use the mdToken method lookup mechanism. + /// + public const string ForceMdTokenLookup = "DD_TRACE_DEBUG_LOOKUP_MDTOKEN"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs new file mode 100644 index 000000000000..b83f273e5822 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Debugger.g.cs @@ -0,0 +1,157 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Debugger + { + /// + /// Configuration key to enable tag code origin for span. + /// Default value is false. + /// + public const string CodeOriginForSpansEnabled = "DD_CODE_ORIGIN_FOR_SPANS_ENABLED"; + + /// + /// Configuration key for setting the number of frames to be tagged in exit span code origin. + /// Default value is 8. + /// + public const string CodeOriginMaxUserFrames = "DD_CODE_ORIGIN_FOR_SPANS_MAX_USER_FRAMES"; + + /// + /// Configuration key for the interval (in seconds) between sending probe statuses. + /// Default value is 3600. + /// + public const string DiagnosticsInterval = "DD_DYNAMIC_INSTRUMENTATION_DIAGNOSTICS_INTERVAL"; + + /// + /// Configuration key for enabling or disabling Dynamic Instrumentation. + /// Default value is false (disabled). + /// + public const string DynamicInstrumentationEnabled = "DD_DYNAMIC_INSTRUMENTATION_ENABLED"; + + /// + /// Configuration key for the max object depth to serialize for probe snapshots. + /// Default value is 1. + /// + public const string MaxDepthToSerialize = "DD_DYNAMIC_INSTRUMENTATION_MAX_DEPTH_TO_SERIALIZE"; + + /// + /// Configuration key for the maximum duration (in milliseconds) to run serialization for probe snapshots. + /// Default value is 150 ms. + /// + public const string MaxTimeToSerialize = "DD_DYNAMIC_INSTRUMENTATION_MAX_TIME_TO_SERIALIZE"; + + /// + /// Configuration key for set of identifiers that are excluded from redaction decisions. + /// + public const string RedactedExcludedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_EXCLUDED_IDENTIFIERS"; + + /// + /// Configuration key for set of identifiers that are used in redaction decisions. + /// + public const string RedactedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS"; + + /// + /// Configuration key for set of types that are used in redaction decisions. + /// + public const string RedactedTypes = "DD_DYNAMIC_INSTRUMENTATION_REDACTED_TYPES"; + + /// + /// Configuration key for set of identifiers that are excluded from redaction decisions. + /// + public const string RedactionExcludedIdentifiers = "DD_DYNAMIC_INSTRUMENTATION_REDACTION_EXCLUDED_IDENTIFIERS"; + + /// + /// Configuration key for the maximum upload batch size. + /// Default value is 100. + /// + public const string UploadBatchSize = "DD_DYNAMIC_INSTRUMENTATION_UPLOAD_BATCH_SIZE"; + + /// + /// Configuration key for the interval (in milliseconds) between flushing statuses. + /// Default value is 0 (dynamic). + /// + public const string UploadFlushInterval = "DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL"; + + /// + /// Configuration key to enable capturing the variables of all the frames in exception call stack. + /// Default value is false. + /// + public const string ExceptionReplayCaptureFullCallStackEnabled = "DD_EXCEPTION_REPLAY_CAPTURE_FULL_CALLSTACK_ENABLED"; + + /// + /// Configuration key for the maximum number of frames in a call stack we would like to capture values for. + /// + public const string ExceptionReplayCaptureMaxFrames = "DD_EXCEPTION_REPLAY_CAPTURE_MAX_FRAMES"; + + /// + /// Configuration key for enabling or disabling Exception Replay. + /// Default value is false (disabled). + /// + public const string ExceptionReplayEnabled = "DD_EXCEPTION_REPLAY_ENABLED"; + + /// + /// Configuration key for setting the maximum number of exceptions to be analyzed by Exception Replay within a 1-second time interval. + /// Default value is 100. + /// + public const string MaxExceptionAnalysisLimit = "DD_EXCEPTION_REPLAY_MAX_EXCEPTION_ANALYSIS_LIMIT"; + + /// + /// Configuration key for the interval used to track exceptions + /// Default value is 1h. + /// + public const string RateLimitSeconds = "DD_EXCEPTION_REPLAY_RATE_LIMIT_SECONDS"; + + /// + /// Configuration key for the maximum symbol size to upload (in bytes). + /// Default value is 1 mb. + /// + public const string SymbolDatabaseBatchSizeInBytes = "DD_SYMBOL_DATABASE_BATCH_SIZE_BYTES"; + + /// + /// Configuration key for enabling or disabling compression for symbols payload. + /// Default value is true (enabled). + /// + public const string SymbolDatabaseCompressionEnabled = "DD_SYMBOL_DATABASE_COMPRESSION_ENABLED"; + + /// + /// Configuration key for a separated comma list of libraries to exclude in the 3rd party detection + /// Default value is empty. + /// + public const string SymDbThirdPartyDetectionExcludes = "DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_EXCLUDES"; + + /// + /// Configuration key for a separated comma list of libraries to include in the 3rd party detection + /// Default value is empty. + /// + public const string SymDbThirdPartyDetectionIncludes = "DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_INCLUDES"; + + /// + /// Configuration key for allowing upload of symbol data (such as method names, parameter names, etc) to Datadog. + /// Default value is true (enabled). + /// + public const string SymbolDatabaseUploadEnabled = "DD_SYMBOL_DATABASE_UPLOAD_ENABLED"; + + /// + /// Configuration key for a separated comma list of libraries to exclude for the 3rd party detection + /// Default value is empty. + /// + public const string ThirdPartyDetectionExcludes = "DD_THIRD_PARTY_DETECTION_EXCLUDES"; + + /// + /// Configuration key for a separated comma list of libraries to include in the 3rd party detection + /// Default value is empty. + /// + public const string ThirdPartyDetectionIncludes = "DD_THIRD_PARTY_DETECTION_INCLUDES"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs new file mode 100644 index 000000000000..ac45d3790064 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.DirectLogSubmission.g.cs @@ -0,0 +1,84 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class DirectLogSubmission + { + /// + /// Configuration key to enable or disable direct log submission for Azure Functions host. + /// Default value is false. + /// + public const string AzureFunctionsHostEnabled = "DD_LOGS_DIRECT_SUBMISSION_AZURE_FUNCTIONS_HOST_ENABLED"; + + /// + /// Configuration key for the time to wait between checking for batches + /// Default value is 2s. + /// + public const string BatchPeriodSeconds = "DD_LOGS_DIRECT_SUBMISSION_BATCH_PERIOD_SECONDS"; + + /// + /// Set the name of the originating host for direct logs submission. + /// Required for direct logs submission (default is machine name). + /// + public const string Host = "DD_LOGS_DIRECT_SUBMISSION_HOST"; + + /// + /// Configuration key for a list of direct log submission integrations to enable. + /// Only selected integrations are enabled for direct log submission + /// Default is empty (direct log submission disabled). + /// Supports multiple values separated with semi-colons. + /// + public const string EnabledIntegrations = "DD_LOGS_DIRECT_SUBMISSION_INTEGRATIONS"; + + /// + /// Configuration key for the maximum number of logs to send at one time + /// Default value is 1,000, the maximum accepted by the Datadog log API + /// + public const string BatchSizeLimit = "DD_LOGS_DIRECT_SUBMISSION_MAX_BATCH_SIZE"; + + /// + /// Configuration key for the maximum number of logs to hold in internal queue at any one time + /// Default value is 100,000. + /// + public const string QueueSizeLimit = "DD_LOGS_DIRECT_SUBMISSION_MAX_QUEUE_SIZE"; + + /// + /// Configuration key for the minimum level logs should have to be sent to the intake. + /// Default value is Information. + /// Should be one of Verbose,Debug,Information,Warning,Error,Fatal + /// + public const string MinimumLevel = "DD_LOGS_DIRECT_SUBMISSION_MINIMUM_LEVEL"; + + /// + /// Set the originating source for direct logs submission. + /// Default is 'csharp' + /// + public const string Source = "DD_LOGS_DIRECT_SUBMISSION_SOURCE"; + + /// + /// Configuration key for a list of tags to be applied globally to all logs directly submitted. + /// Supports multiple key key-value pairs which are comma-separated, and for which the key and + /// value are colon-separated. For example Key1:Value1, Key2:Value2. If not provided, + /// are used instead + /// + public const string GlobalTags = "DD_LOGS_DIRECT_SUBMISSION_TAGS"; + + /// + /// Configuration key for the url to send logs to. + /// Default value uses the domain set in , so defaults to + /// https://http-intake.logs.datadoghq.com:443. + /// + public const string Url = "DD_LOGS_DIRECT_SUBMISSION_URL"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs new file mode 100644 index 000000000000..45544f8f1af7 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.FeatureFlags.g.cs @@ -0,0 +1,119 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class FeatureFlags + { + /// + /// Enables support for collecting and exporting logs generated by the the OpenTelemetry Logs API. + /// This feature is available starting with .NET 3.1 when using Microsoft.Extensions.Logging + /// + public const string OpenTelemetryLogsEnabled = "DD_LOGS_OTEL_ENABLED"; + + /// + /// Enables experimental support for exporting OTLP metrics generated by the OpenTelemetry Metrics API. + /// This feature is only available starting with .NET 6.0, as it relies on the BCL class MeterListener + /// which is shipped in-box starting with .NET 6. + /// + public const string OpenTelemetryMetricsEnabled = "DD_METRICS_OTEL_ENABLED"; + + /// + /// List of meters to add to the metrics exporter for the experimental OpenTelemetry Metrics API support. + /// + public const string OpenTelemetryMeterNames = "DD_METRICS_OTEL_METER_NAMES"; + + /// + /// Enables generating 128-bit trace ids instead of 64-bit trace ids. + /// Note that a 128-bit trace id may be received from an upstream service or from + /// an Activity even if we are not generating them ourselves. + /// Default value is true (enabled). + /// + public const string TraceId128BitGenerationEnabled = "DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED"; + + /// + /// Enables injecting 128-bit trace ids into logs as a hexadecimal string. + /// If disabled, 128-bit trace ids will be truncated to the lower 64 bits, + /// and injected as decimal strings. 64-bit trace ids are + /// always injected as decimal strings, regardless of this setting. + /// If unset, this configuration will take the value of the configuration, + /// which is true by default. + /// Note: This configuration can be set independently of the configuration, + /// 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 + /// services may contain 128-bit trace ids. + /// + public const string TraceId128BitLoggingEnabled = "DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED"; + + public const string BypassHttpRequestUrlCachingEnabled = "DD_TRACE_BYPASS_HTTP_REQUEST_URL_CACHING_ENABLED"; + + public const string CommandsCollectionEnabled = "DD_TRACE_COMMANDS_COLLECTION_ENABLED"; + + /// + /// Configuration key to enable or disable the updated WCF instrumentation that delays execution + /// until later in the WCF pipeline when the WCF server exception handling is established. + /// + /// + public const string DelayWcfInstrumentationEnabled = "DD_TRACE_DELAY_WCF_INSTRUMENTATION_ENABLED"; + + /// + /// Enables a fix for header tags normalization. + /// We used to normalize tag names even if they were specified in user configuration, but we should not. + /// Default value is true. + /// + public const string HeaderTagsNormalizationFixEnabled = "DD_TRACE_HEADER_TAG_NORMALIZATION_FIX_ENABLED"; + + public const string InferredProxySpansEnabled = "DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED"; + + /// + /// Configuration key to enable or disable the injection of the Datadog trace context into stored procedures. + /// Default value is false (enabled). + /// When enabled, Datadog trace context will be injected into individual stored procedure calls when the following requirements are met: + ///
    + ///
  • The database is Microsoft SQL Server and is set to + /// service or + /// full.
  • + ///
  • The stored procedure call does not have Output, InputOutput, or Return ADO.NET command parameters.
  • + ///
+ ///
+ public const string InjectContextIntoStoredProceduresEnabled = "DD_TRACE_INJECT_CONTEXT_INTO_STORED_PROCEDURES_ENABLED"; + + /// + /// Enables beta support for instrumentation via the System.Diagnostics API and the OpenTelemetry SDK. + /// + public const string OpenTelemetryEnabled = "DD_TRACE_OTEL_ENABLED"; + + /// + /// Feature Flag: enables updated resource names on `aspnet.request`, `aspnet-mvc.request`, + /// `aspnet-webapi.request`, and `aspnet_core.request` spans. Enables `aspnet_core_mvc.request` spans and + /// additional features on `aspnet_core.request` spans. + /// + /// + public const string RouteTemplateResourceNamesEnabled = "DD_TRACE_ROUTE_TEMPLATE_RESOURCE_NAMES_ENABLED"; + + /// + /// Feature flag to enable obfuscating the LocalPath of a WCF request that goes + /// into the resourceName of a span. + /// Note: that this only applies when the WCF action is an empty string. + /// + /// + public const string WcfObfuscationEnabled = "DD_TRACE_WCF_RESOURCE_OBFUSCATION_ENABLED"; + + /// + /// Configuration key to enable or disable improved template-based resource names + /// when using WCF Web HTTP. Requires be set + /// to true. Enabled by default + /// + /// + public const string WcfWebHttpResourceNamesEnabled = "DD_TRACE_WCF_WEB_HTTP_RESOURCE_NAMES_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs new file mode 100644 index 000000000000..70d5e7dc0eb5 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs @@ -0,0 +1,113 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Iast + { + /// + /// Configuration key for number of rows to taint on each Db query in IAST. + /// Default value is 1 + /// + public const string CookieFilterRegex = "DD_IAST_COOKIE_FILTER_PATTERN"; + + /// + /// Configuration key for number of rows to taint on each Db query in IAST. + /// Default value is 1 + /// + public const string DataBaseRowsToTaint = "DD_IAST_DB_ROWS_TO_TAINT"; + + /// + /// Configuration key for enabling or disabling the vulnerability duplication detection. + /// When enabled, a vulnerability will only be reported once in the lifetime of an app, + /// instead of on every usage. Default is value is true (enabled). + /// + public const string IsIastDeduplicationEnabled = "DD_IAST_DEDUPLICATION_ENABLED"; + + /// + /// Configuration key for enabling or disabling the IAST. + /// Default is value is false (disabled). + /// + public const string Enabled = "DD_IAST_ENABLED"; + + /// + /// Configuration key for the maximum number of requests + /// to be analyzed by IAST concurrently. Defaults to 2. + /// + public const string MaxConcurrentRequests = "DD_IAST_MAX_CONCURRENT_REQUESTS"; + + /// + /// Configuration key for the maximum number of ranges + /// a tainted object can hold. Defaults to 10. + /// + public const string MaxRangeCount = "DD_IAST_MAX_RANGE_COUNT"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source keys. + /// Default value is in TracerSettings + /// + public const string RedactionEnabled = "DD_IAST_REDACTION_ENABLED"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source keys. + /// Default value is in TracerSettings + /// + public const string RedactionKeysRegex = "DD_IAST_REDACTION_NAME_PATTERN"; + + /// + /// Configuration key for specifying a custom regex to obfuscate source values. + /// Default value is in TracerSettings + /// + public const string RedactionValuesRegex = "DD_IAST_REDACTION_VALUE_PATTERN"; + + /// + /// Configuration key for specifying a timeout in milliseconds to the execution of regexes in IAST + /// Default value is 200ms + /// + public const string RegexTimeout = "DD_IAST_REGEXP_TIMEOUT"; + + /// + /// Configuration key for controlling the percentage of requests + /// to be analyzed by IAST, between 1 and 100. Defaults to 30. + /// + public const string RequestSampling = "DD_IAST_REQUEST_SAMPLING"; + + /// + /// Configuration key for IAST verbosity. + /// Default value is INFORMATION + /// + public const string TelemetryVerbosity = "DD_IAST_TELEMETRY_VERBOSITY"; + + /// + /// Configuration key for IAST evidence max lenght in chars. + /// Default value is 250 + /// + public const string TruncationMaxValueLength = "DD_IAST_TRUNCATION_MAX_VALUE_LENGTH"; + + /// + /// Configuration key for the maximum number of IAST vulnerabilities to + /// detect in a request. Defaults to 2. + /// + public const string VulnerabilitiesPerRequest = "DD_IAST_VULNERABILITIES_PER_REQUEST"; + + /// + /// Configuration key for controlling which weak cipher algorithms are reported. + /// + public const string WeakCipherAlgorithms = "DD_IAST_WEAK_CIPHER_ALGORITHMS"; + + /// + /// Configuration key for controlling which weak hashing algorithms are reported. + /// + public const string WeakHashAlgorithms = "DD_IAST_WEAK_HASH_ALGORITHMS"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs new file mode 100644 index 000000000000..b579ba304a13 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs @@ -0,0 +1,187 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class OpenTelemetry + { + /// + /// Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). + /// Used when is not set. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318 + /// + public const string ExporterOtlpEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP export (fallback for metrics-specific headers). + /// Used when is not set. + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpHeaders = "OTEL_EXPORTER_OTLP_HEADERS"; + + /// + /// Configuration key to set the OTLP endpoint URL for logs. + /// Takes precedence over `OTEL_EXPORTER_OTLP_ENDPOINT`. + /// This value typically ends with `/v1/logs` when using OTLP/HTTP. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipe\name` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318/v1/logs + /// + public const string ExporterOtlpLogsEndpoint = "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP logs export. + /// Takes precedence over . + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpLogsHeaders = "OTEL_EXPORTER_OTLP_LOGS_HEADERS"; + + public const string ExporterOtlpLogsProtocol = "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL"; + + /// + /// Configuration key to set the request timeout for OTLP logs export in milliseconds. + /// Takes precedence over . + /// Default value is 10000ms. + /// + public const string ExporterOtlpLogsTimeoutMs = "OTEL_EXPORTER_OTLP_LOGS_TIMEOUT"; + + /// + /// Configuration key to set the OTLP endpoint URL for metrics. + /// Takes precedence over . + /// This value typically ends with v1/metrics when using OTLP/HTTP. + /// Expects values like `unix:///path/to/socket.sock` for UDS, `\\.\pipename\` for Windows Named Pipes. + /// Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318/v1/metrics + /// + public const string ExporterOtlpMetricsEndpoint = "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT"; + + /// + /// Configuration key to set custom headers for OTLP metrics export. + /// Takes precedence over . + /// Format: api-key=key,other=value. + /// + public const string ExporterOtlpMetricsHeaders = "OTEL_EXPORTER_OTLP_METRICS_HEADERS"; + + /// + /// Configuration key to set the OTLP protocol for metrics export. + /// Takes precedence over . + /// Valid values: grpc, http/protobuf, http/json, defaults to http/protobuf. + /// + public const string ExporterOtlpMetricsProtocol = "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL"; + + /// + /// Configuration key to set the temporality preference for OTLP metrics export. + /// Supported values: delta, cumulative, lowmemory. + /// Default value is delta for Datadog. + /// This deviates from OpenTelemetry specification default of cumulative. + /// + public const string ExporterOtlpMetricsTemporalityPreference = "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"; + + /// + /// Configuration key to set the request timeout for OTLP metrics export in milliseconds. + /// Takes precedence over . + /// Default value is 10000ms. + /// + public const string ExporterOtlpMetricsTimeoutMs = "OTEL_EXPORTER_OTLP_METRICS_TIMEOUT"; + + /// + /// Configuration key to set the OTLP protocol (fallback for metrics-specific protocol). + /// Used when is not set. + /// Valid values: grpc, http/protobuf, http/json, defaults to http/protobuf. + /// + public const string ExporterOtlpProtocol = "OTEL_EXPORTER_OTLP_PROTOCOL"; + + /// + /// Configuration key to set the request timeout for OTLP export (fallback for metrics-specific timeout). + /// Used when is not set. + /// Default value is 10000ms. + /// + public const string ExporterOtlpTimeoutMs = "OTEL_EXPORTER_OTLP_TIMEOUT"; + + /// + /// Configuration key to set the log level. + /// + public const string LogLevel = "OTEL_LOG_LEVEL"; + + public const string LogsExporter = "OTEL_LOGS_EXPORTER"; + + /// + /// Configuration key to set the export interval for metrics in milliseconds. + /// Specifies the time interval between the start of two export attempts. + /// Default value is 10000ms (10s) for Datadog. + /// This deviates from OpenTelemetry specification default of 60000ms (60s). + /// + public const string MetricExportIntervalMs = "OTEL_METRIC_EXPORT_INTERVAL"; + + /// + /// Configuration key to set the export timeout for metrics in milliseconds. + /// Specifies the maximum time allowed for collecting and exporting metrics. + /// Default value is 7500ms (7.5s) for Datadog. + /// This deviates from OpenTelemetry specification default of 30000ms (30s). + /// + public const string MetricExportTimeoutMs = "OTEL_METRIC_EXPORT_TIMEOUT"; + + /// + /// Configuration key to set the exporter for metrics. + /// We only recognize the values of 'otlp' and 'none', a value of + /// 'none' disables the emission of metrics which is the + /// equivalent of setting + /// to false. + /// + public const string MetricsExporter = "OTEL_METRICS_EXPORTER"; + + /// + /// Configuration key for a list of tracing propagators. + /// Datadog only supports a subset of the OpenTelemetry propagators. + /// Also, the 'b3' OpenTelemetry propagator is mapped to the + /// 'b3 single header' Datadog propagator. + /// + public const string Propagators = "OTEL_PROPAGATORS"; + + /// + /// Configuration key for a list of key-value pairs to be set as + /// resource attributes. We currently map these to span tags. + /// + public const string ResourceAttributes = "OTEL_RESOURCE_ATTRIBUTES"; + + /// + /// Configuration key for disabling the OpenTelemetry API's. + /// + public const string SdkDisabled = "OTEL_SDK_DISABLED"; + + /// + /// Configuration key to set the application's default service name. + /// + public const string ServiceName = "OTEL_SERVICE_NAME"; + + /// + /// Configuration key to set the exporter for traces. + /// We only recognize the value 'none', which is the + /// equivalent of setting + /// to false. + /// + public const string TracesExporter = "OTEL_TRACES_EXPORTER"; + + /// + /// Configuration key to set the sampler for traces. + /// to false. + /// + public const string TracesSampler = "OTEL_TRACES_SAMPLER"; + + /// + /// Configuration key to set an additional argument for the + /// traces sampler. + /// to false. + /// + public const string TracesSamplerArg = "OTEL_TRACES_SAMPLER_ARG"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs new file mode 100644 index 000000000000..214e0fd43188 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Profiler.g.cs @@ -0,0 +1,26 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Profiler + { + public const string CodeHotspotsEnabled = "DD_PROFILING_CODEHOTSPOTS_ENABLED"; + + public const string ProfilingEnabled = "DD_PROFILING_ENABLED"; + + public const string EndpointProfilingEnabled = "DD_PROFILING_ENDPOINT_COLLECTION_ENABLED"; + + public const string ProfilerManagedActivationEnabled = "DD_PROFILING_MANAGED_ACTIVATION_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs new file mode 100644 index 000000000000..e472649bb94e --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Proxy.g.cs @@ -0,0 +1,29 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Proxy + { + /// + /// Configuration key to set a proxy server for https requests. + /// + public const string ProxyHttps = "DD_PROXY_HTTPS"; + + /// + /// Configuration key to set a list of hosts that should bypass the proxy. + /// The list is space-separated. + /// + public const string ProxyNoProxy = "DD_PROXY_NO_PROXY"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs new file mode 100644 index 000000000000..fad55b9a2a80 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Rcm.g.cs @@ -0,0 +1,34 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Rcm + { + public const string PollIntervalInternal = "DD_INTERNAL_RCM_POLL_INTERVAL"; + + /// + /// Configuration key for RCM poll interval (in seconds). + /// Default value is 5 s + /// Maximum value is 5 s + /// + public const string PollInterval = "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS"; + + /// + /// Is remote configuration management (RCM) enabled. Defaults to true. RCM requires + /// the use of the full agent, so will not always be available. This switch is primarily + /// intended for testing and for explicitly disabling RCM even though it is available. + /// + public const string RemoteConfigurationEnabled = "DD_REMOTE_CONFIGURATION_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs new file mode 100644 index 000000000000..34d2069e80b6 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.TagPropagation.g.cs @@ -0,0 +1,27 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class TagPropagation + { + /// + /// Configuration key for the maximum length of an outgoing propagation header's value ("x-datadog-tags") + /// when injecting it into downstream service calls. + /// + /// This value is not used when extracting an incoming propagation header from an upstream service. + /// + /// + public const string HeaderMaxLength = "DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs new file mode 100644 index 000000000000..a2d654a00591 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -0,0 +1,81 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +internal static partial class ConfigurationKeys2 +{ + internal static class Telemetry + { + /// + /// Configuration key for sending telemetry via agent proxy. If enabled, sends telemetry + /// via agent proxy. Enabled by default. If disabled, or agent is not available, telemetry + /// is sent to agentless endpoint, based on setting. + /// + public const string AgentProxyEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENT_PROXY_ENABLED"; + + /// + /// Configuration key for sending telemetry direct to telemetry intake. If enabled, and + /// is set, sends telemetry direct to intake if agent is not + /// available. Enabled by default if is available. + /// + public const string AgentlessEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENTLESS_ENABLED"; + + /// + /// Configuration key for enabling or disabling internal telemetry. + /// Default value is true (enabled). + /// + public const string Enabled = "DD_INSTRUMENTATION_TELEMETRY_ENABLED"; + + /// + /// Configuration key for the telemetry URL where the Tracer sends telemetry. Only applies when agentless + /// telemetry is in use (otherwise telemetry is sent to the agent using + /// instead) + /// + public const string Uri = "DD_INSTRUMENTATION_TELEMETRY_URL"; + + /// + /// Configuration key for whether to enable debug mode of telemetry. + /// + /// + public const string DebugEnabled = "DD_INTERNAL_TELEMETRY_DEBUG_ENABLED"; + + /// + /// Configuration key for whether dependency data is sent via telemetry. + /// Required for some ASM features. Default value is true (enabled). + /// + /// + public const string DependencyCollectionEnabled = "DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED"; + + /// + /// Configuration key for how often telemetry should be sent, in seconds. Must be between 1 and 3600. + /// For testing purposes. Defaults to 60 + /// + /// + public const string HeartbeatIntervalSeconds = "DD_TELEMETRY_HEARTBEAT_INTERVAL"; + + /// + /// Configuration key for whether to enable redacted error log collection. + /// + public const string TelemetryLogsEnabled = "DD_TELEMETRY_LOG_COLLECTION_ENABLED"; + + /// + /// Configuration key for whether telemetry metrics should be sent. + /// + /// + public const string MetricsEnabled = "DD_TELEMETRY_METRICS_ENABLED"; + + /// + /// Configuration key to enable or disable the ActivityListener. + /// + public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs new file mode 100644 index 000000000000..b43bb9af380a --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -0,0 +1,736 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +// This file is auto-generated from supported-configurations.json and supported-configurations-docs.yaml +// Do not edit this file directly. The source generator will regenerate it on build. +// NOTE: If you remove keys/products from the JSON, run 'dotnet clean' and remove old generated files. +namespace Datadog.Trace.Configuration; + +/// +/// String constants for standard Datadog configuration keys. +/// Auto-generated from supported-configurations.json and supported-configurations-docs.yaml +/// +internal static partial class ConfigurationKeys2 +{ + /// + /// Configuration key for configuring the interval (in seconds) for sending stats (aka trace metrics) + /// + /// # Keys without documentation in ConfigurationKeys.cs + /// # These keys exist in supported-configurations.json but need documentation + /// + public const string StatsComputationInterval = "_DD_TRACE_STATS_COMPUTATION_INTERVAL"; + + /// + /// Configuration key for the Agent host where the Tracer can send traces. + /// Overridden by if present. + /// Default value is "localhost". + /// + /// + public const string AgentHost = "DD_AGENT_HOST"; + + /// + /// Configuration key for setting the API key, used by the Agent. + /// + public const string ApiKey = "DD_API_KEY"; + + public const string RareSamplerEnabled = "DD_APM_ENABLE_RARE_SAMPLER"; + + /// + /// Used to force a specific port binding for the Trace Agent. + /// Default value is 8126. + /// + /// + public const string TraceAgentPortKey = "DD_APM_RECEIVER_PORT"; + + /// + /// Configuration key for the unix domain socket where the Tracer can send traces. + /// Default value is null. + /// + /// + public const string TracesUnixDomainSocketPath = "DD_APM_RECEIVER_SOCKET"; + + /// + /// Configuration key for enabling or disabling the generation of APM traces. + /// Default is value is true (enabled). + /// + public const string ApmTracingEnabled = "DD_APM_TRACING_ENABLED"; + + /// + /// Configuration key for deactivating reading the application monitoring config file through libdatadog (hands off config). + /// True by default + /// + public const string ApplicationMonitoringConfigFileEnabled = "DD_APPLICATION_MONITORING_CONFIG_FILE_ENABLED"; + + /// + /// Configuration key for setting DBM propagation mode + /// Default value is disabled, expected values are either: disabled, service or full + /// + /// + public const string DbmPropagationMode = "DD_DBM_PROPAGATION_MODE"; + + /// + /// Configuration key for enabling or disabling the use of System.Diagnostics.DiagnosticSource. + /// Default value is true (enabled). + /// + public const string DiagnosticSourceEnabled = "DD_DIAGNOSTIC_SOURCE_ENABLED"; + + /// + /// Configuration key for a list of integrations to disable. All other integrations remain enabled. + /// Default is empty (all integrations are enabled). + /// Supports multiple values separated with semi-colons. + /// + /// + public const string DisabledIntegrations = "DD_DISABLED_INTEGRATIONS"; + + /// + /// Configuration key for arguments to pass to the DogStatsD process. + /// + public const string DogStatsDArgs = "DD_DOGSTATSD_ARGS"; + + /// + /// Configuration key for when a standalone instance of DogStatsD needs to be started. + /// + public const string DogStatsDPath = "DD_DOGSTATSD_PATH"; + + /// + /// Configuration key for the named pipe that DogStatsD binds to. + /// Default value is null. + /// + /// + public const string MetricsPipeName = "DD_DOGSTATSD_PIPE_NAME"; + + /// + /// Configuration key for the DogStatsd port where the Tracer can send metrics. + /// Default value is 8125. + /// + /// + public const string DogStatsdPort = "DD_DOGSTATSD_PORT"; + + /// + /// Configuration key for the unix domain socket that DogStatsD binds to. + /// Default value is null. + /// + /// + public const string MetricsUnixDomainSocketPath = "DD_DOGSTATSD_SOCKET"; + + /// + /// Configuration key for the location where the Tracer can send DogStatsD metrics. + /// Default value is "udp://127.0.0.1:8125". + /// + /// + public const string MetricsUri = "DD_DOGSTATSD_URL"; + + /// + /// Configuration key for the application's environment. Sets the "env" tag on every . + /// + /// + public const string Environment = "DD_ENV"; + + /// + /// Configuration key for the application's git commit hash. Sets the "_dd.git.commit.sha" tag on every . + /// + /// + public const string GitCommitSha = "DD_GIT_COMMIT_SHA"; + + /// + /// Configuration key for the application's git repo URL. Sets the "_dd.git.repository_url" tag on every . + /// + /// + public const string GitRepositoryUrl = "DD_GIT_REPOSITORY_URL"; + + /// + /// Configuration key for the application's client http statuses to set spans as errors by. + /// + /// + public const string DeprecatedHttpClientErrorStatusCodes = "DD_HTTP_CLIENT_ERROR_STATUSES"; + + /// + /// Configuration key for the application's server http statuses to set spans as errors by. + /// + /// + public const string DeprecatedHttpServerErrorStatusCodes = "DD_HTTP_SERVER_ERROR_STATUSES"; + + /// + /// Configuration key for enabling/disabling reporting query string + /// Default value is true + /// + /// + public const string QueryStringReportingEnabled = "DD_HTTP_SERVER_TAG_QUERY_STRING"; + + /// + /// Configuration key for setting the max size of the querystring to report, before obfuscation + /// Default value is 5000, 0 means that we don't limit the size. + /// + /// + public const string QueryStringReportingSize = "DD_HTTP_SERVER_TAG_QUERY_STRING_SIZE"; + + /// + /// Configuration key for enabling or disabling the injection of products via single step instrumentation. + /// + public const string SsiDeployed = "DD_INJECTION_ENABLED"; + + /// + /// Configuration key for enabling or disabling the Tracer's debugger mode. + /// Default is value is false (disabled). + /// + public const string WaitForDebuggerAttach = "DD_INTERNAL_WAIT_FOR_DEBUGGER_ATTACH"; + + /// + /// Configuration key for enabling or disabling the Tracer's native debugger mode. + /// Default is value is false (disabled). + /// + public const string WaitForNativeDebuggerAttach = "DD_INTERNAL_WAIT_FOR_NATIVE_DEBUGGER_ATTACH"; + + /// + /// Configuration key for enabling or disabling the automatic injection + /// of correlation identifiers into the logging context. + /// + /// + public const string LogsInjectionEnabled = "DD_LOGS_INJECTION"; + + /// + /// Configuration key for setting the approximate maximum size, + /// in bytes, for Tracer log files. + /// Default value is 10 MB. + /// + public const string MaxLogFileSize = "DD_MAX_LOGFILE_SIZE"; + + /// + /// Configuration key for setting the number of traces allowed + /// to be submitted per second. + /// + /// + [System.Obsolete("This parameter is obsolete and should be replaced by `DD_TRACE_RATE_LIMIT`")] + public const string MaxTracesSubmittedPerSecond = "DD_MAX_TRACES_PER_SECOND"; + + /// + /// Configuration key for enabling or disabling runtime metrics sent to DogStatsD. + /// Default value is false (disabled). + /// + public const string RuntimeMetricsEnabled = "DD_RUNTIME_METRICS_ENABLED"; + + /// + /// Configuration key for the application's default service name. + /// Used as the service name for top-level spans, + /// and used to determine service name of some child spans. + /// + /// + public const string ServiceName = "DD_SERVICE"; + + /// + /// Configuration key for setting the default Datadog destination site. + /// Defaults to "datadoghq.com". + /// + public const string Site = "DD_SITE"; + + /// + /// Configuration key for setting custom span sampling rules based on glob patterns. + /// Comma separated list of span sampling rules. + /// The rule is matched in order of specification. The first match in a list is used. + /// The supported glob pattern characters are '*' and '?'. + /// A '*' matches any contiguous substring. + /// A '?' matches exactly one character. + /// + /// Per entry: + /// The item "service" is a glob pattern string, to match on the service name. + /// Optional and defaults to '*'. + /// The item "name" is a glob pattern string, to match on the operation name. + /// Optional and defaults to '*'. + /// The item "sample_rate" is a float and is the probability of keeping a matched span. + /// Optional and defaults to 1.0 (keep all). + /// The item "max_per_second" is a float and is the maximum number of spans that can be kept per second for the rule. + /// Optional and defaults to unlimited. + /// + /// Examples: + /// Match all spans that have a service name of "cart" and an operation name of "checkout" with a kept limit of 1000 per second. + /// "[{"service": "cart", "name": "checkout", "max_per_second": 1000}]" + /// + /// Match 50% of spans that have a service name of "cart" and an operation name of "checkout" with a kept limit of 1000 per second. + /// "[{"service": "cart", "name": "checkout", "sample_rate": 0.5, "max_per_second": 1000}]" + /// + /// Match all spans that start with "cart" without any limits and any operation name. + /// "[{"service": "cart*"}]" + /// + /// + public const string SpanSamplingRules = "DD_SPAN_SAMPLING_RULES"; + + /// + /// Configuration key for a list of tags to be applied globally to spans. + /// Supports multiple key key-value pairs which are comma-separated, and for which the key and + /// value are colon-separated. For example Key1:Value1, Key2:Value2 + /// + /// + public const string GlobalTags = "DD_TAGS"; + + /// + /// Configuration key for arguments to pass to the Trace Agent process. + /// + public const string TraceAgentArgs = "DD_TRACE_AGENT_ARGS"; + + /// + /// Configuration key for when a standalone instance of the Trace Agent needs to be started. + /// + public const string TraceAgentPath = "DD_TRACE_AGENT_PATH"; + + /// + /// Configuration key for the Agent port where the Tracer can send traces. + /// Default value is 8126. + /// + /// + public const string AgentPort = "DD_TRACE_AGENT_PORT"; + + /// + /// Configuration key for the Agent URL where the Tracer can send traces. + /// Default value is "http://localhost:8126". + /// + /// + public const string AgentUri = "DD_TRACE_AGENT_URL"; + + /// + /// Configuration key for enabling or disabling default Analytics. + /// + /// + [System.Obsolete("Deprecated - App Analytics is deprecated")] + public const string GlobalAnalyticsEnabled = "DD_TRACE_ANALYTICS_ENABLED"; + + /// + /// Configuration key for toggling span pointers on AWS requests. + /// Default value is true + /// + public const string SpanPointersEnabled = "DD_TRACE_AWS_ADD_SPAN_POINTERS"; + + /// + /// Configuration key for enabling or disabling span links creation for Azure EventHubs batch operations. + /// When enabled, TryAdd spans are created and linked to the send span. + /// When disabled, TryAdd spans are not created, and therefore they are never linked to the send span. + /// Default value is true (enabled). + /// + /// + public const string AzureEventHubsBatchLinksEnabled = "DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED"; + + /// + /// Configuration key to enable or disable the creation of individual message spans and span links + /// when using Azure Service Bus batch operations. + /// Default value is true (enabled). + /// + /// + public const string AzureServiceBusBatchLinksEnabled = "DD_TRACE_AZURE_SERVICEBUS_BATCH_LINKS_ENABLED"; + + /// + /// Configuration key to set the maximum number of bytes that can be + /// injected into the baggage header when propagating to a downstream service. + /// Default value is 8192 bytes. + /// + /// + public const string BaggageMaximumBytes = "DD_TRACE_BAGGAGE_MAX_BYTES"; + + /// + /// Configuration key to set the maximum number of items that can be + /// injected into the baggage header when propagating to a downstream service. + /// Default value is 64 items. + /// + /// + public const string BaggageMaximumItems = "DD_TRACE_BAGGAGE_MAX_ITEMS"; + + /// + /// Configuration key for controlling which baggage keys are converted into span tags. + /// Default value is "user.id,session.id,account.id". + /// + /// Behavior options: + /// - Empty string: No baggage keys are converted into span tags (feature disabled) + /// - Comma-separated list: Only baggage keys matching exact, case-sensitive names in the list are added as span tags + /// - Wildcard (*): All baggage keys are converted into span tags + /// + /// + public const string BaggageTagKeys = "DD_TRACE_BAGGAGE_TAG_KEYS"; + + /// + /// Configuration key for setting the batch interval in milliseconds for the serialization queue. + /// Set to 0 to disable. + /// + public const string SerializationBatchInterval = "DD_TRACE_BATCH_INTERVAL"; + + /// + /// Configuration key for setting the size in bytes of the trace buffer + /// + public const string BufferSize = "DD_TRACE_BUFFER_SIZE"; + + /// + /// Configuration key indicating if the header should be collected. The default for DD_TRACE_CLIENT_IP_ENABLED is false. + /// + /// + public const string IpHeaderEnabled = "DD_TRACE_CLIENT_IP_ENABLED"; + + /// + /// Configuration key indicating the optional name of the custom header to take into account to report the ip address from. + /// If this variable is set all other IP related headers should be ignored + /// Default is value is null (do not override). + /// + /// + public const string IpHeader = "DD_TRACE_CLIENT_IP_HEADER"; + + /// + /// Configuration key for the path to the configuration file. + /// Can only be set with an environment variable + /// or in the app.config/web.config file. + /// + public const string ConfigurationFileName = "DD_TRACE_CONFIG_FILE"; + + /// + /// Use libdatadog data pipeline to send traces. + /// Default value is false (disabled). + /// + public const string TraceDataPipelineEnabled = "DD_TRACE_DATA_PIPELINE_ENABLED"; + + /// + /// Configuration key for enabling or disabling the Tracer's debug mode. + /// Default is value is false (disabled). + /// + public const string DebugEnabled = "DD_TRACE_DEBUG"; + + /// + /// Configuration key for a list of ActivitySource names (supports globbing) that will be disabled. + /// Default is empty (all ActivitySources will be subscribed to by default). + /// Disabling ActivitySources may break distributed tracing if those Activities are used to propagate trace context. + /// + /// Supports multiple values separated with commas. + /// For example: "SomeGlob.*.PatternSource,Some.Specific.Source" + /// + /// + /// + /// When the tracer doesn't subscribe to an ActivitySource, we will NOT propagate the trace context from those Activities (we don't see them anymore). + ///
This means that distributed tracing flows that rely on these Activities for context propagation + /// will break and cause disconnected traces. + ///
+ /// + /// Potential impact on distributed tracing: + /// + /// + /// + /// Service A -> Ignored Activity -> Service B + /// Creates a single trace with Service A as root and Service B as child + /// + /// + /// + /// + /// Service A -> Disabled Activity -> Service B + /// Creates TWO separate traces with Service A and Service B each as root spans + /// + /// + /// + /// + ///
+ ///
+ public const string DisabledActivitySources = "DD_TRACE_DISABLED_ACTIVITY_SOURCES"; + + /// + /// Configuration key for the comma-separated list of user disabled + /// ADO.NET CommandType names that should not have Span created for them. + /// "InterceptableDbCommand" and "ProfiledDbCommand" are always disabled by default. + /// + /// + public const string DisabledAdoNetCommandTypes = "DD_TRACE_DISABLED_ADONET_COMMAND_TYPES"; + + /// + /// Configuration key for enabling or disabling the Tracer. + /// Default is value is true (enabled). + /// + /// + public const string TraceEnabled = "DD_TRACE_ENABLED"; + + /// + /// Configuration key for controlling whether route parameters in ASP.NET and ASP.NET Core resource names + /// should be expanded with their values. Only applies when + /// is enabled. + /// + /// + public const string ExpandRouteTemplatesEnabled = "DD_TRACE_EXPAND_ROUTE_TEMPLATES_ENABLED"; + + /// + /// Configuration key to enable experimental features. + /// + public const string ExperimentalFeaturesEnabled = "DD_TRACE_EXPERIMENTAL_FEATURES_ENABLED"; + + /// + /// Configuration key for enabling the tagging of every telemetry event with git metadata. + /// Default is value is true (enabled). + /// + /// + public const string GitMetadataEnabled = "DD_TRACE_GIT_METADATA_ENABLED"; + + /// + /// Configuration key for specifying which GraphQL error extensions to capture. + /// A comma-separated list of extension keys to capture. Empty or not present means no extensions are captured. + /// + /// + public const string GraphQLErrorExtensions = "DD_TRACE_GRAPHQL_ERROR_EXTENSIONS"; + + /// + /// Configuration key for a map of metadata keys to tag names. + /// Automatically apply GRPC metadata values as tags on traces. + /// + /// + public const string GrpcTags = "DD_TRACE_GRPC_TAGS"; + + /// + /// Configuration key for a map of header keys to tag names. + /// Automatically apply header values as tags on traces. + /// + /// + public const string HeaderTags = "DD_TRACE_HEADER_TAGS"; + + /// + /// Configuration key for the application's client http statuses to set spans as errors by. + /// + /// + public const string HttpClientErrorStatusCodes = "DD_TRACE_HTTP_CLIENT_ERROR_STATUSES"; + + /// + /// Configuration key for overriding which URLs are skipped by the tracer. + /// + /// + public const string HttpClientExcludedUrlSubstrings = "DD_TRACE_HTTP_CLIENT_EXCLUDED_URL_SUBSTRINGS"; + + /// + /// Configuration key for the application's server http statuses to set spans as errors by. + /// + /// + public const string HttpServerErrorStatusCodes = "DD_TRACE_HTTP_SERVER_ERROR_STATUSES"; + + /// + /// Configuration key to enable or disable the creation of a span context on exiting a successful Kafka + /// Consumer.Consume() call, and closing the scope on entering Consumer.Consume(). + /// Default value is true (enabled). + /// + /// + public const string KafkaCreateConsumerScopeEnabled = "DD_TRACE_KAFKA_CREATE_CONSUMER_SCOPE_ENABLED"; + + /// + /// Configuration key for setting the directory of the .NET Tracer logs. + /// Overrides the value in if present. + /// Default value is "%ProgramData%"\Datadog .NET Tracer\logs\" on Windows + /// or "/var/log/datadog/dotnet/" on Linux. + /// + public const string LogDirectory = "DD_TRACE_LOG_DIRECTORY"; + + [System.Obsolete("Deprecated, use DD_TRACE_LOG_DIRECTORY instead, and make sure it is a directory and not a file path")] + public const string TraceLogPath = "DD_TRACE_LOG_PATH"; + + /// + /// Configuration key for locations to write internal diagnostic logs. + /// Currently only file is supported + /// Defaults to file + /// + public const string LogSinks = "DD_TRACE_LOG_SINKS"; + + /// + /// Configuration key for setting in number of days when to delete log files based on their last writetime date. + /// + public const string LogFileRetentionDays = "DD_TRACE_LOGFILE_RETENTION_DAYS"; + + /// + /// Configuration key for setting the number of seconds between, + /// identical log messages, for Tracer log files. + /// Default value is 0 and setting to 0 disables rate limiting. + /// + public const string LogRateLimit = "DD_TRACE_LOGGING_RATE"; + + /// + /// Configuration key for enabling automatic instrumentation on specified methods. + /// Default value is "" (disabled). + /// + public const string TraceMethods = "DD_TRACE_METHODS"; + + /// + /// Configuration key for enabling or disabling internal metrics sent to DogStatsD. + /// Default value is false (disabled). + /// + public const string TracerMetricsEnabled = "DD_TRACE_METRICS_ENABLED"; + + /// + /// Configuration key for specifying a custom regex to obfuscate query strings. + /// Default value is in TracerSettingsConstants + /// WARNING: This regex cause crashes under netcoreapp2.1 / linux / arm64, dont use on manual instrumentation in this environment + /// + /// + public const string ObfuscationQueryStringRegex = "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP"; + + /// + /// Configuration key for specifying a timeout in milliseconds to the execution of the query string obfuscation regex + /// Default value is 200ms + /// + /// + public const string ObfuscationQueryStringRegexTimeout = "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP_TIMEOUT"; + + /// + /// Configuration key to enable sending partial traces to the agent + /// + public const string PartialFlushEnabled = "DD_TRACE_PARTIAL_FLUSH_ENABLED"; + + /// + /// Configuration key to set the minimum number of closed spans in a trace before it's partially flushed + /// + public const string PartialFlushMinSpans = "DD_TRACE_PARTIAL_FLUSH_MIN_SPANS"; + + /// + /// Configuration key for automatically populating the peer.service tag + /// from predefined precursor attributes when the span attribute schema is v0. + /// This is ignored when the span attribute schema is v1 or later. + /// Default value is false + /// + public const string PeerServiceDefaultsEnabled = "DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED"; + + /// + /// Configuration key for a map of services to rename. + /// + /// + public const string PeerServiceNameMappings = "DD_TRACE_PEER_SERVICE_MAPPING"; + + /// + /// Configuration key for the named pipe where the Tracer can send traces. + /// Default value is null. + /// + /// + public const string TracesPipeName = "DD_TRACE_PIPE_NAME"; + + /// + /// Configuration key for setting the timeout in milliseconds for named pipes communication. + /// Default value is 0. + /// + /// + public const string TracesPipeTimeoutMs = "DD_TRACE_PIPE_TIMEOUT_MS"; + + /// + /// Configuration key for setting the header extraction propagation behavior. Accepted values are: + ///
    + ///
  • continue: Extracted span context becomes the parent and baggage is propagated
  • + ///
  • restart: Extracted span context becomes a span link (a new trace is started) and baggage is propagated
  • + ///
  • ignore: We disregard the incoming trace context headers and we also disregard baggage
  • + ///
+ /// Default value is continue. + ///
+ public const string PropagationBehaviorExtract = "DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT"; + + /// + /// Configuration key to configure if propagation should only extract the first header once a configure + /// propagator extracts a valid trace context. + /// + /// + public const string PropagationExtractFirstOnly = "DD_TRACE_PROPAGATION_EXTRACT_FIRST"; + + /// + /// Configuration key for setting the propagation style for both header injection and extraction. + /// If or are also defined, + /// they will override any header injections or extraction styled defined here, respectively. + /// + /// + public const string PropagationStyle = "DD_TRACE_PROPAGATION_STYLE"; + + /// + /// Configuration key for setting the header extraction propagation style. + /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header extraction styles. + /// + /// + /// + public const string PropagationStyleExtract = "DD_TRACE_PROPAGATION_STYLE_EXTRACT"; + + /// + /// Configuration key for setting the header injection propagation style. + /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header injection styles. + /// + /// + /// + public const string PropagationStyleInject = "DD_TRACE_PROPAGATION_STYLE_INJECT"; + + /// + /// Configuration key for setting the number of traces allowed + /// to be submitted per second. + /// + /// + public const string TraceRateLimit = "DD_TRACE_RATE_LIMIT"; + + /// + /// Configuration key for unifying client service names when the span + /// attribute schema is v0. This is ignored when the span attribute + /// schema is v1 or later. + /// Default value is false + /// + public const string RemoveClientServiceNamesEnabled = "DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED"; + + /// + /// Configuration key for setting the global rate for the sampler. + /// + public const string GlobalSamplingRate = "DD_TRACE_SAMPLE_RATE"; + + /// + /// Configuration key for setting custom sampling rules based on regular expressions. + /// Semi-colon separated list of sampling rules. + /// The rule is matched in order of specification. The first match in a list is used. + /// + /// Per entry: + /// The item "sample_rate" is required in decimal format. + /// The item "service" is optional in regular expression format, to match on service name. + /// The item "name" is optional in regular expression format, to match on operation name. + /// + /// To give a rate of 50% to any traces in a service starting with the text "cart": + /// '[{"sample_rate":0.5, "service":"cart.*"}]' + /// + /// To give a rate of 20% to any traces which have an operation name of "http.request": + /// '[{"sample_rate":0.2, "name":"http.request"}]' + /// + /// To give a rate of 100% to any traces within a service named "background" and with an operation name of "sql.query": + /// '[{"sample_rate":1.0, "service":"background", "name":"sql.query"}] + /// + /// To give a rate of 10% to all traces + /// '[{"sample_rate":0.1}]' + /// + /// To configure multiple rules, separate by semi-colon and order from most specific to least specific: + /// '[{"sample_rate":0.5, "service":"cart.*"}, {"sample_rate":0.2, "name":"http.request"}, {"sample_rate":1.0, "service":"background", "name":"sql.query"}, {"sample_rate":0.1}]' + /// + /// If no rules are specified, or none match, default internal sampling logic will be used. + /// + /// + public const string CustomSamplingRules = "DD_TRACE_SAMPLING_RULES"; + + /// + /// Configuration key for setting the format of . + /// Valid values are regex or glob. + /// If the value is not recognized, trace sampling rules are disabled. + /// + public const string CustomSamplingRulesFormat = "DD_TRACE_SAMPLING_RULES_FORMAT"; + + /// + /// Configuration key for a map of services to rename. + /// + /// + public const string ServiceNameMappings = "DD_TRACE_SERVICE_MAPPING"; + + /// + /// Configuration key for setting the schema version for service naming and span attributes + /// Accepted values are: "v1", "v0" + /// Default value is "v0" + /// + public const string MetadataSchemaVersion = "DD_TRACE_SPAN_ATTRIBUTE_SCHEMA"; + + /// + /// Configuration key for enabling or disabling the diagnostic log at startup + /// + /// + public const string StartupDiagnosticLogEnabled = "DD_TRACE_STARTUP_LOGS"; + + /// + /// Configuration key for enabling computation of stats (aka trace metrics) on the tracer side + /// + public const string StatsComputationEnabled = "DD_TRACE_STATS_COMPUTATION_ENABLED"; + + /// + /// Configuration key for the application's version. Sets the "version" tag on every . + /// + /// + public const string ServiceVersion = "DD_VERSION"; +} From 02dcf1a04c96a86efb458849623503f2516cc814 Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 25 Sep 2025 17:37:02 +0200 Subject: [PATCH 4/9] Add missing key for DD_TRACE_ACTIVITY_LISTENER --- .../Configuration/ConfigurationKeys.cs | 5 +++++ .../ConfigurationKeys2.AppSec.g.cs | 8 +++---- .../ConfigurationKeys2.Iast.g.cs | 4 ++-- .../ConfigurationKeys2.g.cs | 22 ++++++------------- .../ConfigurationKeys2.AppSec.g.cs | 8 +++---- .../ConfigurationKeys2.Iast.g.cs | 4 ++-- .../ConfigurationKeys2.g.cs | 22 ++++++------------- .../ConfigurationKeys2.AppSec.g.cs | 8 +++---- .../ConfigurationKeys2.Iast.g.cs | 4 ++-- .../ConfigurationKeys2.g.cs | 22 ++++++------------- .../ConfigurationKeys2.AppSec.g.cs | 8 +++---- .../ConfigurationKeys2.Iast.g.cs | 4 ++-- .../ConfigurationKeys2.g.cs | 22 ++++++------------- 13 files changed, 57 insertions(+), 84 deletions(-) diff --git a/tracer/src/Datadog.Trace/Configuration/ConfigurationKeys.cs b/tracer/src/Datadog.Trace/Configuration/ConfigurationKeys.cs index b346757dd77a..52dfce1241e4 100644 --- a/tracer/src/Datadog.Trace/Configuration/ConfigurationKeys.cs +++ b/tracer/src/Datadog.Trace/Configuration/ConfigurationKeys.cs @@ -17,6 +17,11 @@ internal static partial class ConfigurationKeys // temporary so that ConfigurationKeys2 can resolve reference, all this is removed later public const string TraceLogPath = "DD_TRACE_LOG_PATH"; + /// + /// Configuration key to enable or disable the ActivityListener. + /// + public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; + /// /// Configuration key to enable experimental features. /// diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs index 482c940fe668..35d1950a08de 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs @@ -58,13 +58,13 @@ internal static class AppSec /// /// Configuration key for enabling or disabling the AppSec. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string Enabled = "DD_APPSEC_ENABLED"; /// /// Comma separated keys indicating the optional custom headers the user wants to send. - /// Default is value is null. + /// Default value is null. /// public const string ExtraHeaders = "DD_APPSEC_EXTRA_HEADERS"; @@ -80,7 +80,7 @@ internal static class AppSec /// /// Configuration key indicating the optional name of the custom header to take into account for the ip address. - /// Default is value is null (do not override). + /// Default value is null (do not override). /// public const string CustomIpHeader = "DD_APPSEC_IPHEADER"; @@ -123,7 +123,7 @@ internal static class AppSec /// /// Override the default rules file provided. Must be a path to a valid JSON rules file. - /// Default is value is null (do not override). + /// Default value is null (do not override). /// public const string Rules = "DD_APPSEC_RULES"; diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs index 70d5e7dc0eb5..bc2e852e5af3 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs @@ -30,13 +30,13 @@ internal static class Iast /// /// Configuration key for enabling or disabling the vulnerability duplication detection. /// When enabled, a vulnerability will only be reported once in the lifetime of an app, - /// instead of on every usage. Default is value is true (enabled). + /// instead of on every usage. Default value is true (enabled). /// public const string IsIastDeduplicationEnabled = "DD_IAST_DEDUPLICATION_ENABLED"; /// /// Configuration key for enabling or disabling the IAST. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string Enabled = "DD_IAST_ENABLED"; diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs index b43bb9af380a..658c3e54ddbc 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -56,7 +56,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the generation of APM traces. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// public const string ApmTracingEnabled = "DD_APM_TRACING_ENABLED"; @@ -176,13 +176,13 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer's debugger mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string WaitForDebuggerAttach = "DD_INTERNAL_WAIT_FOR_DEBUGGER_ATTACH"; /// /// Configuration key for enabling or disabling the Tracer's native debugger mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string WaitForNativeDebuggerAttach = "DD_INTERNAL_WAIT_FOR_NATIVE_DEBUGGER_ATTACH"; @@ -369,7 +369,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key indicating the optional name of the custom header to take into account to report the ip address from. /// If this variable is set all other IP related headers should be ignored - /// Default is value is null (do not override). + /// Default value is null (do not override). /// /// public const string IpHeader = "DD_TRACE_CLIENT_IP_HEADER"; @@ -389,7 +389,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer's debug mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string DebugEnabled = "DD_TRACE_DEBUG"; @@ -438,7 +438,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// /// public const string TraceEnabled = "DD_TRACE_ENABLED"; @@ -458,7 +458,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling the tagging of every telemetry event with git metadata. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// /// public const string GitMetadataEnabled = "DD_TRACE_GIT_METADATA_ENABLED"; @@ -623,14 +623,6 @@ internal static partial class ConfigurationKeys2 /// public const string PropagationExtractFirstOnly = "DD_TRACE_PROPAGATION_EXTRACT_FIRST"; - /// - /// Configuration key for setting the propagation style for both header injection and extraction. - /// If or are also defined, - /// they will override any header injections or extraction styled defined here, respectively. - /// - /// - public const string PropagationStyle = "DD_TRACE_PROPAGATION_STYLE"; - /// /// Configuration key for setting the header extraction propagation style. /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header extraction styles. diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs index 482c940fe668..35d1950a08de 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs @@ -58,13 +58,13 @@ internal static class AppSec /// /// Configuration key for enabling or disabling the AppSec. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string Enabled = "DD_APPSEC_ENABLED"; /// /// Comma separated keys indicating the optional custom headers the user wants to send. - /// Default is value is null. + /// Default value is null. /// public const string ExtraHeaders = "DD_APPSEC_EXTRA_HEADERS"; @@ -80,7 +80,7 @@ internal static class AppSec /// /// Configuration key indicating the optional name of the custom header to take into account for the ip address. - /// Default is value is null (do not override). + /// Default value is null (do not override). /// public const string CustomIpHeader = "DD_APPSEC_IPHEADER"; @@ -123,7 +123,7 @@ internal static class AppSec /// /// Override the default rules file provided. Must be a path to a valid JSON rules file. - /// Default is value is null (do not override). + /// Default value is null (do not override). /// public const string Rules = "DD_APPSEC_RULES"; diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs index 70d5e7dc0eb5..bc2e852e5af3 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs @@ -30,13 +30,13 @@ internal static class Iast /// /// Configuration key for enabling or disabling the vulnerability duplication detection. /// When enabled, a vulnerability will only be reported once in the lifetime of an app, - /// instead of on every usage. Default is value is true (enabled). + /// instead of on every usage. Default value is true (enabled). /// public const string IsIastDeduplicationEnabled = "DD_IAST_DEDUPLICATION_ENABLED"; /// /// Configuration key for enabling or disabling the IAST. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string Enabled = "DD_IAST_ENABLED"; diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs index b43bb9af380a..658c3e54ddbc 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -56,7 +56,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the generation of APM traces. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// public const string ApmTracingEnabled = "DD_APM_TRACING_ENABLED"; @@ -176,13 +176,13 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer's debugger mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string WaitForDebuggerAttach = "DD_INTERNAL_WAIT_FOR_DEBUGGER_ATTACH"; /// /// Configuration key for enabling or disabling the Tracer's native debugger mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string WaitForNativeDebuggerAttach = "DD_INTERNAL_WAIT_FOR_NATIVE_DEBUGGER_ATTACH"; @@ -369,7 +369,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key indicating the optional name of the custom header to take into account to report the ip address from. /// If this variable is set all other IP related headers should be ignored - /// Default is value is null (do not override). + /// Default value is null (do not override). /// /// public const string IpHeader = "DD_TRACE_CLIENT_IP_HEADER"; @@ -389,7 +389,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer's debug mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string DebugEnabled = "DD_TRACE_DEBUG"; @@ -438,7 +438,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// /// public const string TraceEnabled = "DD_TRACE_ENABLED"; @@ -458,7 +458,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling the tagging of every telemetry event with git metadata. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// /// public const string GitMetadataEnabled = "DD_TRACE_GIT_METADATA_ENABLED"; @@ -623,14 +623,6 @@ internal static partial class ConfigurationKeys2 /// public const string PropagationExtractFirstOnly = "DD_TRACE_PROPAGATION_EXTRACT_FIRST"; - /// - /// Configuration key for setting the propagation style for both header injection and extraction. - /// If or are also defined, - /// they will override any header injections or extraction styled defined here, respectively. - /// - /// - public const string PropagationStyle = "DD_TRACE_PROPAGATION_STYLE"; - /// /// Configuration key for setting the header extraction propagation style. /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header extraction styles. diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs index 482c940fe668..35d1950a08de 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs @@ -58,13 +58,13 @@ internal static class AppSec /// /// Configuration key for enabling or disabling the AppSec. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string Enabled = "DD_APPSEC_ENABLED"; /// /// Comma separated keys indicating the optional custom headers the user wants to send. - /// Default is value is null. + /// Default value is null. /// public const string ExtraHeaders = "DD_APPSEC_EXTRA_HEADERS"; @@ -80,7 +80,7 @@ internal static class AppSec /// /// Configuration key indicating the optional name of the custom header to take into account for the ip address. - /// Default is value is null (do not override). + /// Default value is null (do not override). /// public const string CustomIpHeader = "DD_APPSEC_IPHEADER"; @@ -123,7 +123,7 @@ internal static class AppSec /// /// Override the default rules file provided. Must be a path to a valid JSON rules file. - /// Default is value is null (do not override). + /// Default value is null (do not override). /// public const string Rules = "DD_APPSEC_RULES"; diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs index 70d5e7dc0eb5..bc2e852e5af3 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs @@ -30,13 +30,13 @@ internal static class Iast /// /// Configuration key for enabling or disabling the vulnerability duplication detection. /// When enabled, a vulnerability will only be reported once in the lifetime of an app, - /// instead of on every usage. Default is value is true (enabled). + /// instead of on every usage. Default value is true (enabled). /// public const string IsIastDeduplicationEnabled = "DD_IAST_DEDUPLICATION_ENABLED"; /// /// Configuration key for enabling or disabling the IAST. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string Enabled = "DD_IAST_ENABLED"; diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs index b43bb9af380a..658c3e54ddbc 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -56,7 +56,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the generation of APM traces. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// public const string ApmTracingEnabled = "DD_APM_TRACING_ENABLED"; @@ -176,13 +176,13 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer's debugger mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string WaitForDebuggerAttach = "DD_INTERNAL_WAIT_FOR_DEBUGGER_ATTACH"; /// /// Configuration key for enabling or disabling the Tracer's native debugger mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string WaitForNativeDebuggerAttach = "DD_INTERNAL_WAIT_FOR_NATIVE_DEBUGGER_ATTACH"; @@ -369,7 +369,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key indicating the optional name of the custom header to take into account to report the ip address from. /// If this variable is set all other IP related headers should be ignored - /// Default is value is null (do not override). + /// Default value is null (do not override). /// /// public const string IpHeader = "DD_TRACE_CLIENT_IP_HEADER"; @@ -389,7 +389,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer's debug mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string DebugEnabled = "DD_TRACE_DEBUG"; @@ -438,7 +438,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// /// public const string TraceEnabled = "DD_TRACE_ENABLED"; @@ -458,7 +458,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling the tagging of every telemetry event with git metadata. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// /// public const string GitMetadataEnabled = "DD_TRACE_GIT_METADATA_ENABLED"; @@ -623,14 +623,6 @@ internal static partial class ConfigurationKeys2 /// public const string PropagationExtractFirstOnly = "DD_TRACE_PROPAGATION_EXTRACT_FIRST"; - /// - /// Configuration key for setting the propagation style for both header injection and extraction. - /// If or are also defined, - /// they will override any header injections or extraction styled defined here, respectively. - /// - /// - public const string PropagationStyle = "DD_TRACE_PROPAGATION_STYLE"; - /// /// Configuration key for setting the header extraction propagation style. /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header extraction styles. diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs index 482c940fe668..35d1950a08de 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.AppSec.g.cs @@ -58,13 +58,13 @@ internal static class AppSec /// /// Configuration key for enabling or disabling the AppSec. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string Enabled = "DD_APPSEC_ENABLED"; /// /// Comma separated keys indicating the optional custom headers the user wants to send. - /// Default is value is null. + /// Default value is null. /// public const string ExtraHeaders = "DD_APPSEC_EXTRA_HEADERS"; @@ -80,7 +80,7 @@ internal static class AppSec /// /// Configuration key indicating the optional name of the custom header to take into account for the ip address. - /// Default is value is null (do not override). + /// Default value is null (do not override). /// public const string CustomIpHeader = "DD_APPSEC_IPHEADER"; @@ -123,7 +123,7 @@ internal static class AppSec /// /// Override the default rules file provided. Must be a path to a valid JSON rules file. - /// Default is value is null (do not override). + /// Default value is null (do not override). /// public const string Rules = "DD_APPSEC_RULES"; diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs index 70d5e7dc0eb5..bc2e852e5af3 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Iast.g.cs @@ -30,13 +30,13 @@ internal static class Iast /// /// Configuration key for enabling or disabling the vulnerability duplication detection. /// When enabled, a vulnerability will only be reported once in the lifetime of an app, - /// instead of on every usage. Default is value is true (enabled). + /// instead of on every usage. Default value is true (enabled). /// public const string IsIastDeduplicationEnabled = "DD_IAST_DEDUPLICATION_ENABLED"; /// /// Configuration key for enabling or disabling the IAST. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string Enabled = "DD_IAST_ENABLED"; diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs index b43bb9af380a..658c3e54ddbc 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -56,7 +56,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the generation of APM traces. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// public const string ApmTracingEnabled = "DD_APM_TRACING_ENABLED"; @@ -176,13 +176,13 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer's debugger mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string WaitForDebuggerAttach = "DD_INTERNAL_WAIT_FOR_DEBUGGER_ATTACH"; /// /// Configuration key for enabling or disabling the Tracer's native debugger mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string WaitForNativeDebuggerAttach = "DD_INTERNAL_WAIT_FOR_NATIVE_DEBUGGER_ATTACH"; @@ -369,7 +369,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key indicating the optional name of the custom header to take into account to report the ip address from. /// If this variable is set all other IP related headers should be ignored - /// Default is value is null (do not override). + /// Default value is null (do not override). /// /// public const string IpHeader = "DD_TRACE_CLIENT_IP_HEADER"; @@ -389,7 +389,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer's debug mode. - /// Default is value is false (disabled). + /// Default value is false (disabled). /// public const string DebugEnabled = "DD_TRACE_DEBUG"; @@ -438,7 +438,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling or disabling the Tracer. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// /// public const string TraceEnabled = "DD_TRACE_ENABLED"; @@ -458,7 +458,7 @@ internal static partial class ConfigurationKeys2 /// /// Configuration key for enabling the tagging of every telemetry event with git metadata. - /// Default is value is true (enabled). + /// Default value is true (enabled). /// /// public const string GitMetadataEnabled = "DD_TRACE_GIT_METADATA_ENABLED"; @@ -623,14 +623,6 @@ internal static partial class ConfigurationKeys2 /// public const string PropagationExtractFirstOnly = "DD_TRACE_PROPAGATION_EXTRACT_FIRST"; - /// - /// Configuration key for setting the propagation style for both header injection and extraction. - /// If or are also defined, - /// they will override any header injections or extraction styled defined here, respectively. - /// - /// - public const string PropagationStyle = "DD_TRACE_PROPAGATION_STYLE"; - /// /// Configuration key for setting the header extraction propagation style. /// If DD_TRACE_PROPAGATION_STYLE is also defined, this value overrides the header extraction styles. From 35d1854ff6dcc3c57dd80a6a38a62370670f8d1a Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 30 Oct 2025 13:59:24 -0400 Subject: [PATCH 5/9] Answer to comments --- .../ConfigurationKeysGenerator.cs | 187 +++++++----------- .../Datadog.Trace.SourceGenerators.csproj | 2 +- .../Helpers/TrackingNames.cs | 4 - .../Helpers/YamlReader.cs | 102 ++++++++-- tracer/src/Datadog.Trace/Datadog.Trace.csproj | 8 - ...atadog.Trace.SourceGenerators.Tests.csproj | 2 +- 6 files changed, 159 insertions(+), 146 deletions(-) diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs b/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs index 2edea1e84340..220cf123926c 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs +++ b/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs @@ -31,82 +31,77 @@ public class ConfigurationKeysGenerator : IIncrementalGenerator /// public void Initialize(IncrementalGeneratorInitializationContext context) { - // Get the supported-configurations.json file - var jsonFile = context.AdditionalTextsProvider - .Where(static file => Path.GetFileName(file.Path).Equals(SupportedConfigurationsFileName, StringComparison.OrdinalIgnoreCase)) - .WithTrackingName(TrackingNames.ConfigurationKeysGenAdditionalText); - - // Get the supported-configurations-docs.yaml file (optional) - var yamlFile = context.AdditionalTextsProvider - .Where(static file => Path.GetFileName(file.Path).Equals(SupportedConfigurationsDocsFileName, StringComparison.OrdinalIgnoreCase)) - .WithTrackingName(TrackingNames.ConfigurationKeysGenYamlAdditionalText); - - // Get the configuration_keys_mapping.json file (optional) - var mappingFile = context.AdditionalTextsProvider - .Where(static file => Path.GetFileName(file.Path).Equals(ConfigurationKeysMappingFileName, StringComparison.OrdinalIgnoreCase)) - .WithTrackingName(TrackingNames.ConfigurationKeysGenMappingAdditionalText); - - // Combine all files - var combinedFiles = jsonFile.Collect().Combine(yamlFile.Collect()).Combine(mappingFile.Collect()); - - var configContent = combinedFiles.Select(static (files, ct) => + // Get all configuration files + var configFiles = context.AdditionalTextsProvider + .Where(static file => + { + var fileName = Path.GetFileName(file.Path); + return fileName.Equals(SupportedConfigurationsFileName, StringComparison.OrdinalIgnoreCase) || + fileName.Equals(SupportedConfigurationsDocsFileName, StringComparison.OrdinalIgnoreCase) || + fileName.Equals(ConfigurationKeysMappingFileName, StringComparison.OrdinalIgnoreCase); + }) + .WithTrackingName(TrackingNames.ConfigurationKeysGenAdditionalText); + var parsedConfig = configFiles.Collect().Select(static (allFiles, ct) => + { + // Find each file type + AdditionalText? jsonFile = null; + AdditionalText? yamlFile = null; + AdditionalText? mappingFile = null; + + foreach (var file in allFiles) { - var ((jsonFiles, yamlFiles), mappingFiles) = files; - - if (jsonFiles.Length == 0) + var fileName = Path.GetFileName(file.Path); + if (fileName.Equals(SupportedConfigurationsFileName, StringComparison.OrdinalIgnoreCase)) { - return new Result<(string Json, string? Yaml, string? Mapping)>( - (string.Empty, null, null), - new EquatableArray( - [ - CreateDiagnosticInfo("DDSG0005", "Configuration file not found", $"The file '{SupportedConfigurationsFileName}' was not found. Make sure the supported-configurations.json file exists and is included as an AdditionalFile.", DiagnosticSeverity.Error) - ])); + jsonFile = file; } - - var jsonResult = ExtractConfigurationContent(jsonFiles[0], ct); - if (jsonResult.Errors.Count > 0) + else if (fileName.Equals(SupportedConfigurationsDocsFileName, StringComparison.OrdinalIgnoreCase)) { - return new Result<(string Json, string? Yaml, string? Mapping)>((string.Empty, null, null), jsonResult.Errors); - } - - string? yamlContent = null; - if (yamlFiles.Length > 0) - { - var yamlResult = ExtractConfigurationContent(yamlFiles[0], ct); - if (yamlResult.Errors.Count == 0) - { - yamlContent = yamlResult.Value; - } - - // YAML is optional, so we don't fail if it has errors + yamlFile = file; } - - string? mappingContent = null; - if (mappingFiles.Length > 0) + else if (fileName.Equals(ConfigurationKeysMappingFileName, StringComparison.OrdinalIgnoreCase)) { - var mappingResult = ExtractConfigurationContent(mappingFiles[0], ct); - if (mappingResult.Errors.Count == 0) - { - mappingContent = mappingResult.Value; - } - - // Mapping is optional, so we don't fail if it has errors + mappingFile = file; } + } - return new Result<(string Json, string? Yaml, string? Mapping)>((jsonResult.Value, yamlContent, mappingContent), new EquatableArray()); - }) - .WithTrackingName(TrackingNames.ConfigurationKeysGenContentExtracted); + // JSON file is required + if (jsonFile is null) + { + return new Result( + null!, + new EquatableArray( + [ + CreateDiagnosticInfo("DDSG0005", "Configuration file not found", $"The file '{SupportedConfigurationsFileName}' was not found. Make sure the supported-configurations.json file exists and is included as an AdditionalFile.", DiagnosticSeverity.Error) + ])); + } + + // Read JSON file (required) + var jsonText = jsonFile.GetText(ct); + if (jsonText is null) + { + return new Result( + null!, + new EquatableArray([CreateDiagnosticInfo("DDSG0006", "Configuration file read error", $"Unable to read the content of '{SupportedConfigurationsFileName}'.", DiagnosticSeverity.Error)])); + } + + // Read optional YAML file + string? yamlContent = null; + if (yamlFile is not null) + { + yamlContent = yamlFile.GetText(ct)?.ToString(); + } - var parsedConfig = configContent.Select(static (extractResult, ct) => - { - if (extractResult.Errors.Count > 0) - { - return new Result(null!, extractResult.Errors); - } + // Read optional mapping file + string? mappingContent = null; + if (mappingFile is not null) + { + mappingContent = mappingFile.GetText(ct)?.ToString(); + } - return ParseConfigurationContent(extractResult.Value.Json, extractResult.Value.Yaml, extractResult.Value.Mapping, ct); - }) - .WithTrackingName(TrackingNames.ConfigurationKeysGenParseConfiguration); + return ParseConfigurationContent(jsonText.ToString(), yamlContent, mappingContent, ct); + }) + .WithTrackingName(TrackingNames.ConfigurationKeysGenParseConfiguration); context.RegisterSourceOutput( parsedConfig, @@ -141,34 +136,6 @@ private static void Execute(SourceProductionContext context, Result ExtractConfigurationContent(AdditionalText file, CancellationToken cancellationToken) - { - try - { - var sourceText = file.GetText(cancellationToken); - if (sourceText is null) - { - return new Result( - string.Empty, - new EquatableArray( - [ - CreateDiagnosticInfo("DDSG0006", "Configuration file read error", $"Unable to read the content of '{SupportedConfigurationsFileName}'.", DiagnosticSeverity.Error) - ])); - } - - return new Result(sourceText.ToString(), new EquatableArray()); - } - catch (Exception ex) - { - return new Result( - string.Empty, - new EquatableArray( - [ - CreateDiagnosticInfo("DDSG0006", "Configuration file read error", $"Error reading '{SupportedConfigurationsFileName}': {ex.Message}", DiagnosticSeverity.Error) - ])); - } - } - private static Result ParseConfigurationContent(string jsonContent, string? yamlContent, string? mappingContent, CancellationToken cancellationToken) { try @@ -183,7 +150,7 @@ private static Result ParseConfigurationContent(string jsonCo null!, new EquatableArray( [ - CreateDiagnosticInfo("DDSG0007", "JSON parse error", "Failed to find 'supportedConfigurations' section in supported-configurations.json.", DiagnosticSeverity.Error) + CreateDiagnosticInfo("DDSG0007", "JSON parse error", $"Failed to find 'supportedConfigurations' section in {SupportedConfigurationsFileName}.", DiagnosticSeverity.Error) ])); } @@ -323,7 +290,7 @@ private static string GenerateProductPartialClass(string product, List productName switch { - return new[] { string.Empty }; - } - - // we need to keep comparison case-sensitive as there are keys like TraceRemoveIntegrationServiceNamesEnabled and we don't want to strip Tracer - switch (productName) - { - case "AppSec": - return new[] { "Appsec" }; - case "Tracer": - return new[] { "Trace" }; - case "CiVisibility": - return new[] { "Civisibility" }; - case "OpenTelemetry": - return new[] { "Otel" }; - default: - return new[] { productName! }; - } - } + null or "" => [string.Empty], + "AppSec" => ["Appsec"], + "Tracer" => ["Trace"], + "CiVisibility" => ["Civisibility"], + "OpenTelemetry" => ["Otel"], + _ => [productName] + }; private static DiagnosticInfo CreateDiagnosticInfo(string id, string title, string message, DiagnosticSeverity severity) { diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Datadog.Trace.SourceGenerators.csproj b/tracer/src/Datadog.Trace.SourceGenerators/Datadog.Trace.SourceGenerators.csproj index 74f8111d6bf7..4fb4bbab1c86 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Datadog.Trace.SourceGenerators.csproj +++ b/tracer/src/Datadog.Trace.SourceGenerators/Datadog.Trace.SourceGenerators.csproj @@ -12,7 +12,7 @@ - + diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs index 99a711a14607..ba3ec762d0b2 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs +++ b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs @@ -40,9 +40,5 @@ internal class TrackingNames // Configuration key generator public const string ConfigurationKeysGenParseConfiguration = nameof(ConfigurationKeysGenParseConfiguration); - public const string ConfigurationKeysGenContentExtracted = nameof(ConfigurationKeysGenContentExtracted); - public const string ConfigurationKeysGenMatcherValidData = nameof(ConfigurationKeysGenMatcherValidData); public const string ConfigurationKeysGenAdditionalText = nameof(ConfigurationKeysGenAdditionalText); - public const string ConfigurationKeysGenYamlAdditionalText = nameof(ConfigurationKeysGenYamlAdditionalText); - public const string ConfigurationKeysGenMappingAdditionalText = nameof(ConfigurationKeysGenMappingAdditionalText); } diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/YamlReader.cs b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/YamlReader.cs index a05874d92d2a..f9e8ea01415a 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/YamlReader.cs +++ b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/YamlReader.cs @@ -3,6 +3,7 @@ // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // +using System; using System.Collections.Generic; using System.Text; @@ -21,25 +22,22 @@ internal static class YamlReader public static Dictionary ParseDocumentation(string yamlContent) { var result = new Dictionary(); - var lines = yamlContent.Replace("\r\n", "\n").Split('\n'); string? currentKey = null; var currentDoc = new StringBuilder(); var inMultiLine = false; var baseIndent = 0; - for (int i = 0; i < lines.Length; i++) + foreach (var line in new LineEnumerator(yamlContent.AsSpan())) { - var line = lines[i]; - // Skip empty lines and comments when not in multi-line - if (!inMultiLine && (string.IsNullOrWhiteSpace(line) || line.TrimStart().StartsWith("#"))) + if (!inMultiLine && (IsWhiteSpace(line) || line.TrimStart().StartsWith("#".AsSpan(), StringComparison.Ordinal))) { continue; } // Check for new key (starts at column 0, contains colon) - if (!inMultiLine && line.Length > 0 && line[0] != ' ' && line.Contains(":")) + if (!inMultiLine && line.Length > 0 && line[0] != ' ' && line.IndexOf(':') >= 0) { // Save previous key if exists if (currentKey != null) @@ -49,19 +47,19 @@ public static Dictionary ParseDocumentation(string yamlContent) } var colonIndex = line.IndexOf(':'); - currentKey = line.Substring(0, colonIndex).Trim(); + currentKey = line.Slice(0, colonIndex).Trim().ToString(); // Check if it's a multi-line string (|) - var afterColon = line.Substring(colonIndex + 1).Trim(); - if (afterColon == "|" || afterColon == ">") + var afterColon = line.Slice(colonIndex + 1).Trim(); + if (afterColon.Length == 1 && (afterColon[0] == '|' || afterColon[0] == '>')) { inMultiLine = true; baseIndent = -1; // Will be set on first content line } - else if (!string.IsNullOrEmpty(afterColon)) + else if (afterColon.Length > 0) { // Single line value - currentDoc.Append(afterColon); + currentDoc.Append(afterColon.ToString()); result[currentKey] = currentDoc.ToString(); currentDoc.Clear(); currentKey = null; @@ -74,7 +72,7 @@ public static Dictionary ParseDocumentation(string yamlContent) if (inMultiLine && currentKey != null) { // Check if we've reached the next key (no indentation) - if (line.Length > 0 && line[0] != ' ' && line.Contains(":")) + if (line.Length > 0 && line[0] != ' ' && line.IndexOf(':') >= 0) { // Save current key and process this line as new key result[currentKey] = currentDoc.ToString().TrimEnd(); @@ -82,9 +80,9 @@ public static Dictionary ParseDocumentation(string yamlContent) inMultiLine = false; var colonIndex = line.IndexOf(':'); - currentKey = line.Substring(0, colonIndex).Trim(); - var afterColon = line.Substring(colonIndex + 1).Trim(); - if (afterColon == "|" || afterColon == ">") + currentKey = line.Slice(0, colonIndex).Trim().ToString(); + var afterColon = line.Slice(colonIndex + 1).Trim(); + if (afterColon.Length == 1 && (afterColon[0] == '|' || afterColon[0] == '>')) { inMultiLine = true; baseIndent = -1; @@ -117,7 +115,7 @@ public static Dictionary ParseDocumentation(string yamlContent) currentDoc.AppendLine(); } - currentDoc.Append(line.Substring(contentStart)); + currentDoc.Append(line.Slice(contentStart).ToString()); } else { @@ -138,5 +136,77 @@ public static Dictionary ParseDocumentation(string yamlContent) return result; } + + /// + /// Checks if a span contains only whitespace characters. + /// + private static bool IsWhiteSpace(ReadOnlySpan span) + { + for (int i = 0; i < span.Length; i++) + { + if (!char.IsWhiteSpace(span[i])) + { + return false; + } + } + + return true; + } + + /// + /// Enumerator for iterating through lines in a ReadOnlySpan without allocations. + /// + private ref struct LineEnumerator + { + private ReadOnlySpan _remaining; + private ReadOnlySpan _current; + private bool _isEnumeratorActive; + + public LineEnumerator(ReadOnlySpan text) + { + _remaining = text; + _current = default; + _isEnumeratorActive = true; + } + + public ReadOnlySpan Current => _current; + + public LineEnumerator GetEnumerator() => this; + + public bool MoveNext() + { + if (!_isEnumeratorActive) + { + return false; + } + + if (_remaining.Length == 0) + { + _isEnumeratorActive = false; + return false; + } + + var idx = _remaining.IndexOfAny('\r', '\n'); + if (idx < 0) + { + // Last line without line ending + _current = _remaining; + _remaining = default; + return true; + } + + _current = _remaining.Slice(0, idx); + + // Skip past the line ending (\r\n or \n or \r) + var advance = idx + 1; + if (idx < _remaining.Length - 1 && _remaining[idx] == '\r' && _remaining[idx + 1] == '\n') + { + advance = idx + 2; + } + + _remaining = _remaining.Slice(advance); + return true; + } + } } } diff --git a/tracer/src/Datadog.Trace/Datadog.Trace.csproj b/tracer/src/Datadog.Trace/Datadog.Trace.csproj index e2a5b2b0b66e..5f8dcc60ffff 100644 --- a/tracer/src/Datadog.Trace/Datadog.Trace.csproj +++ b/tracer/src/Datadog.Trace/Datadog.Trace.csproj @@ -167,12 +167,4 @@ Never - - - - - - - - \ No newline at end of file diff --git a/tracer/test/Datadog.Trace.SourceGenerators.Tests/Datadog.Trace.SourceGenerators.Tests.csproj b/tracer/test/Datadog.Trace.SourceGenerators.Tests/Datadog.Trace.SourceGenerators.Tests.csproj index 0ded833e1e6f..5a8b90f8e1a4 100644 --- a/tracer/test/Datadog.Trace.SourceGenerators.Tests/Datadog.Trace.SourceGenerators.Tests.csproj +++ b/tracer/test/Datadog.Trace.SourceGenerators.Tests/Datadog.Trace.SourceGenerators.Tests.csproj @@ -7,7 +7,7 @@ - + From b02feb3336be9bc00beca0de59392a9e2494c1bc Mon Sep 17 00:00:00 2001 From: Anna Date: Fri, 31 Oct 2025 17:37:21 -0400 Subject: [PATCH 6/9] Improve source generator --- .../ConfigurationKeysGenerator.cs | 430 ++++++++++++------ .../Helpers/TrackingNames.cs | 7 +- tracer/src/Datadog.Trace/Datadog.Trace.csproj | 4 +- 3 files changed, 293 insertions(+), 148 deletions(-) diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs b/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs index 220cf123926c..030d15e82247 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs +++ b/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs @@ -9,11 +9,11 @@ using System.Linq; using System.Text; using System.Text.Json; -using System.Threading; using Datadog.Trace.SourceGenerators; using Datadog.Trace.SourceGenerators.Helpers; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Text; +using HashCode = System.HashCode; /// /// Source generator that reads supported-configurations.json and generates ConfigurationKeys @@ -31,81 +31,70 @@ public class ConfigurationKeysGenerator : IIncrementalGenerator /// public void Initialize(IncrementalGeneratorInitializationContext context) { - // Get all configuration files - var configFiles = context.AdditionalTextsProvider - .Where(static file => - { - var fileName = Path.GetFileName(file.Path); - return fileName.Equals(SupportedConfigurationsFileName, StringComparison.OrdinalIgnoreCase) || - fileName.Equals(SupportedConfigurationsDocsFileName, StringComparison.OrdinalIgnoreCase) || - fileName.Equals(ConfigurationKeysMappingFileName, StringComparison.OrdinalIgnoreCase); - }) - .WithTrackingName(TrackingNames.ConfigurationKeysGenAdditionalText); - var parsedConfig = configFiles.Collect().Select(static (allFiles, ct) => - { - // Find each file type - AdditionalText? jsonFile = null; - AdditionalText? yamlFile = null; - AdditionalText? mappingFile = null; - - foreach (var file in allFiles) - { - var fileName = Path.GetFileName(file.Path); - if (fileName.Equals(SupportedConfigurationsFileName, StringComparison.OrdinalIgnoreCase)) - { - jsonFile = file; - } - else if (fileName.Equals(SupportedConfigurationsDocsFileName, StringComparison.OrdinalIgnoreCase)) - { - yamlFile = file; - } - else if (fileName.Equals(ConfigurationKeysMappingFileName, StringComparison.OrdinalIgnoreCase)) - { - mappingFile = file; - } - } - - // JSON file is required - if (jsonFile is null) - { - return new Result( - null!, - new EquatableArray( - [ - CreateDiagnosticInfo("DDSG0005", "Configuration file not found", $"The file '{SupportedConfigurationsFileName}' was not found. Make sure the supported-configurations.json file exists and is included as an AdditionalFile.", DiagnosticSeverity.Error) - ])); - } - - // Read JSON file (required) - var jsonText = jsonFile.GetText(ct); - if (jsonText is null) - { - return new Result( - null!, - new EquatableArray([CreateDiagnosticInfo("DDSG0006", "Configuration file read error", $"Unable to read the content of '{SupportedConfigurationsFileName}'.", DiagnosticSeverity.Error)])); - } - - // Read optional YAML file - string? yamlContent = null; - if (yamlFile is not null) - { - yamlContent = yamlFile.GetText(ct)?.ToString(); - } - - // Read optional mapping file - string? mappingContent = null; - if (mappingFile is not null) - { - mappingContent = mappingFile.GetText(ct)?.ToString(); - } - - return ParseConfigurationContent(jsonText.ToString(), yamlContent, mappingContent, ct); - }) - .WithTrackingName(TrackingNames.ConfigurationKeysGenParseConfiguration); - - context.RegisterSourceOutput( - parsedConfig, - static (spc, result) => Execute(spc, result)); + // Create THREE separate single-value providers - each caches independently + + // JSON pipeline + var jsonData = context.AdditionalTextsProvider + .Where(static file => Path.GetFileName(file.Path).Equals(SupportedConfigurationsFileName, StringComparison.OrdinalIgnoreCase)) + .Select(static (file, ct) => file.GetText(ct)) + .WithTrackingName(TrackingNames.ConfigurationKeysGenJsonFile) + .Select(static (text, _) => + { + var content = text?.ToString() ?? string.Empty; + return ParseJsonContent(content); + }) + .Collect() + .WithTrackingName(TrackingNames.ConfigurationKeysGenParseConfiguration); // Now it's IncrementalValueProvider> + + // YAML pipeline + var yamlData = context.AdditionalTextsProvider + .Where(static file => Path.GetFileName(file.Path).Equals(SupportedConfigurationsDocsFileName, StringComparison.OrdinalIgnoreCase)) + .Select(static (file, ct) => file.GetText(ct)) + .WithTrackingName(TrackingNames.ConfigurationKeysGenYamlFile) + .Select(static (text, _) => + { + var content = text?.ToString() ?? string.Empty; + return ParseYamlContent(content); + }) + .Collect() + .WithTrackingName(TrackingNames.ConfigurationKeysGenParseYaml); + + // Mapping pipeline + var mappingData = context.AdditionalTextsProvider + .Where(static file => Path.GetFileName(file.Path).Equals(ConfigurationKeysMappingFileName, StringComparison.OrdinalIgnoreCase)) + .Select(static (file, ct) => file.GetText(ct)).WithTrackingName(TrackingNames.ConfigurationKeysGenMappingFile) + .Select(static (text, _) => + { + var content = text?.ToString() ?? string.Empty; + return ParseMappingContent(content); + }) + .Collect() + .WithTrackingName(TrackingNames.ConfigurationKeysGenParseMapping); + + // Combine the three independent providers + var combined = jsonData + .Combine(yamlData) + .Combine(mappingData) + .Select(static (data, _) => + { + var ((jsonArray, yamlArray), mappingArray) = data; + + var json = jsonArray.Length > 0 + ? jsonArray[0] + : new Result(null!, new EquatableArray([CreateDiagnosticInfo("DDSG0005", "Missing", "JSON not found", DiagnosticSeverity.Error)])); + + var yaml = yamlArray.Length > 0 + ? yamlArray[0] + : new Result(new ParsedYamlDocs(null), new EquatableArray()); + + var mapping = mappingArray.Length > 0 + ? mappingArray[0] + : new Result(new ParsedMappingData(null), new EquatableArray()); + + return MergeResults(json, yaml, mapping); + }).WithTrackingName(TrackingNames.ConfigurationKeysGenMergeData); + + context.RegisterSourceOutput(combined, static (spc, result) => Execute(spc, result)); } private static void Execute(SourceProductionContext context, Result result) @@ -136,78 +125,30 @@ private static void Execute(SourceProductionContext context, Result ParseConfigurationContent(string jsonContent, string? yamlContent, string? mappingContent, CancellationToken cancellationToken) + // Parse JSON content from string + private static Result ParseJsonContent(string content) { + if (string.IsNullOrEmpty(content)) + { + return new Result(null!, new EquatableArray([CreateDiagnosticInfo("DDSG0006", "Read error", "JSON content is empty", DiagnosticSeverity.Error)])); + } + try { - using var document = JsonDocument.Parse(jsonContent); + using var document = JsonDocument.Parse(content); var root = document.RootElement; - // Extract the supportedConfigurations section from JSON if (!root.TryGetProperty("supportedConfigurations", out var configSection)) { - return new Result( - null!, - new EquatableArray( - [ - CreateDiagnosticInfo("DDSG0007", "JSON parse error", $"Failed to find 'supportedConfigurations' section in {SupportedConfigurationsFileName}.", DiagnosticSeverity.Error) - ])); - } - - // Parse mapping file if available - Dictionary? nameMapping = null; - if (mappingContent != null && !string.IsNullOrEmpty(mappingContent)) - { - try - { - nameMapping = ParseMappingFile(mappingContent); - } - catch - { - // Mapping is optional, continue without it - } + return new Result(null!, new EquatableArray([CreateDiagnosticInfo("DDSG0007", "JSON parse error", "Missing 'supportedConfigurations' section", DiagnosticSeverity.Error)])); } - // Parse YAML documentation if available - Dictionary? yamlDocs = null; - if (yamlContent != null && !string.IsNullOrEmpty(yamlContent)) - { - try - { - yamlDocs = YamlReader.ParseDocumentation(yamlContent); - } - catch - { - // YAML parsing is optional, continue without it - } - } - - // Parse each configuration entry from JSON var configurations = ParseConfigurationEntries(configSection); - // Parse deprecations section - Dictionary? deprecations = null; + // Parse deprecations if (root.TryGetProperty("deprecations", out var deprecationsSection)) { - deprecations = ParseDeprecations(deprecationsSection); - } - - // Override documentation from YAML if available - if (yamlDocs != null) - { - foreach (var key in yamlDocs.Keys) - { - if (configurations.ContainsKey(key)) - { - var existing = configurations[key]; - configurations[key] = new ConfigEntry(existing.Key, yamlDocs[key], existing.Product, existing.DeprecationMessage); - } - } - } - - // Add deprecation messages to entries - if (deprecations != null) - { + var deprecations = ParseDeprecations(deprecationsSection); foreach (var kvp in deprecations) { if (configurations.ContainsKey(kvp.Key)) @@ -218,19 +159,87 @@ private static Result ParseConfigurationContent(string jsonCo } } - return new Result(new ConfigurationData(configurations, nameMapping), new EquatableArray()); + return new Result(new ConfigurationData(configurations, null), new EquatableArray()); } catch (Exception ex) { - return new Result( - null!, - new EquatableArray( - [ - CreateDiagnosticInfo("DDSG0007", "JSON parse error", $"Error parsing supported-configurations.json: {ex.Message}", DiagnosticSeverity.Error) - ])); + return new Result(null!, new EquatableArray([CreateDiagnosticInfo("DDSG0007", "JSON parse error", $"Error: {ex.Message}", DiagnosticSeverity.Error)])); } } + // Parse YAML content from string + private static Result ParseYamlContent(string content) + { + if (string.IsNullOrEmpty(content)) + { + return new Result(new ParsedYamlDocs(null), new EquatableArray()); + } + + try + { + var docs = YamlReader.ParseDocumentation(content); + return new Result(new ParsedYamlDocs(docs), new EquatableArray()); + } + catch + { + return new Result(new ParsedYamlDocs(null), new EquatableArray()); + } + } + + // Parse mapping content from string + private static Result ParseMappingContent(string content) + { + if (string.IsNullOrEmpty(content)) + { + return new Result(new ParsedMappingData(null), new EquatableArray()); + } + + try + { + var mapping = ParseMappingJson(content); + return new Result(new ParsedMappingData(mapping), new EquatableArray()); + } + catch + { + return new Result(new ParsedMappingData(null), new EquatableArray()); + } + } + + // Merge all parsed results into final ConfigurationData + private static Result MergeResults( + Result jsonResult, + Result yamlResult, + Result mappingResult) + { + var diagnostics = new List(jsonResult.Errors); + diagnostics.AddRange(yamlResult.Errors); + diagnostics.AddRange(mappingResult.Errors); + + if (jsonResult.Value is null) + { + return new Result(null!, new EquatableArray(diagnostics.ToArray())); + } + + var configurations = new Dictionary(jsonResult.Value.Configurations); + + // Merge YAML docs + var yamlDocs = yamlResult.Value.Docs; + if (yamlDocs != null) + { + foreach (var kvp in yamlDocs) + { + if (configurations.ContainsKey(kvp.Key)) + { + var existing = configurations[kvp.Key]; + configurations[kvp.Key] = new ConfigEntry(existing.Key, kvp.Value, existing.Product, existing.DeprecationMessage); + } + } + } + + var nameMapping = mappingResult.Value.Mapping; + return new Result(new ConfigurationData(configurations, nameMapping), new EquatableArray(diagnostics.ToArray())); + } + private static Dictionary ParseDeprecations(JsonElement deprecationsElement) { var deprecations = new Dictionary(); @@ -340,7 +349,7 @@ private static string GenerateProductPartialClass(string product, List ParseMappingFile(string mappingJson) + private static Dictionary ParseMappingJson(string mappingJson) { var mapping = new Dictionary(); @@ -521,7 +530,7 @@ public ConfigEntry(string key, string documentation, string product, string? dep public override bool Equals(object? obj) => obj is ConfigEntry other && Equals(other); - public override int GetHashCode() => System.HashCode.Combine(Key, Documentation, Product, DeprecationMessage); + public override int GetHashCode() => HashCode.Combine(Key, Documentation, Product, DeprecationMessage); } private readonly struct ConstantNameMapping : IEquatable @@ -540,6 +549,116 @@ public ConstantNameMapping(string constantName) public override int GetHashCode() => ConstantName.GetHashCode(); } + private readonly struct ParsedYamlDocs : IEquatable + { + public ParsedYamlDocs(Dictionary? docs) + { + Docs = docs; + } + + public Dictionary? Docs { get; } + + public bool Equals(ParsedYamlDocs other) + { + if (Docs == null && other.Docs == null) + { + return true; + } + + if (Docs == null || other.Docs == null || Docs.Count != other.Docs.Count) + { + return false; + } + + foreach (var kvp in Docs) + { + if (!other.Docs.TryGetValue(kvp.Key, out var otherValue) || kvp.Value != otherValue) + { + return false; + } + } + + return true; + } + + public override bool Equals(object? obj) => obj is ParsedYamlDocs other && Equals(other); + + public override int GetHashCode() + { + if (Docs == null) + { + return 0; + } + + var hash = new HashCode(); + hash.Add(Docs.Count); + + // Hash keys and values in sorted order for determinism + foreach (var kvp in Docs.OrderBy(x => x.Key)) + { + hash.Add(kvp.Key); + hash.Add(kvp.Value); + } + + return hash.ToHashCode(); + } + } + + private readonly struct ParsedMappingData : IEquatable + { + public ParsedMappingData(Dictionary? mapping) + { + Mapping = mapping; + } + + public Dictionary? Mapping { get; } + + public bool Equals(ParsedMappingData other) + { + if (Mapping == null && other.Mapping == null) + { + return true; + } + + if (Mapping == null || other.Mapping == null || Mapping.Count != other.Mapping.Count) + { + return false; + } + + foreach (var kvp in Mapping) + { + if (!other.Mapping.TryGetValue(kvp.Key, out var otherValue) || !kvp.Value.Equals(otherValue)) + { + return false; + } + } + + return true; + } + + public override bool Equals(object? obj) => obj is ParsedMappingData other && Equals(other); + + public override int GetHashCode() + { + if (Mapping == null) + { + return 0; + } + + var hash = new HashCode(); + hash.Add(Mapping.Count); + + // Hash keys and values in sorted order for determinism + foreach (var kvp in Mapping.OrderBy(x => x.Key)) + { + hash.Add(kvp.Key); + hash.Add(kvp.Value); + } + + return hash.ToHashCode(); + } + } + private sealed class ConfigurationData : IEquatable { public ConfigurationData(Dictionary configurations, Dictionary? nameMapping) @@ -621,7 +740,28 @@ public override bool Equals(object? obj) public override int GetHashCode() { - return System.HashCode.Combine(Configurations.Count, NameMapping?.Count ?? 0); + var hash = new HashCode(); + hash.Add(Configurations.Count); + + // Hash configuration keys and values in sorted order for determinism + foreach (var kvp in Configurations.OrderBy(x => x.Key)) + { + hash.Add(kvp.Key); + hash.Add(kvp.Value); + } + + // Hash name mapping + if (NameMapping != null) + { + hash.Add(NameMapping.Count); + foreach (var kvp in NameMapping.OrderBy(x => x.Key)) + { + hash.Add(kvp.Key); + hash.Add(kvp.Value); + } + } + + return hash.ToHashCode(); } } } diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs index ba3ec762d0b2..6b7e8132a15f 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs +++ b/tracer/src/Datadog.Trace.SourceGenerators/Helpers/TrackingNames.cs @@ -39,6 +39,11 @@ internal class TrackingNames public const string ConfigurationKeysAdditionalText = nameof(ConfigurationKeysAdditionalText); // Configuration key generator + public const string ConfigurationKeysGenJsonFile = nameof(ConfigurationKeysGenJsonFile); + public const string ConfigurationKeysGenYamlFile = nameof(ConfigurationKeysGenYamlFile); + public const string ConfigurationKeysGenMappingFile = nameof(ConfigurationKeysGenMappingFile); + public const string ConfigurationKeysGenMergeData = nameof(ConfigurationKeysGenMergeData); public const string ConfigurationKeysGenParseConfiguration = nameof(ConfigurationKeysGenParseConfiguration); - public const string ConfigurationKeysGenAdditionalText = nameof(ConfigurationKeysGenAdditionalText); + public const string ConfigurationKeysGenParseYaml = nameof(ConfigurationKeysGenParseYaml); + public const string ConfigurationKeysGenParseMapping = nameof(ConfigurationKeysGenParseMapping); } diff --git a/tracer/src/Datadog.Trace/Datadog.Trace.csproj b/tracer/src/Datadog.Trace/Datadog.Trace.csproj index 5f8dcc60ffff..d7548b6a435e 100644 --- a/tracer/src/Datadog.Trace/Datadog.Trace.csproj +++ b/tracer/src/Datadog.Trace/Datadog.Trace.csproj @@ -158,10 +158,10 @@ - PreserveNewest + Never - PreserveNewest + Never Never From 87766739e5a7ea1841c8926de56e11dc76799477 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 25 Nov 2025 15:32:45 +0100 Subject: [PATCH 7/9] DD_TRACE_ACTIVITY_LISTENER_ENABLED is OpenTelemetry --- .../Configuration/supported-configurations.json | 2 +- .../ConfigurationKeys2.OpenTelemetry.g.cs | 5 +++++ .../ConfigurationKeys2.Telemetry.g.cs | 5 ----- .../ConfigurationKeys2.OpenTelemetry.g.cs | 5 +++++ .../ConfigurationKeys2.Telemetry.g.cs | 5 ----- .../ConfigurationKeys2.OpenTelemetry.g.cs | 5 +++++ .../ConfigurationKeys2.Telemetry.g.cs | 5 ----- .../ConfigurationKeys2.OpenTelemetry.g.cs | 5 +++++ .../ConfigurationKeys2.Telemetry.g.cs | 5 ----- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tracer/src/Datadog.Trace/Configuration/supported-configurations.json b/tracer/src/Datadog.Trace/Configuration/supported-configurations.json index e86579782e4b..f383e10ccbfd 100644 --- a/tracer/src/Datadog.Trace/Configuration/supported-configurations.json +++ b/tracer/src/Datadog.Trace/Configuration/supported-configurations.json @@ -960,7 +960,7 @@ "version": [ "A" ], - "product": "Telemetry" + "product": "OpenTelemetry" }, "DD_TRACE_AGENT_ARGS": { "version": [ diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs index b579ba304a13..fa319f7e60c9 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs @@ -15,6 +15,11 @@ internal static partial class ConfigurationKeys2 { internal static class OpenTelemetry { + /// + /// Configuration key to enable or disable the ActivityListener. + /// + public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; + /// /// Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). /// Used when is not set. diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs index a2d654a00591..cc280894a3d7 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -72,10 +72,5 @@ internal static class Telemetry /// /// public const string MetricsEnabled = "DD_TELEMETRY_METRICS_ENABLED"; - - /// - /// Configuration key to enable or disable the ActivityListener. - /// - public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; } } diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs index b579ba304a13..fa319f7e60c9 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs @@ -15,6 +15,11 @@ internal static partial class ConfigurationKeys2 { internal static class OpenTelemetry { + /// + /// Configuration key to enable or disable the ActivityListener. + /// + public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; + /// /// Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). /// Used when is not set. diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs index a2d654a00591..cc280894a3d7 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -72,10 +72,5 @@ internal static class Telemetry /// /// public const string MetricsEnabled = "DD_TELEMETRY_METRICS_ENABLED"; - - /// - /// Configuration key to enable or disable the ActivityListener. - /// - public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; } } diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs index b579ba304a13..fa319f7e60c9 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs @@ -15,6 +15,11 @@ internal static partial class ConfigurationKeys2 { internal static class OpenTelemetry { + /// + /// Configuration key to enable or disable the ActivityListener. + /// + public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; + /// /// Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). /// Used when is not set. diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs index a2d654a00591..cc280894a3d7 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -72,10 +72,5 @@ internal static class Telemetry /// /// public const string MetricsEnabled = "DD_TELEMETRY_METRICS_ENABLED"; - - /// - /// Configuration key to enable or disable the ActivityListener. - /// - public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; } } diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs index b579ba304a13..fa319f7e60c9 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.OpenTelemetry.g.cs @@ -15,6 +15,11 @@ internal static partial class ConfigurationKeys2 { internal static class OpenTelemetry { + /// + /// Configuration key to enable or disable the ActivityListener. + /// + public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; + /// /// Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). /// Used when is not set. diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs index a2d654a00591..cc280894a3d7 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -72,10 +72,5 @@ internal static class Telemetry /// /// public const string MetricsEnabled = "DD_TELEMETRY_METRICS_ENABLED"; - - /// - /// Configuration key to enable or disable the ActivityListener. - /// - public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; } } From 85deee33871decb344dd8d29e4f4de7f1744fc57 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 25 Nov 2025 15:47:01 +0100 Subject: [PATCH 8/9] Comments minor changes --- .../Configuration/ConfigurationKeysGenerator.cs | 6 ++++-- .../ConfigurationKeysGeneratorTests.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs b/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs index 030d15e82247..14fa6a0b4428 100644 --- a/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs +++ b/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs @@ -404,7 +404,9 @@ private static void GenerateConstDeclaration(StringBuilder sb, ConfigEntry entry var trimmedLine = line.TrimStart(); // Check if line contains seealso tag (self-closing /> or closing ) as we need to extract it - if (trimmedLine.StartsWith("") || trimmedLine.Contains(""))) + if (trimmedLine.StartsWith("", StringComparison.Ordinal) >= 0 || + trimmedLine.IndexOf("", StringComparison.Ordinal) >= 0)) { // seealso tags go outside summary - save for later seeAlsoLines.Add(line.Trim()); @@ -472,7 +474,7 @@ private static string KeyToConstName(string key, string[]? productNames = null, { foreach (var productName in productNames) { - if (pascalName!.Length > productName.Length && + if (pascalName.Length > productName.Length && pascalName.StartsWith(productName, StringComparison.InvariantCulture)) { pascalName = pascalName.Substring(productName.Length); diff --git a/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs b/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs index 75b62bc85e78..5083f332eb29 100644 --- a/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs +++ b/tracer/test/Datadog.Trace.SourceGenerators.Tests/ConfigurationKeysGeneratorTests.cs @@ -324,7 +324,7 @@ public void HandlesInvalidJson() } [Fact] - public void SortsEntriesAlphabetically() + public void SortsEntriesAlphabeticallyByEnvironmentVariable() { const string supportedConfigJson = """ { From affec1aa9d3e6181fa06ce0de93dac55e9ffeee5 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 25 Nov 2025 16:39:35 +0100 Subject: [PATCH 9/9] Add 2 missing keys since rebase --- .../Configuration/configuration_keys_mapping.json | 8 ++++++++ .../Configuration/supported-configurations-docs.yaml | 9 +++++++++ .../Configuration/supported-configurations.json | 11 +++++++++++ .../ConfigurationKeys2.Telemetry.g.cs | 6 ++++++ .../ConfigurationKeys2.g.cs | 7 +++++++ .../ConfigurationKeys2.Telemetry.g.cs | 6 ++++++ .../ConfigurationKeys2.g.cs | 7 +++++++ .../ConfigurationKeys2.Telemetry.g.cs | 6 ++++++ .../ConfigurationKeys2.g.cs | 7 +++++++ .../ConfigurationKeys2.Telemetry.g.cs | 6 ++++++ .../ConfigurationKeys2.g.cs | 7 +++++++ 11 files changed, 80 insertions(+) diff --git a/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json b/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json index b5c878056025..6ae75a077385 100644 --- a/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json +++ b/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json @@ -16,6 +16,10 @@ "env_var": "DD_AGENT_HOST", "const_name": "AgentHost" }, + { + "env_var": "DD_AGENT_FEATURE_POLLING_ENABLED", + "const_name": "AgentFeaturePollingEnabled" + }, { "env_var": "DD_API_KEY", "const_name": "ApiKey" @@ -464,6 +468,10 @@ "env_var": "DD_INSTRUMENTATION_TELEMETRY_AGENT_PROXY_ENABLED", "const_name": "AgentProxyEnabled" }, + { + "env_var": "DD_INSTRUMENTATION_TELEMETRY_COMPRESSION_METHOD", + "const_name": "TelemetryCompressionMethod" + }, { "env_var": "DD_INSTRUMENTATION_TELEMETRY_ENABLED", "const_name": "Enabled" diff --git a/tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml b/tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml index cc854b701073..4655d6c99f96 100644 --- a/tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml +++ b/tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml @@ -16,6 +16,11 @@ DD_AGENT_HOST: | Default value is "localhost". +DD_AGENT_FEATURE_POLLING_ENABLED: | + Configuration key to disable polling the /info endpoint in the trace agent for feature discovery. + Default value is true (polling enabled). + + DD_API_KEY: | Configuration key for setting the API key, used by the Agent. @@ -427,6 +432,10 @@ DD_INSTRUMENTATION_TELEMETRY_AGENT_PROXY_ENABLED: | via agent proxy. Enabled by default. If disabled, or agent is not available, telemetry is sent to agentless endpoint, based on setting. +DD_INSTRUMENTATION_TELEMETRY_COMPRESSION_METHOD: | + Configuration key to allow telemetry compression. + + DD_INSTRUMENTATION_TELEMETRY_ENABLED: | Configuration key for enabling or disabling internal telemetry. Default value is true (enabled). diff --git a/tracer/src/Datadog.Trace/Configuration/supported-configurations.json b/tracer/src/Datadog.Trace/Configuration/supported-configurations.json index f383e10ccbfd..ba3888ef62f8 100644 --- a/tracer/src/Datadog.Trace/Configuration/supported-configurations.json +++ b/tracer/src/Datadog.Trace/Configuration/supported-configurations.json @@ -23,6 +23,11 @@ "A" ] }, + "DD_AGENT_FEATURE_POLLING_ENABLED": { + "version": [ + "A" + ] + }, "DD_API_KEY": { "version": [ "A" @@ -666,6 +671,12 @@ ], "product": "Telemetry" }, + "DD_INSTRUMENTATION_TELEMETRY_COMPRESSION_METHOD": { + "version": [ + "A" + ], + "product": "Telemetry" + }, "DD_INSTRUMENTATION_TELEMETRY_ENABLED": { "version": [ "A" diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs index cc280894a3d7..f6a78d67eac8 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -29,6 +29,12 @@ internal static class Telemetry /// public const string AgentlessEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENTLESS_ENABLED"; + /// + /// Configuration key to allow telemetry compression. + /// + /// + public const string TelemetryCompressionMethod = "DD_INSTRUMENTATION_TELEMETRY_COMPRESSION_METHOD"; + /// /// Configuration key for enabling or disabling internal telemetry. /// Default value is true (enabled). diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs index 658c3e54ddbc..39338fdfbb24 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -25,6 +25,13 @@ internal static partial class ConfigurationKeys2 /// public const string StatsComputationInterval = "_DD_TRACE_STATS_COMPUTATION_INTERVAL"; + /// + /// Configuration key to disable polling the /info endpoint in the trace agent for feature discovery. + /// Default value is true (polling enabled). + /// + /// + public const string AgentFeaturePollingEnabled = "DD_AGENT_FEATURE_POLLING_ENABLED"; + /// /// Configuration key for the Agent host where the Tracer can send traces. /// Overridden by if present. diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs index cc280894a3d7..f6a78d67eac8 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -29,6 +29,12 @@ internal static class Telemetry /// public const string AgentlessEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENTLESS_ENABLED"; + /// + /// Configuration key to allow telemetry compression. + /// + /// + public const string TelemetryCompressionMethod = "DD_INSTRUMENTATION_TELEMETRY_COMPRESSION_METHOD"; + /// /// Configuration key for enabling or disabling internal telemetry. /// Default value is true (enabled). diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs index 658c3e54ddbc..39338fdfbb24 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -25,6 +25,13 @@ internal static partial class ConfigurationKeys2 /// public const string StatsComputationInterval = "_DD_TRACE_STATS_COMPUTATION_INTERVAL"; + /// + /// Configuration key to disable polling the /info endpoint in the trace agent for feature discovery. + /// Default value is true (polling enabled). + /// + /// + public const string AgentFeaturePollingEnabled = "DD_AGENT_FEATURE_POLLING_ENABLED"; + /// /// Configuration key for the Agent host where the Tracer can send traces. /// Overridden by if present. diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs index cc280894a3d7..f6a78d67eac8 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -29,6 +29,12 @@ internal static class Telemetry /// public const string AgentlessEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENTLESS_ENABLED"; + /// + /// Configuration key to allow telemetry compression. + /// + /// + public const string TelemetryCompressionMethod = "DD_INSTRUMENTATION_TELEMETRY_COMPRESSION_METHOD"; + /// /// Configuration key for enabling or disabling internal telemetry. /// Default value is true (enabled). diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs index 658c3e54ddbc..39338fdfbb24 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -25,6 +25,13 @@ internal static partial class ConfigurationKeys2 /// public const string StatsComputationInterval = "_DD_TRACE_STATS_COMPUTATION_INTERVAL"; + /// + /// Configuration key to disable polling the /info endpoint in the trace agent for feature discovery. + /// Default value is true (polling enabled). + /// + /// + public const string AgentFeaturePollingEnabled = "DD_AGENT_FEATURE_POLLING_ENABLED"; + /// /// Configuration key for the Agent host where the Tracer can send traces. /// Overridden by if present. diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs index cc280894a3d7..f6a78d67eac8 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.Telemetry.g.cs @@ -29,6 +29,12 @@ internal static class Telemetry /// public const string AgentlessEnabled = "DD_INSTRUMENTATION_TELEMETRY_AGENTLESS_ENABLED"; + /// + /// Configuration key to allow telemetry compression. + /// + /// + public const string TelemetryCompressionMethod = "DD_INSTRUMENTATION_TELEMETRY_COMPRESSION_METHOD"; + /// /// Configuration key for enabling or disabling internal telemetry. /// Default value is true (enabled). diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs index 658c3e54ddbc..39338fdfbb24 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs @@ -25,6 +25,13 @@ internal static partial class ConfigurationKeys2 /// public const string StatsComputationInterval = "_DD_TRACE_STATS_COMPUTATION_INTERVAL"; + /// + /// Configuration key to disable polling the /info endpoint in the trace agent for feature discovery. + /// Default value is true (polling enabled). + /// + /// + public const string AgentFeaturePollingEnabled = "DD_AGENT_FEATURE_POLLING_ENABLED"; + /// /// Configuration key for the Agent host where the Tracer can send traces. /// Overridden by if present.