diff --git a/tracer/src/Datadog.Trace.BenchmarkDotNet/DatadogDiagnoser.cs b/tracer/src/Datadog.Trace.BenchmarkDotNet/DatadogDiagnoser.cs index 552778dd4a08..aec1a82bf3ce 100644 --- a/tracer/src/Datadog.Trace.BenchmarkDotNet/DatadogDiagnoser.cs +++ b/tracer/src/Datadog.Trace.BenchmarkDotNet/DatadogDiagnoser.cs @@ -216,12 +216,12 @@ private static void SetEnvironmentVariables(DiagnoserActionParameters parameters if (!environment.TryGetValue(ConfigurationKeys.Environment, out _)) { - environment[ConfigurationKeys.Environment] = tracer.Settings.EnvironmentInternal; + environment[ConfigurationKeys.Environment] = tracer.Settings.Environment; } if (!environment.TryGetValue(ConfigurationKeys.ServiceVersion, out _)) { - environment[ConfigurationKeys.ServiceVersion] = tracer.Settings.ServiceVersionInternal; + environment[ConfigurationKeys.ServiceVersion] = tracer.Settings.ServiceVersion; } const string ProfilerId = "{846F5F1C-F9AE-4B07-969E-05C26BC060D8}"; diff --git a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/NamingProblemDiagnostic.cs b/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/NamingProblemDiagnostic.cs deleted file mode 100644 index 6fb8a8b41671..000000000000 --- a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/NamingProblemDiagnostic.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -// 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 Datadog.Trace.SourceGenerators.Helpers; -using Microsoft.CodeAnalysis; - -namespace Datadog.Trace.SourceGenerators.PublicApi.Diagnostics; - -internal static class NamingProblemDiagnostic -{ - internal const string Id = "PA4"; - private const string Message = "Field names should start with '_' or end with 'Internal'"; - private const string Title = "Unknown naming"; - - public static DiagnosticInfo CreateInfo(SyntaxNode? currentNode) - => new( - new DiagnosticDescriptor( - Id, - Title, - Message, - category: SourceGenerators.Constants.Usage, - defaultSeverity: DiagnosticSeverity.Warning, - isEnabledByDefault: true), - currentNode?.GetLocation()); -} diff --git a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/OnlySupportsClassesDiagnostic.cs b/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/OnlySupportsClassesDiagnostic.cs deleted file mode 100644 index 7bcb95b8cb87..000000000000 --- a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/OnlySupportsClassesDiagnostic.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -// 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 Datadog.Trace.SourceGenerators.Helpers; -using Microsoft.CodeAnalysis; - -namespace Datadog.Trace.SourceGenerators.PublicApi.Diagnostics; - -internal static class OnlySupportsClassesDiagnostic -{ - internal const string Id = "PA1"; - private const string Message = "The GeneratePublicApiAttribute is only supported on classes"; - private const string Title = "Not a class"; - - public static DiagnosticInfo CreateInfo(SyntaxNode? currentNode) - => new( - new DiagnosticDescriptor( - Id, - Title, - Message, - category: SourceGenerators.Constants.Usage, - defaultSeverity: DiagnosticSeverity.Warning, - isEnabledByDefault: true), - currentNode?.GetLocation()); -} diff --git a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/PartialModifierIsRequiredDiagnostic.cs b/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/PartialModifierIsRequiredDiagnostic.cs deleted file mode 100644 index 744bbb80ef81..000000000000 --- a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/PartialModifierIsRequiredDiagnostic.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -// 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 Datadog.Trace.SourceGenerators.Helpers; -using Microsoft.CodeAnalysis; - -namespace Datadog.Trace.SourceGenerators.PublicApi.Diagnostics -{ - internal static class PartialModifierIsRequiredDiagnostic - { - internal const string Id = "PA4"; - private const string Message = "The partial modifier is required when using GeneratePublicApiAttribute"; - private const string Title = "Requires 'partial'"; - - public static DiagnosticInfo CreateInfo(SyntaxNode? currentNode) - => new( - new DiagnosticDescriptor( - Id, - Title, - Message, - category: SourceGenerators.Constants.Usage, - defaultSeverity: DiagnosticSeverity.Warning, - isEnabledByDefault: true), - currentNode?.GetLocation()); - } -} diff --git a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/SetterOnReadonlyFieldDiagnostic.cs b/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/SetterOnReadonlyFieldDiagnostic.cs deleted file mode 100644 index 4ee27daf9b26..000000000000 --- a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Diagnostics/SetterOnReadonlyFieldDiagnostic.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -// 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 Datadog.Trace.SourceGenerators.Helpers; -using Microsoft.CodeAnalysis; - -namespace Datadog.Trace.SourceGenerators.PublicApi.Diagnostics -{ - internal static class SetterOnReadonlyFieldDiagnostic - { - internal const string Id = "PA3"; - private const string Message = "You can't generate a setter for a readonly or const field"; - private const string Title = "Setter not supported"; - - public static DiagnosticInfo CreateInfo(SyntaxNode? currentNode) - => new( - new DiagnosticDescriptor( - Id, - Title, - Message, - category: SourceGenerators.Constants.Usage, - defaultSeverity: DiagnosticSeverity.Warning, - isEnabledByDefault: true), - currentNode?.GetLocation()); - } -} diff --git a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/PublicApiGenerator.cs b/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/PublicApiGenerator.cs deleted file mode 100644 index a37228b24390..000000000000 --- a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/PublicApiGenerator.cs +++ /dev/null @@ -1,315 +0,0 @@ -// -// 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.Collections.Immutable; -using System.Linq; -using System.Text; -using System.Threading; -using Datadog.Trace.SourceGenerators.Helpers; -using Datadog.Trace.SourceGenerators.PublicApi; -using Datadog.Trace.SourceGenerators.PublicApi.Diagnostics; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Text; - -/// -/// Source generator that creates instrumented public properties from fields decorated with [GeneratePublicApi]. -/// -[Generator] -public class PublicApiGenerator : IIncrementalGenerator -{ - private const string GeneratePublicApiAttribute = "Datadog.Trace.SourceGenerators.GeneratePublicApiAttribute"; - - /// - public void Initialize(IncrementalGeneratorInitializationContext context) - { - // Register the attribute source - context.RegisterPostInitializationOutput(ctx => ctx.AddSource("GeneratePublicApiAttribute.g.cs", Sources.Attributes)); - - // Expected syntax - // FieldDeclaration - // - VariableDeclaration - // - VariableDeclaration - var properties = - context.SyntaxProvider.ForAttributeWithMetadataName( - GeneratePublicApiAttribute, - static (node, _) => node is PropertyDeclarationSyntax, - static (context, ct) => GetPublicApiProperties(context, ct)) - .Where(static m => m is not null)! - .WithTrackingName(TrackingNames.PostTransform); - - context.ReportDiagnostics( - properties - .Where(static m => m.Errors.Count > 0) - .SelectMany(static (x, _) => x.Errors) - .WithTrackingName(TrackingNames.Diagnostics)); - - var allValidProperties = properties - .Where(static m => m.Value.IsValid) - .Select(static (x, _) => x.Value.PropertyTag) - .WithTrackingName(TrackingNames.ValidValues) - .Collect(); - - context.RegisterSourceOutput(allValidProperties, Execute); - } - - private static void Execute(SourceProductionContext context, ImmutableArray properties) - { - if (properties.IsDefaultOrEmpty) - { - // nothing to do yet - return; - } - - var sb = new StringBuilder(); - foreach (var partialClass in properties.GroupBy(x => (x.ClassName, x.Namespace, x.IsRecord))) - { - sb.Clear(); - - var (className, nameSpace, isRecord) = partialClass.Key; - var source = Sources.CreatePartialClass(sb, nameSpace, className, isRecord, partialClass); - context.AddSource($"{nameSpace}.{className}.g.cs", SourceText.From(source, Encoding.UTF8)); - } - } - - private static Result<(PublicApiProperty PropertyTag, bool IsValid)> GetPublicApiProperties( - GeneratorAttributeSyntaxContext ctx, CancellationToken ct) - { - var property = (PropertyDeclarationSyntax)ctx.TargetNode; - var classDec = ctx.TargetNode.Parent as TypeDeclarationSyntax; - - bool isReferenceType; - - if (classDec is RecordDeclarationSyntax recordDeclaration) - { - var keyword = recordDeclaration.ClassOrStructKeyword.Text; - isReferenceType = string.IsNullOrEmpty(keyword) || keyword == "class"; - } - else - { - isReferenceType = classDec is ClassDeclarationSyntax; - } - - if (classDec is null || !isReferenceType) - { - // only support properties on classes - return new Result<(PublicApiProperty PropertyTag, bool IsValid)>( - (default, false), - new EquatableArray(new[] { OnlySupportsClassesDiagnostic.CreateInfo(property) })); - } - - var propertySymbol = ctx.TargetSymbol as IPropertySymbol; - if (propertySymbol is null) - { - // something weird going on - return new Result<(PublicApiProperty PropertyTag, bool IsValid)>((default, false), default); - } - - List? diagnostics = null; - bool hasMisconfiguredInput = false; - int? publicApiGetter = null; - int? publicApiSetter = null; - string? obsoleteMessage = null; - - foreach (AttributeData attributeData in propertySymbol.GetAttributes()) - { - if ((attributeData.AttributeClass?.Name == "GeneratePublicApiAttribute" || - attributeData.AttributeClass?.Name == "GeneratePublicApi") - && attributeData.AttributeClass.ToDisplayString() == GeneratePublicApiAttribute) - { - var args = attributeData.ConstructorArguments; - if (args.Length == 0) - { - hasMisconfiguredInput = true; - break; - } - - foreach (TypedConstant typedConstant in attributeData.ConstructorArguments) - { - if (typedConstant.Kind == TypedConstantKind.Error) - { - hasMisconfiguredInput = true; - break; - } - } - - if (hasMisconfiguredInput) - { - break; - } - - publicApiGetter = args[0].Value as int?; - - if (args.Length > 1) - { - publicApiSetter = args[1].Value as int?; - if (propertySymbol.IsReadOnly && publicApiSetter.HasValue) - { - diagnostics ??= new List(); - diagnostics.Add(SetterOnReadonlyFieldDiagnostic.CreateInfo(attributeData.ApplicationSyntaxReference?.GetSyntax())); - hasMisconfiguredInput = true; - } - } - } - else if (attributeData.AttributeClass?.ToDisplayString() == "System.ObsoleteAttribute") - { - var args = attributeData.ConstructorArguments; - if (args.Length == 0) - { - obsoleteMessage = string.Empty; - continue; - } - - foreach (TypedConstant typedConstant in args) - { - if (typedConstant.Kind == TypedConstantKind.Error) - { - hasMisconfiguredInput = true; - break; - } - } - - obsoleteMessage = args[0].Value as string; - } - } - - var fieldName = propertySymbol.Name; - var propertyName = GetCalculatedPropertyName(fieldName); - if (string.IsNullOrEmpty(propertyName)) - { - diagnostics ??= new List(); - diagnostics.Add(NamingProblemDiagnostic.CreateInfo(property)); - hasMisconfiguredInput = true; - } - - if (!classDec.Modifiers.Any(x => x.IsKind(SyntaxKind.PartialKeyword))) - { - diagnostics ??= new List(); - diagnostics.Add(PartialModifierIsRequiredDiagnostic.CreateInfo(property)); - } - - var errors = diagnostics is { Count: > 0 } - ? new EquatableArray(diagnostics.ToArray()) - : default; - - if (hasMisconfiguredInput) - { - return new Result<(PublicApiProperty PropertyTag, bool IsValid)>((default, false), errors); - } - - var tag = new PublicApiProperty( - nameSpace: GetClassNamespace(classDec), - className: classDec.Identifier.ToString() + classDec.TypeParameterList, - isRecord: classDec is RecordDeclarationSyntax, - fieldName: fieldName, - propertyName: propertyName!, - publicApiGetter: publicApiGetter, - publicApiSetter: publicApiSetter, - returnType: propertySymbol.Type.ToDisplayString(), - leadingTrivia: property.GetLeadingTrivia().ToFullString(), - obsoleteMessage: obsoleteMessage); - - return new Result<(PublicApiProperty PropertyTag, bool IsValid)>((tag, true), errors); - } - - private static string? GetCalculatedPropertyName(string fieldName) - { - if (string.IsNullOrEmpty(fieldName)) - { - return null; - } - - if (fieldName[0] == '_') - { - return fieldName.Substring(1); - } - - if (fieldName.EndsWith("Internal")) - { - return fieldName.Substring(0, fieldName.Length - 8); - } - - return null; - } - - private static string GetClassNamespace(TypeDeclarationSyntax classDec) - { - string? nameSpace; - - // determine the namespace the class is declared in, if any - SyntaxNode? potentialNamespaceParent = classDec.Parent; - while (potentialNamespaceParent != null && - potentialNamespaceParent is not NamespaceDeclarationSyntax - && potentialNamespaceParent is not FileScopedNamespaceDeclarationSyntax) - { - potentialNamespaceParent = potentialNamespaceParent.Parent; - } - - if (potentialNamespaceParent is BaseNamespaceDeclarationSyntax namespaceParent) - { - nameSpace = namespaceParent.Name.ToString(); - while (true) - { - if (namespaceParent.Parent is NamespaceDeclarationSyntax parent) - { - namespaceParent = parent; - nameSpace = $"{namespaceParent.Name}.{nameSpace}"; - } - else - { - return nameSpace; - } - } - } - - return string.Empty; - } - - internal readonly struct PartialClasses - { - public readonly string Namespace; - public readonly string ClassName; - public readonly ImmutableArray TagProperties; - public readonly ImmutableArray MetricProperties; - - public PartialClasses(string nameSpace, string className, ImmutableArray tagProperties, ImmutableArray metricProperties) - { - Namespace = nameSpace; - ClassName = className; - TagProperties = tagProperties; - MetricProperties = metricProperties; - } - } - - internal readonly record struct PublicApiProperty - { - public readonly string Namespace; - public readonly string ClassName; - public readonly bool IsRecord; - public readonly string FieldName; - public readonly int? PublicApiGetter; - public readonly int? PublicApiSetter; - public readonly string PropertyName; - public readonly string ReturnType; - public readonly string LeadingTrivia; - public readonly string? ObsoleteMessage; - - public PublicApiProperty(string nameSpace, string className, bool isRecord, string fieldName, int? publicApiGetter, int? publicApiSetter, string propertyName, string returnType, string leadingTrivia, string? obsoleteMessage) - { - Namespace = nameSpace; - ClassName = className; - IsRecord = isRecord; - FieldName = fieldName; - PublicApiGetter = publicApiGetter; - PublicApiSetter = publicApiSetter; - PropertyName = propertyName; - ReturnType = returnType; - LeadingTrivia = leadingTrivia; - ObsoleteMessage = obsoleteMessage; - } - } -} diff --git a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Sources.cs b/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Sources.cs deleted file mode 100644 index a4f99f54d959..000000000000 --- a/tracer/src/Datadog.Trace.SourceGenerators/PublicApi/Sources.cs +++ /dev/null @@ -1,141 +0,0 @@ -// -// 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.Text; - -namespace Datadog.Trace.SourceGenerators.PublicApi; - -internal class Sources -{ - public const string Attributes = Constants.FileHeader + """ - namespace Datadog.Trace.SourceGenerators; - - /// - /// Used to generate a public property for a decorated field, - /// allowing adding aspect-oriented changes such as telemetry etc. - /// Any documentation added to the field is copied to the public API - /// - [System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple = false)] - internal class GeneratePublicApiAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// Adds a getter and a setter. - /// - /// Gets the name of the public API used for the property getter - /// Gets the name of the public API used for the property setter - public GeneratePublicApiAttribute( - Datadog.Trace.Telemetry.Metrics.PublicApiUsage getApiUsage, - Datadog.Trace.Telemetry.Metrics.PublicApiUsage setApiUsage) - { - Getter = getApiUsage; - Setter = setApiUsage; - } - - /// - /// Initializes a new instance of the class. - /// Adds a getter only. - /// - /// Gets the name of the public API used for the property getter. If null, no getter will be generated. - public GeneratePublicApiAttribute(Datadog.Trace.Telemetry.Metrics.PublicApiUsage getApiUsage) - { - Getter = getApiUsage; - } - - /// - /// Gets the name of the public API used for the getter - /// - public Datadog.Trace.Telemetry.Metrics.PublicApiUsage Getter { get; } - - /// - /// Gets the name of the public API used for the setter - /// - public Datadog.Trace.Telemetry.Metrics.PublicApiUsage? Setter { get; } - } - - /// - /// A marker attribute added to a public API to indicate it should only be - /// called by consumers. Used by analyzers to confirm we're not calling a public API method. - /// - [System.Diagnostics.Conditional("DEBUG")] - [System.AttributeUsage( - System.AttributeTargets.Field - | System.AttributeTargets.Property - | System.AttributeTargets.Method - | System.AttributeTargets.Constructor)] - internal sealed class PublicApiAttribute : System.Attribute - { - } - - """; - - public static string CreatePartialClass(StringBuilder sb, string nameSpace, string className, bool isRecord, IEnumerable properties) - { - var classKeyword = isRecord ? "record" : "class"; - - return Constants.FileHeader + $$""" - namespace {{nameSpace}}; - partial {{classKeyword}} {{className}} - {{{GetProperties(sb, properties)}} - } - """; - } - - private static string GetProperties(StringBuilder sb, IEnumerable properties) - { - foreach (var property in properties) - { - sb.AppendLine(); - // The leading trivia may have arbitrary whitespace, so the indentation might not be right here, but - // it's not worth worrying about IMO - if (!string.IsNullOrWhiteSpace(property.LeadingTrivia)) - { - sb.AppendLine(property.LeadingTrivia.TrimEnd()); - } - - if (property.ObsoleteMessage is { } obsolete) - { - sb.Append(" [System.Obsolete"); - if (obsolete != string.Empty) - { - sb.Append("(\"").Append(obsolete).Append("\")"); - } - - sb.Append(']').AppendLine(); - } - - sb.AppendLine( - $$""" - [Datadog.Trace.SourceGenerators.PublicApi] - public {{property.ReturnType}} {{property.PropertyName}} - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage){{property.PublicApiGetter}}); - return {{property.FieldName}}; - } - """); - if (property.PublicApiSetter.HasValue) - { - sb.AppendLine( - $$""" - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage){{property.PublicApiSetter}}); - {{property.FieldName}} = value; - } - """); - } - - sb.Append(" }"); - } - - return sb.ToString(); - } -} diff --git a/tracer/src/Datadog.Trace.Tools.Runner/Utils.cs b/tracer/src/Datadog.Trace.Tools.Runner/Utils.cs index ed2b683ba877..1a0064c0029c 100644 --- a/tracer/src/Datadog.Trace.Tools.Runner/Utils.cs +++ b/tracer/src/Datadog.Trace.Tools.Runner/Utils.cs @@ -409,9 +409,9 @@ public static string GetEnvironmentVariable(string key, string defaultValue = nu var tracerSettings = new TracerSettings(configurationSource, new ConfigurationTelemetry(), new OverrideErrorLog()); var settings = new ImmutableTracerSettings(tracerSettings, unusedParamNotToUsePublicApi: true); - Log.Debug("Creating DiscoveryService for: {AgentUriInternal}", settings.ExporterInternal.AgentUriInternal); + Log.Debug("Creating DiscoveryService for: {AgentUri}", settings.Exporter.AgentUri); var discoveryService = DiscoveryService.Create( - settings.ExporterInternal, + settings.Exporter, tcpTimeout: TimeSpan.FromSeconds(5), initialRetryDelayMs: 200, maxRetryDelayMs: 1000, @@ -425,7 +425,7 @@ public static string GetEnvironmentVariable(string key, string defaultValue = nu using (cts.Token.Register( () => { - WriteError($"Error connecting to the Datadog Agent at {tracerSettings.ExporterInternal.AgentUriInternal}."); + WriteError($"Error connecting to the Datadog Agent at {tracerSettings.Exporter.AgentUriInternal}."); tcs.TrySetResult(null); })) { diff --git a/tracer/src/Datadog.Trace.Tools.dd_dotnet/Checks/AgentConnectivityCheck.cs b/tracer/src/Datadog.Trace.Tools.dd_dotnet/Checks/AgentConnectivityCheck.cs index d29aaf4a0606..3925f421ac51 100644 --- a/tracer/src/Datadog.Trace.Tools.dd_dotnet/Checks/AgentConnectivityCheck.cs +++ b/tracer/src/Datadog.Trace.Tools.dd_dotnet/Checks/AgentConnectivityCheck.cs @@ -110,7 +110,7 @@ private static HttpClient CreateHttpClient(ExporterSettings settings) ConnectCallback = async (context, token) => { var socket = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.IP); - var endpoint = new UnixDomainSocketEndPoint(settings.TracesUnixDomainSocketPathInternal!); + var endpoint = new UnixDomainSocketEndPoint(settings.TracesUnixDomainSocketPath!); await socket.ConnectAsync(endpoint, token).ConfigureAwait(false); return new NetworkStream(socket, ownsSocket: false); } @@ -125,7 +125,7 @@ private static HttpClient CreateHttpClient(ExporterSettings settings) { ConnectCallback = async (context, token) => { - var pipeStream = new NamedPipeClientStream(".", settings.TracesPipeNameInternal!, PipeDirection.InOut, PipeOptions.Asynchronous); + var pipeStream = new NamedPipeClientStream(".", settings.TracesPipeName!, PipeDirection.InOut, PipeOptions.Asynchronous); await pipeStream.ConnectAsync(500, token).ConfigureAwait(false); return pipeStream; } @@ -147,7 +147,7 @@ private static void DisplayInfoMessage(ExporterSettings settings) if (settings.TracesTransport == TracesTransportType.UnixDomainSocket) { transport = "domain sockets"; - endpoint = settings.TracesUnixDomainSocketPathInternal ?? ""; + endpoint = settings.TracesUnixDomainSocketPath ?? ""; } else { diff --git a/tracer/src/Datadog.Trace.Tools.dd_dotnet/ExporterSettings.cs b/tracer/src/Datadog.Trace.Tools.dd_dotnet/ExporterSettings.cs index 2b0b2008fcd7..2917c86c17ef 100644 --- a/tracer/src/Datadog.Trace.Tools.dd_dotnet/ExporterSettings.cs +++ b/tracer/src/Datadog.Trace.Tools.dd_dotnet/ExporterSettings.cs @@ -60,9 +60,9 @@ internal enum TelemetryErrorCode internal TracesTransportType TracesTransport { get; private set; } - internal string? TracesPipeNameInternal { get; private set; } + internal string? TracesPipeName { get; private set; } - internal string? TracesUnixDomainSocketPathInternal { get; private set; } + internal string? TracesUnixDomainSocketPath { get; private set; } private static string? GetValue(IConfigurationSource? configuration, params string[] keys) { diff --git a/tracer/src/Datadog.Trace/Activity/OtlpHelpers.cs b/tracer/src/Datadog.Trace/Activity/OtlpHelpers.cs index 443135368ded..91ad56f5a3bf 100644 --- a/tracer/src/Datadog.Trace/Activity/OtlpHelpers.cs +++ b/tracer/src/Datadog.Trace/Activity/OtlpHelpers.cs @@ -62,7 +62,7 @@ private static void AgentConvertSpan(TInner activity, Span span) // Fixup "version" tag // Fallback to static instance if no tracer associated with the trace var tracer = span.Context.TraceContext?.Tracer ?? Tracer.Instance; - if (tracer.Settings.ServiceVersionInternal is null + if (tracer.Settings.ServiceVersion is null && span.GetTag("service.version") is { Length: > 1 } otelServiceVersion) { span.SetTag(Tags.Version, otelServiceVersion); diff --git a/tracer/src/Datadog.Trace/Agent/AgentTransportStrategy.cs b/tracer/src/Datadog.Trace/Agent/AgentTransportStrategy.cs index 556cda96440b..7ac448ef987f 100644 --- a/tracer/src/Datadog.Trace/Agent/AgentTransportStrategy.cs +++ b/tracer/src/Datadog.Trace/Agent/AgentTransportStrategy.cs @@ -31,7 +31,7 @@ internal static class AgentTransportStrategy /// A func that returns an for use /// with /// A func that returns the endpoint to send requests to for a given "base" endpoint. - /// The base endpoint will be for TCP requests and + /// The base endpoint will be for TCP requests and /// http://localhost/ for named pipes/UDS public static IApiRequestFactory Get( ImmutableExporterSettings settings, @@ -46,24 +46,24 @@ public static IApiRequestFactory Get( switch (strategy) { case TracesTransportType.WindowsNamedPipe: - Log.Information("Using " + nameof(NamedPipeClientStreamFactory) + " for {ProductName} transport, with pipe name {TracesPipeName} and timeout {TracesPipeTimeoutMs}ms.", productName, settings.TracesPipeNameInternal, settings.TracesPipeTimeoutMsInternal); + Log.Information("Using " + nameof(NamedPipeClientStreamFactory) + " for {ProductName} transport, with pipe name {TracesPipeName} and timeout {TracesPipeTimeoutMs}ms.", productName, settings.TracesPipeName, settings.TracesPipeTimeoutMs); return new HttpStreamRequestFactory( - new NamedPipeClientStreamFactory(settings.TracesPipeNameInternal, settings.TracesPipeTimeoutMsInternal), + new NamedPipeClientStreamFactory(settings.TracesPipeName, settings.TracesPipeTimeoutMs), new DatadogHttpClient(getHttpHeaderHelper()), getBaseEndpoint(Localhost)); case TracesTransportType.UnixDomainSocket: #if NET5_0_OR_GREATER - Log.Information("Using " + nameof(SocketHandlerRequestFactory) + " for {ProductName} transport, with UDS path {Path}.", productName, settings.TracesUnixDomainSocketPathInternal); + Log.Information("Using " + nameof(SocketHandlerRequestFactory) + " for {ProductName} transport, with UDS path {Path}.", productName, settings.TracesUnixDomainSocketPath); // use http://localhost as base endpoint return new SocketHandlerRequestFactory( - new UnixDomainSocketStreamFactory(settings.TracesUnixDomainSocketPathInternal), + new UnixDomainSocketStreamFactory(settings.TracesUnixDomainSocketPath), defaultAgentHeaders, getBaseEndpoint(Localhost)); #elif NETCOREAPP3_1_OR_GREATER - Log.Information("Using " + nameof(UnixDomainSocketStreamFactory) + " for {ProductName} transport, with Unix Domain Sockets path {TracesUnixDomainSocketPath} and timeout {TracesPipeTimeoutMs}ms.", productName, settings.TracesUnixDomainSocketPathInternal, settings.TracesPipeTimeoutMsInternal); + Log.Information("Using " + nameof(UnixDomainSocketStreamFactory) + " for {ProductName} transport, with Unix Domain Sockets path {TracesUnixDomainSocketPath} and timeout {TracesPipeTimeoutMs}ms.", productName, settings.TracesUnixDomainSocketPath, settings.TracesPipeTimeoutMs); return new HttpStreamRequestFactory( - new UnixDomainSocketStreamFactory(settings.TracesUnixDomainSocketPathInternal), + new UnixDomainSocketStreamFactory(settings.TracesUnixDomainSocketPath), new DatadogHttpClient(getHttpHeaderHelper()), getBaseEndpoint(Localhost)); #else @@ -74,10 +74,10 @@ public static IApiRequestFactory Get( default: #if NETCOREAPP Log.Information("Using " + nameof(HttpClientRequestFactory) + " for {ProductName} transport.", productName); - return new HttpClientRequestFactory(getBaseEndpoint(settings.AgentUriInternal), defaultAgentHeaders, timeout: tcpTimeout); + return new HttpClientRequestFactory(getBaseEndpoint(settings.AgentUri), defaultAgentHeaders, timeout: tcpTimeout); #else Log.Information("Using " + nameof(ApiWebRequestFactory) + " for {ProductName} transport.", productName); - return new ApiWebRequestFactory(getBaseEndpoint(settings.AgentUriInternal), defaultAgentHeaders, timeout: tcpTimeout); + return new ApiWebRequestFactory(getBaseEndpoint(settings.AgentUri), defaultAgentHeaders, timeout: tcpTimeout); #endif } } diff --git a/tracer/src/Datadog.Trace/Agent/MessagePack/SpanMessagePackFormatter.cs b/tracer/src/Datadog.Trace/Agent/MessagePack/SpanMessagePackFormatter.cs index 661562a8b707..2844781f9fa0 100644 --- a/tracer/src/Datadog.Trace/Agent/MessagePack/SpanMessagePackFormatter.cs +++ b/tracer/src/Datadog.Trace/Agent/MessagePack/SpanMessagePackFormatter.cs @@ -147,7 +147,7 @@ private int Serialize(ref byte[] bytes, int offset, in SpanModel spanModel) // It should be the number of members of the object to be serialized. var len = 8; - if (span.Context.ParentIdInternal > 0) + if (span.Context.ParentId > 0) { len++; } @@ -200,10 +200,10 @@ private int Serialize(ref byte[] bytes, int offset, in SpanModel spanModel) offset += MessagePackBinary.WriteStringBytes(ref bytes, offset, _durationBytes); offset += MessagePackBinary.WriteInt64(ref bytes, offset, span.Duration.ToNanoseconds()); - if (span.Context.ParentIdInternal > 0) + if (span.Context.ParentId > 0) { offset += MessagePackBinary.WriteStringBytes(ref bytes, offset, _parentIdBytes); - offset += MessagePackBinary.WriteUInt64(ref bytes, offset, (ulong)span.Context.ParentIdInternal); + offset += MessagePackBinary.WriteUInt64(ref bytes, offset, (ulong)span.Context.ParentId); } if (span.Error) @@ -420,7 +420,7 @@ private int WriteTags(ref byte[] bytes, int offset, in SpanModel model, ITagProc offset += MessagePackBinary.WriteStringBytes(ref bytes, offset, _languageValueBytes); // add "version" tags to all spans whose service name is the default service name - var serviceNameEqualsDefault = string.Equals(span.Context.ServiceNameInternal, model.TraceChunk.DefaultServiceName, StringComparison.OrdinalIgnoreCase); + var serviceNameEqualsDefault = string.Equals(span.Context.ServiceName, model.TraceChunk.DefaultServiceName, StringComparison.OrdinalIgnoreCase); if (serviceNameEqualsDefault) { var versionRawBytes = MessagePackStringCache.GetVersionBytes(model.TraceChunk.ServiceVersion); diff --git a/tracer/src/Datadog.Trace/Agent/MessagePack/TraceChunkModel.cs b/tracer/src/Datadog.Trace/Agent/MessagePack/TraceChunkModel.cs index 7903e1b39246..e47384bb0295 100644 --- a/tracer/src/Datadog.Trace/Agent/MessagePack/TraceChunkModel.cs +++ b/tracer/src/Datadog.Trace/Agent/MessagePack/TraceChunkModel.cs @@ -126,7 +126,7 @@ internal TraceChunkModel(in ArraySegment spans, Span? localRootSpan) // skip the HashSet to avoid initializing it yet, always iterate the array of spans. ContainsLocalRootSpan = IndexOf(localRootSpanId, spans.Count - 1) >= 0; - HasUpstreamService = localRootSpan.Context.ParentIdInternal is not (null or 0); + HasUpstreamService = localRootSpan.Context.ParentId is not (null or 0); } } @@ -143,7 +143,7 @@ public SpanModel GetSpanModel(int spanIndex) } var span = _spans.Array![_spans.Offset + spanIndex]; - var parentId = span.Context.ParentIdInternal ?? 0; + var parentId = span.Context.ParentId ?? 0; bool isLocalRoot = parentId is 0 || span.SpanId == LocalRootSpanId; bool isFirstSpan = spanIndex == 0; diff --git a/tracer/src/Datadog.Trace/Agent/StatsAggregator.cs b/tracer/src/Datadog.Trace/Agent/StatsAggregator.cs index 1055086568ca..a6e531a7af9d 100644 --- a/tracer/src/Datadog.Trace/Agent/StatsAggregator.cs +++ b/tracer/src/Datadog.Trace/Agent/StatsAggregator.cs @@ -65,8 +65,8 @@ internal StatsAggregator(IApi api, ImmutableTracerSettings settings, IDiscoveryS var header = new ClientStatsPayload { - Environment = settings.EnvironmentInternal, - Version = settings.ServiceVersionInternal, + Environment = settings.Environment, + Version = settings.ServiceVersion, HostName = HostMetadata.Instance.Hostname }; @@ -93,7 +93,7 @@ internal StatsAggregator(IApi api, ImmutableTracerSettings settings, IDiscoveryS public static IStatsAggregator Create(IApi api, ImmutableTracerSettings settings, IDiscoveryService discoveryService) { - return settings.StatsComputationEnabledInternal ? new StatsAggregator(api, settings, discoveryService) : new NullStatsAggregator(); + return settings.StatsComputationEnabled ? new StatsAggregator(api, settings, discoveryService) : new NullStatsAggregator(); } public Task DisposeAsync() diff --git a/tracer/src/Datadog.Trace/AspNet/TracingHttpModule.cs b/tracer/src/Datadog.Trace/AspNet/TracingHttpModule.cs index 90ac82691df8..df4f96fd4b6b 100644 --- a/tracer/src/Datadog.Trace/AspNet/TracingHttpModule.cs +++ b/tracer/src/Datadog.Trace/AspNet/TracingHttpModule.cs @@ -79,14 +79,14 @@ public void Dispose() internal static void AddHeaderTagsFromHttpResponse(HttpContext httpContext, Scope scope) { - if (!Tracer.Instance.Settings.HeaderTagsInternal.IsNullOrEmpty() && + if (!Tracer.Instance.Settings.HeaderTags.IsNullOrEmpty() && httpContext != null && HttpRuntime.UsingIntegratedPipeline && _canReadHttpResponseHeaders) { try { - scope.Span.SetHeaderTags(httpContext.Response.Headers.Wrap(), Tracer.Instance.Settings.HeaderTagsInternal, defaultTagPrefix: SpanContextPropagator.HttpResponseHeadersTagPrefix); + scope.Span.SetHeaderTags(httpContext.Response.Headers.Wrap(), Tracer.Instance.Settings.HeaderTags, defaultTagPrefix: SpanContextPropagator.HttpResponseHeadersTagPrefix); } catch (PlatformNotSupportedException ex) { @@ -158,7 +158,7 @@ private void OnBeginRequest(object sender, EventArgs eventArgs) scope.Span.DecorateWebServerSpan(resourceName: null, httpMethod, host, url, userAgent, tags); if (headers is not null) { - SpanContextPropagator.Instance.AddHeadersToSpanAsTags(scope.Span, headers.Value, tracer.Settings.HeaderTagsInternal, defaultTagPrefix: SpanContextPropagator.HttpRequestHeadersTagPrefix); + SpanContextPropagator.Instance.AddHeadersToSpanAsTags(scope.Span, headers.Value, tracer.Settings.HeaderTags, defaultTagPrefix: SpanContextPropagator.HttpRequestHeadersTagPrefix); } if (tracer.Settings.IpHeaderEnabled || Security.Instance.AppsecEnabled) diff --git a/tracer/src/Datadog.Trace/AsyncLocalScopeManager.cs b/tracer/src/Datadog.Trace/AsyncLocalScopeManager.cs index 8ed4d2405899..47833357cc0e 100644 --- a/tracer/src/Datadog.Trace/AsyncLocalScopeManager.cs +++ b/tracer/src/Datadog.Trace/AsyncLocalScopeManager.cs @@ -52,7 +52,7 @@ public void Close(Scope scope) Active = scope.Parent; // scope.Parent is null for distributed traces, so use scope.Span.Context.Parent - DistributedTracer.Instance.SetSpanContext(scope.Span.Context.ParentInternal as SpanContext); + DistributedTracer.Instance.SetSpanContext(scope.Span.Context.Parent as SpanContext); } private static AsyncLocal CreateScope() diff --git a/tracer/src/Datadog.Trace/Ci/Agent/ApmAgentWriter.cs b/tracer/src/Datadog.Trace/Ci/Agent/ApmAgentWriter.cs index a23907e712e1..48193f34c91b 100644 --- a/tracer/src/Datadog.Trace/Ci/Agent/ApmAgentWriter.cs +++ b/tracer/src/Datadog.Trace/Ci/Agent/ApmAgentWriter.cs @@ -27,8 +27,8 @@ internal class ApmAgentWriter : IEventWriter public ApmAgentWriter(ImmutableTracerSettings settings, Action> updateSampleRates, IDiscoveryService discoveryService, int maxBufferSize = DefaultMaxBufferSize) { - var partialFlushEnabled = settings.ExporterInternal.PartialFlushEnabledInternal; - var apiRequestFactory = TracesTransportStrategy.Get(settings.ExporterInternal); + var partialFlushEnabled = settings.Exporter.PartialFlushEnabled; + var apiRequestFactory = TracesTransportStrategy.Get(settings.Exporter); var api = new Api(apiRequestFactory, null, updateSampleRates, partialFlushEnabled); var statsAggregator = StatsAggregator.Create(api, settings, discoveryService); diff --git a/tracer/src/Datadog.Trace/Ci/Agent/MessagePack/CIEventMessagePackFormatter.cs b/tracer/src/Datadog.Trace/Ci/Agent/MessagePack/CIEventMessagePackFormatter.cs index 392cf31d9277..4496e31eb012 100644 --- a/tracer/src/Datadog.Trace/Ci/Agent/MessagePack/CIEventMessagePackFormatter.cs +++ b/tracer/src/Datadog.Trace/Ci/Agent/MessagePack/CIEventMessagePackFormatter.cs @@ -39,9 +39,9 @@ internal class CIEventMessagePackFormatter : EventMessagePackFormatter Process(ArraySegment trace) for (var i = trace.Offset + trace.Count - 1; i >= trace.Offset; i--) { var span = trace.Array![i]; - if (span.Context.ParentInternal is null && + if (span.Context.Parent is null && span.Type != SpanTypes.Test && span.Type != SpanTypes.Browser && span.Type != SpanTypes.TestSuite && diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/AspNetMvcIntegration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/AspNetMvcIntegration.cs index bbb8de8a0567..51b7910bbed5 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/AspNetMvcIntegration.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/AspNetMvcIntegration.cs @@ -164,7 +164,7 @@ internal static Scope CreateScope(ControllerContextStruct controllerContext) if (headers is not null) { - SpanContextPropagator.Instance.AddHeadersToSpanAsTags(span, headers.Value, tracer.Settings.HeaderTagsInternal, SpanContextPropagator.HttpRequestHeadersTagPrefix); + SpanContextPropagator.Instance.AddHeadersToSpanAsTags(span, headers.Value, tracer.Settings.HeaderTags, SpanContextPropagator.HttpRequestHeadersTagPrefix); } if (tracer.Settings.IpHeaderEnabled || Security.Instance.AppsecEnabled) diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/AspNetWebApi2Integration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/AspNetWebApi2Integration.cs index 28d65bc254f4..4c4810829f45 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/AspNetWebApi2Integration.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/AspNetWebApi2Integration.cs @@ -101,7 +101,7 @@ internal static Scope CreateScope(IHttpControllerContext controllerContext, out if (headersCollection is not null) { - SpanContextPropagator.Instance.AddHeadersToSpanAsTags(scope.Span, headersCollection.Value, tracer.Settings.HeaderTagsInternal, SpanContextPropagator.HttpRequestHeadersTagPrefix, request.Headers.UserAgent.ToString()); + SpanContextPropagator.Instance.AddHeadersToSpanAsTags(scope.Span, headersCollection.Value, tracer.Settings.HeaderTags, SpanContextPropagator.HttpRequestHeadersTagPrefix, request.Headers.UserAgent.ToString()); } tags.SetAnalyticsSampleRate(IntegrationId, tracer.Settings, enabledWithGlobalSetting: true); diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/HttpContextHelper.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/HttpContextHelper.cs index e831e3f573ff..0f5460ae0b08 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/HttpContextHelper.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/HttpContextHelper.cs @@ -19,11 +19,11 @@ internal static class HttpContextHelper internal static void AddHeaderTagsFromHttpResponse(System.Web.HttpContext httpContext, Scope scope) { - if (httpContext != null && HttpRuntime.UsingIntegratedPipeline && _canReadHttpResponseHeaders && !Tracer.Instance.Settings.HeaderTagsInternal.IsNullOrEmpty()) + if (httpContext != null && HttpRuntime.UsingIntegratedPipeline && _canReadHttpResponseHeaders && !Tracer.Instance.Settings.HeaderTags.IsNullOrEmpty()) { try { - scope.Span.SetHeaderTags(httpContext.Response.Headers.Wrap(), Tracer.Instance.Settings.HeaderTagsInternal, defaultTagPrefix: SpanContextPropagator.HttpResponseHeadersTagPrefix); + scope.Span.SetHeaderTags(httpContext.Response.Headers.Wrap(), Tracer.Instance.Settings.HeaderTags, defaultTagPrefix: SpanContextPropagator.HttpResponseHeadersTagPrefix); } catch (PlatformNotSupportedException ex) { diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcAspNetCoreServer/GrpcProtocolHelpersBuildHttpErrorResponseIntegration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcAspNetCoreServer/GrpcProtocolHelpersBuildHttpErrorResponseIntegration.cs index d4c0b939975f..d6fa373f5204 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcAspNetCoreServer/GrpcProtocolHelpersBuildHttpErrorResponseIntegration.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcAspNetCoreServer/GrpcProtocolHelpersBuildHttpErrorResponseIntegration.cs @@ -54,7 +54,7 @@ internal static CallTargetState OnMethodBegin(HttpResponse response, int httpSta // There won't be any response metadata, as interceptors haven't executed, but we can grab // the request metadata directly from the HttpRequest var request = response.HttpContext.Request; - span.SetHeaderTags(new HeadersCollectionAdapter(request.Headers), tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.RequestMetadataTagPrefix); + span.SetHeaderTags(new HeadersCollectionAdapter(request.Headers), tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.RequestMetadataTagPrefix); } return CallTargetState.GetDefault(); diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcAspNetCoreServer/HttpContextServerCallContextLogCallEndIntegration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcAspNetCoreServer/HttpContextServerCallContextLogCallEndIntegration.cs index d7488ef8986d..6ee6314d759d 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcAspNetCoreServer/HttpContextServerCallContextLogCallEndIntegration.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcAspNetCoreServer/HttpContextServerCallContextLogCallEndIntegration.cs @@ -49,12 +49,12 @@ internal static CallTargetState OnMethodBegin(TTarget instance) if (callContext.RequestHeaders is { Count: > 0 } requestMetadata) { - span.SetHeaderTags(new MetadataHeadersCollection(requestMetadata), tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.RequestMetadataTagPrefix); + span.SetHeaderTags(new MetadataHeadersCollection(requestMetadata), tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.RequestMetadataTagPrefix); } if (callContext.ResponseTrailers is { Count: > 0 } responseMetadata) { - span.SetHeaderTags(new MetadataHeadersCollection(responseMetadata), tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); + span.SetHeaderTags(new MetadataHeadersCollection(responseMetadata), tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); } } diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcNetClient/GrpcDotNetClientCommon.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcNetClient/GrpcDotNetClientCommon.cs index 26e164b54c66..70ecc1f31ca9 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcNetClient/GrpcDotNetClientCommon.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcDotNet/GrpcNetClient/GrpcDotNetClientCommon.cs @@ -62,7 +62,7 @@ internal static class GrpcDotNetClientCommon if (grpcCall.Options.Headers is { Count: > 0 }) { var metadata = new MetadataHeadersCollection(grpcCall.Options.Headers); - span.SetHeaderTags(metadata, tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.RequestMetadataTagPrefix); + span.SetHeaderTags(metadata, tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.RequestMetadataTagPrefix); } tracer.TracerManager.Telemetry.IntegrationGeneratedSpan(IntegrationId.Grpc); @@ -90,20 +90,20 @@ public static void RecordResponseMetadataAndStatus(Tracer tracer, TGr if (grpcCall.HttpResponse is { Headers: { } responseHeaders }) { var metadata = new HttpResponseHeadersCollection(responseHeaders); - span.SetHeaderTags(metadata, tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); + span.SetHeaderTags(metadata, tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); } // Note that this will be null if they haven't read the response body yet, but we can't force that on users if (grpcCall.TryGetTrailers(out var trailers) && trailers is { Count: > 0 }) { var metadata = new MetadataHeadersCollection(trailers); - span.SetHeaderTags(metadata, tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); + span.SetHeaderTags(metadata, tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); } else if (grpcCall.HttpResponse is { } httpResponse && httpResponse.DuckCast().TrailingHeaders is { } trailingHeaders) { var metadata = new HttpResponseHeadersCollection(trailingHeaders); - span.SetHeaderTags(metadata, tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); + span.SetHeaderTags(metadata, tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); } GrpcCommon.RecordFinalClientSpanStatus(Tracer.Instance, grpcStatusCode, errorMessage, ex); diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/AsyncCallHandleFinishedInstrumentation.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/AsyncCallHandleFinishedInstrumentation.cs index 67b530d6b0fc..cabc3a93fb63 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/AsyncCallHandleFinishedInstrumentation.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/AsyncCallHandleFinishedInstrumentation.cs @@ -46,14 +46,14 @@ internal static CallTargetState OnMethodBegin(TTarget instance { if (receivedStatus.Trailers is { Count: > 0 }) { - span.SetHeaderTags(new MetadataHeadersCollection(receivedStatus.Trailers), tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); + span.SetHeaderTags(new MetadataHeadersCollection(receivedStatus.Trailers), tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); } else if (asyncCall.ResponseHeadersAsync is { IsCompleted: true } task) { var metadata = task.DuckCast().Result; if (metadata?.Count > 0) { - span.SetHeaderTags(new MetadataHeadersCollection(metadata), tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); + span.SetHeaderTags(new MetadataHeadersCollection(metadata), tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); } } } diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/AsyncCallHandleUnaryResponseInstrumentation.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/AsyncCallHandleUnaryResponseInstrumentation.cs index 6924577f1e3c..c22270145b8d 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/AsyncCallHandleUnaryResponseInstrumentation.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/AsyncCallHandleUnaryResponseInstrumentation.cs @@ -53,14 +53,14 @@ internal static CallTargetState OnMethodBegin 0 }) { - span.SetHeaderTags(new MetadataHeadersCollection(receivedStatus.Trailers), tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); + span.SetHeaderTags(new MetadataHeadersCollection(receivedStatus.Trailers), tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); } else if (responseHeaders is not null) { var responseMetadata = responseHeaders.DuckCast(); if (responseMetadata.Count > 0) { - span.SetHeaderTags(new MetadataHeadersCollection(responseMetadata), tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); + span.SetHeaderTags(new MetadataHeadersCollection(responseMetadata), tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); } } } diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/GrpcLegacyClientCommon.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/GrpcLegacyClientCommon.cs index 3594b23d4eca..2b2c314c6b27 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/GrpcLegacyClientCommon.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Client/GrpcLegacyClientCommon.cs @@ -76,7 +76,7 @@ internal static class GrpcLegacyClientCommon span.Type = SpanTypes.Grpc; span.ResourceName = methodFullName; - span.SetHeaderTags(requestMetadataWrapper, tracer.Settings.GrpcTagsInternal, GrpcCommon.RequestMetadataTagPrefix); + span.SetHeaderTags(requestMetadataWrapper, tracer.Settings.GrpcTags, GrpcCommon.RequestMetadataTagPrefix); scope = tracer.ActivateSpan(span); if (setSamplingPriority && existingSpanContext?.SamplingPriority is { } samplingPriority) @@ -141,7 +141,7 @@ public static void InjectHeaders(Tracer tracer, TMethod m methodName: method.Name, serviceName: method.ServiceName, startTime: span.StartTime, - parentContext: span.Context.ParentInternal); + parentContext: span.Context.Parent); // Add the propagation headers var context = new PropagationContext(span.Context, Baggage.Current); @@ -194,7 +194,7 @@ private static void AddTemporaryHeaders(IMetadata metadata, int grpcType, string if (parentContext is not null) { metadata.Add(TemporaryHeaders.ParentId, parentContext.SpanId.ToString()); - var parentService = parentContext is SpanContext s ? s.ServiceNameInternal : parentContext.ServiceName; + var parentService = parentContext is SpanContext s ? s.ServiceName : parentContext.ServiceName; if (parentService is not null) { metadata.Add(TemporaryHeaders.ParentService, parentService); diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/AsyncCallServerSendInitialMetadataAsyncInstrumentation.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/AsyncCallServerSendInitialMetadataAsyncInstrumentation.cs index cc66ecedc5ec..036425d01e15 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/AsyncCallServerSendInitialMetadataAsyncInstrumentation.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/AsyncCallServerSendInitialMetadataAsyncInstrumentation.cs @@ -37,7 +37,7 @@ internal static CallTargetState OnMethodBegin(TTarget instan var metadata = headers.DuckCast(); if (metadata.Count > 0) { - span.SetHeaderTags(new MetadataHeadersCollection(metadata), tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); + span.SetHeaderTags(new MetadataHeadersCollection(metadata), tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); } } diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/AsyncCallServerSendStatusFromServerAsyncInstrumentation.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/AsyncCallServerSendStatusFromServerAsyncInstrumentation.cs index 1bddbc433b1f..fa5eb3d27d0e 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/AsyncCallServerSendStatusFromServerAsyncInstrumentation.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/AsyncCallServerSendStatusFromServerAsyncInstrumentation.cs @@ -43,7 +43,7 @@ internal static CallTargetState OnMethodBegin(); if (metadata.Count > 0) { - span.SetHeaderTags(new MetadataHeadersCollection(metadata), tracer.Settings.GrpcTagsInternal, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); + span.SetHeaderTags(new MetadataHeadersCollection(metadata), tracer.Settings.GrpcTags, defaultTagPrefix: GrpcCommon.ResponseMetadataTagPrefix); } } } diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/GrpcLegacyServerCommon.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/GrpcLegacyServerCommon.cs index 24c89a0d2c87..5bb0aa9e03d2 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/GrpcLegacyServerCommon.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Grpc/GrpcLegacy/Server/GrpcLegacyServerCommon.cs @@ -49,7 +49,7 @@ internal class GrpcLegacyServerCommon if (metadata?.Count > 0) { - span.SetHeaderTags(new MetadataHeadersCollection(metadata), tracer.Settings.GrpcTagsInternal, GrpcCommon.RequestMetadataTagPrefix); + span.SetHeaderTags(new MetadataHeadersCollection(metadata), tracer.Settings.GrpcTags, GrpcCommon.RequestMetadataTagPrefix); } tracer.TracerManager.Telemetry.IntegrationGeneratedSpan(IntegrationId.Grpc); diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/KafkaConsumerConsumeIntegration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/KafkaConsumerConsumeIntegration.cs index 98d734d58216..603458b81f85 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/KafkaConsumerConsumeIntegration.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/KafkaConsumerConsumeIntegration.cs @@ -74,7 +74,7 @@ internal static CallTargetReturn OnMethodEnd(TTar consumeResult.Offset, consumeResult.Message); - if (!Tracer.Instance.Settings.KafkaCreateConsumerScopeEnabledInternal) + if (!Tracer.Instance.Settings.KafkaCreateConsumerScopeEnabled) { // Close and dispose the scope immediately scope.DisposeWithException(exception); diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/KafkaHelper.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/KafkaHelper.cs index 0b5dcec22daf..6c77a345aa6c 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/KafkaHelper.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/KafkaHelper.cs @@ -247,7 +247,7 @@ private static long GetMessageSize(T message) pathwayContext); message?.Headers?.Remove(DataStreamsPropagationHeaders.TemporaryBase64PathwayContext); // remove eventual junk - if (!tracer.Settings.KafkaCreateConsumerScopeEnabledInternal && message?.Headers is not null && span.Context.PathwayContext != null) + if (!tracer.Settings.KafkaCreateConsumerScopeEnabled && message?.Headers is not null && span.Context.PathwayContext != null) { // write the _new_ pathway (the "consume" checkpoint that we just set above) to the headers as a way to pass its value to an eventual // call to SpanContextExtractor.Extract by a user who'd like to re-pair pathways after a batch consume. @@ -270,7 +270,7 @@ internal static void CloseConsumerScope(Tracer tracer) try { if (!tracer.Settings.IsIntegrationEnabled(KafkaConstants.IntegrationId) - || !tracer.Settings.KafkaCreateConsumerScopeEnabledInternal) + || !tracer.Settings.KafkaCreateConsumerScopeEnabled) { // integration disabled, skip this trace return; diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/LogsInjection/DatadogLoggingScope.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/LogsInjection/DatadogLoggingScope.cs index 21effb6ef4f2..cb7005aa4280 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/LogsInjection/DatadogLoggingScope.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/LogsInjection/DatadogLoggingScope.cs @@ -27,8 +27,8 @@ internal DatadogLoggingScope(Tracer tracer) { _tracer = tracer; _service = tracer.DefaultServiceName ?? string.Empty; - _env = tracer.Settings.EnvironmentInternal ?? string.Empty; - _version = tracer.Settings.ServiceVersionInternal ?? string.Empty; + _env = tracer.Settings.Environment ?? string.Empty; + _version = tracer.Settings.ServiceVersion ?? string.Empty; _cachedFormat = string.Format( CultureInfo.InvariantCulture, "dd_service:\"{0}\", dd_env:\"{1}\", dd_version:\"{2}\"", diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/LogsInjection/LoggerIntegrationCommon.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/LogsInjection/LoggerIntegrationCommon.cs index 80fb3921753a..33a78d311608 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/LogsInjection/LoggerIntegrationCommon.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/LogsInjection/LoggerIntegrationCommon.cs @@ -17,7 +17,7 @@ internal static class LoggerIntegrationCommon public static void AddScope(Tracer tracer, TAction callback, TState state) { - if (tracer.Settings.LogsInjectionEnabledInternal + if (tracer.Settings.LogsInjectionEnabled && tracer.Settings.IsIntegrationEnabled(IntegrationId) && callback is Action foreachCallback) { diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/Log4Net/LogsInjection/AppenderAttachedImplIntegration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/Log4Net/LogsInjection/AppenderAttachedImplIntegration.cs index 7359e2101109..22bf8f681797 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/Log4Net/LogsInjection/AppenderAttachedImplIntegration.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/Log4Net/LogsInjection/AppenderAttachedImplIntegration.cs @@ -38,12 +38,12 @@ internal static CallTargetState OnMethodBegin(TTarget in { var tracer = Tracer.Instance; - if (tracer.Settings.LogsInjectionEnabledInternal && + if (tracer.Settings.LogsInjectionEnabled && !loggingEvent.Properties.Contains(CorrelationIdentifier.ServiceKey)) { loggingEvent.Properties[CorrelationIdentifier.ServiceKey] = tracer.DefaultServiceName ?? string.Empty; - loggingEvent.Properties[CorrelationIdentifier.VersionKey] = tracer.Settings.ServiceVersionInternal ?? string.Empty; - loggingEvent.Properties[CorrelationIdentifier.EnvKey] = tracer.Settings.EnvironmentInternal ?? string.Empty; + loggingEvent.Properties[CorrelationIdentifier.VersionKey] = tracer.Settings.ServiceVersion ?? string.Empty; + loggingEvent.Properties[CorrelationIdentifier.EnvKey] = tracer.Settings.Environment ?? string.Empty; var spanContext = tracer.DistributedSpanContext; if (spanContext is not null) diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/DirectSubmission/LogFactoryBuildLoggerConfiguration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/DirectSubmission/LogFactoryBuildLoggerConfiguration.cs index 2fc6d2868e38..37df7c1d8884 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/DirectSubmission/LogFactoryBuildLoggerConfiguration.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/DirectSubmission/LogFactoryBuildLoggerConfiguration.cs @@ -36,7 +36,7 @@ internal static CallTargetState OnMethodBegin(TTarget { var tracerManager = TracerManager.Instance; - if (!tracerManager.Settings.LogsInjectionEnabledInternal && + if (!tracerManager.Settings.LogsInjectionEnabled && !tracerManager.DirectLogSubmission.Settings.IsIntegrationEnabled(IntegrationId.NLog)) { return CallTargetState.GetDefault(); @@ -55,7 +55,7 @@ internal static CallTargetState OnMethodBegin(TTarget // we don't want to do logs injection with our custom configuration that we create as there won't be any targets var alreadyAddedOurTarget = false; - if (tracerManager.Settings.LogsInjectionEnabledInternal) + if (tracerManager.Settings.LogsInjectionEnabled) { LogsInjectionHelper.ConfigureLogsInjectionForLoggingRules(loggingRules, out alreadyAddedOurTarget); } diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/DirectSubmission/LogFactoryGetConfigurationForLoggerInstrumentation.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/DirectSubmission/LogFactoryGetConfigurationForLoggerInstrumentation.cs index add2ef7a3b2b..b3798ee4bf17 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/DirectSubmission/LogFactoryGetConfigurationForLoggerInstrumentation.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/DirectSubmission/LogFactoryGetConfigurationForLoggerInstrumentation.cs @@ -56,7 +56,7 @@ public static CallTargetState OnMethodBegin(TTar { var tracerManager = TracerManager.Instance; - if (!tracerManager.Settings.LogsInjectionEnabledInternal && + if (!tracerManager.Settings.LogsInjectionEnabled && !tracerManager.DirectLogSubmission.Settings.IsIntegrationEnabled(IntegrationId.NLog)) { return CallTargetState.GetDefault(); @@ -84,7 +84,7 @@ public static CallTargetState OnMethodBegin(TTar } // we don't want to do logs injection with our custom configuration that we create as there won't be any targets - if (tracerManager.Settings.LogsInjectionEnabledInternal && configuration is not null) + if (tracerManager.Settings.LogsInjectionEnabled && configuration is not null) { LogsInjectionHelper.ConfigureLogsInjectionForLoggerConfiguration(configuration); } diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/DiagnosticContextHelper.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/DiagnosticContextHelper.cs index 3757b95a3dda..b8850510d691 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/DiagnosticContextHelper.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/DiagnosticContextHelper.cs @@ -133,8 +133,8 @@ private static IReadOnlyList> CreateEntriesList(Tra return new[] { new KeyValuePair(CorrelationIdentifier.ServiceKey, tracer.DefaultServiceName ?? string.Empty), - new KeyValuePair(CorrelationIdentifier.VersionKey, tracer.Settings.ServiceVersionInternal ?? string.Empty), - new KeyValuePair(CorrelationIdentifier.EnvKey, tracer.Settings.EnvironmentInternal ?? string.Empty), + new KeyValuePair(CorrelationIdentifier.VersionKey, tracer.Settings.ServiceVersion ?? string.Empty), + new KeyValuePair(CorrelationIdentifier.EnvKey, tracer.Settings.Environment ?? string.Empty), new KeyValuePair(CorrelationIdentifier.TraceIdKey, traceId), new KeyValuePair(CorrelationIdentifier.SpanIdKey, spanId) }; @@ -144,8 +144,8 @@ private static IReadOnlyList> CreateEntriesList(Tra return new[] { new KeyValuePair(CorrelationIdentifier.ServiceKey, tracer.DefaultServiceName ?? string.Empty), - new KeyValuePair(CorrelationIdentifier.VersionKey, tracer.Settings.ServiceVersionInternal ?? string.Empty), - new KeyValuePair(CorrelationIdentifier.EnvKey, tracer.Settings.EnvironmentInternal ?? string.Empty) + new KeyValuePair(CorrelationIdentifier.VersionKey, tracer.Settings.ServiceVersion ?? string.Empty), + new KeyValuePair(CorrelationIdentifier.EnvKey, tracer.Settings.Environment ?? string.Empty) }; } diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/LoggerImplWriteIntegrationV4.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/LoggerImplWriteIntegrationV4.cs index 7cc4855afd8b..fc6e4208d6b4 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/LoggerImplWriteIntegrationV4.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/LoggerImplWriteIntegrationV4.cs @@ -42,7 +42,7 @@ internal static CallTargetState OnMethodBegin.Mdlc is { } mdlc) { diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/LoggerImplWriteIntegrationV5.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/LoggerImplWriteIntegrationV5.cs index 3961b446ec4a..c447da566ec3 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/LoggerImplWriteIntegrationV5.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/NLog/LogsInjection/LoggerImplWriteIntegrationV5.cs @@ -42,7 +42,7 @@ internal static CallTargetState OnMethodBegin.ScopeContext is { } scopeContext) { diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/Serilog/LogsInjection/LoggerDispatchInstrumentation.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/Serilog/LogsInjection/LoggerDispatchInstrumentation.cs index e9fcffb80bcf..71385b26094a 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/Serilog/LogsInjection/LoggerDispatchInstrumentation.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/Serilog/LogsInjection/LoggerDispatchInstrumentation.cs @@ -48,12 +48,12 @@ internal static CallTargetState OnMethodBegin(TTarget instan { var tracer = Tracer.Instance; - if (tracer.Settings.LogsInjectionEnabledInternal) + if (tracer.Settings.LogsInjectionEnabled) { var dict = loggingEvent.DuckCast().Properties; AddPropertyIfAbsent(dict, CorrelationIdentifier.SerilogServiceKey, tracer.DefaultServiceName); - AddPropertyIfAbsent(dict, CorrelationIdentifier.SerilogVersionKey, tracer.Settings.ServiceVersionInternal); - AddPropertyIfAbsent(dict, CorrelationIdentifier.SerilogEnvKey, tracer.Settings.EnvironmentInternal); + AddPropertyIfAbsent(dict, CorrelationIdentifier.SerilogVersionKey, tracer.Settings.ServiceVersion); + AddPropertyIfAbsent(dict, CorrelationIdentifier.SerilogEnvKey, tracer.Settings.Environment); var spanContext = tracer.DistributedSpanContext; if (spanContext is not null) diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/ManualInstrumentation/Configuration/TracerSettings/PopulateDictionaryIntegration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/ManualInstrumentation/Configuration/TracerSettings/PopulateDictionaryIntegration.cs index 8dce34a5e1f8..78a3af46aca0 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/ManualInstrumentation/Configuration/TracerSettings/PopulateDictionaryIntegration.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/ManualInstrumentation/Configuration/TracerSettings/PopulateDictionaryIntegration.cs @@ -45,31 +45,31 @@ internal static CallTargetState OnMethodBegin(Dictionary values, Trace.Configuration.TracerSettings settings) { // record all the settings in the dictionary - values[TracerSettingKeyConstants.AgentUriKey] = settings.ExporterInternal.AgentUriInternal; + values[TracerSettingKeyConstants.AgentUriKey] = settings.Exporter.AgentUriInternal; #pragma warning disable CS0618 // Type or member is obsolete - values[TracerSettingKeyConstants.AnalyticsEnabledKey] = settings.AnalyticsEnabledInternal; + values[TracerSettingKeyConstants.AnalyticsEnabledKey] = settings.AnalyticsEnabled; #pragma warning restore CS0618 // Type or member is obsolete - values[TracerSettingKeyConstants.CustomSamplingRules] = settings.CustomSamplingRulesInternal; + values[TracerSettingKeyConstants.CustomSamplingRules] = settings.CustomSamplingRules; values[TracerSettingKeyConstants.DiagnosticSourceEnabledKey] = GlobalSettings.Instance.DiagnosticSourceEnabled; - values[TracerSettingKeyConstants.DisabledIntegrationNamesKey] = settings.DisabledIntegrationNamesInternal; - values[TracerSettingKeyConstants.EnvironmentKey] = settings.EnvironmentInternal; - values[TracerSettingKeyConstants.GlobalSamplingRateKey] = settings.GlobalSamplingRateInternal; - values[TracerSettingKeyConstants.GrpcTags] = settings.GrpcTagsInternal; - values[TracerSettingKeyConstants.HeaderTags] = settings.HeaderTagsInternal; - values[TracerSettingKeyConstants.KafkaCreateConsumerScopeEnabledKey] = settings.KafkaCreateConsumerScopeEnabledInternal; + values[TracerSettingKeyConstants.DisabledIntegrationNamesKey] = settings.DisabledIntegrationNames; + values[TracerSettingKeyConstants.EnvironmentKey] = settings.Environment; + values[TracerSettingKeyConstants.GlobalSamplingRateKey] = settings.GlobalSamplingRate; + values[TracerSettingKeyConstants.GrpcTags] = settings.GrpcTags; + values[TracerSettingKeyConstants.HeaderTags] = settings.HeaderTags; + values[TracerSettingKeyConstants.KafkaCreateConsumerScopeEnabledKey] = settings.KafkaCreateConsumerScopeEnabled; #pragma warning disable DD0002 // This API is only for public usage and should not be called internally (there's no internal version currently) values[TracerSettingKeyConstants.LogsInjectionEnabledKey] = settings.LogSubmissionSettings.LogsInjectionEnabled; #pragma warning restore DD0002 - values[TracerSettingKeyConstants.MaxTracesSubmittedPerSecondKey] = settings.MaxTracesSubmittedPerSecondInternal; - values[TracerSettingKeyConstants.ServiceNameKey] = settings.ServiceNameInternal; - values[TracerSettingKeyConstants.ServiceVersionKey] = settings.ServiceVersionInternal; - values[TracerSettingKeyConstants.StartupDiagnosticLogEnabledKey] = settings.StartupDiagnosticLogEnabledInternal; - values[TracerSettingKeyConstants.StatsComputationEnabledKey] = settings.StatsComputationEnabledInternal; - values[TracerSettingKeyConstants.TraceEnabledKey] = settings.TraceEnabledInternal; - values[TracerSettingKeyConstants.TracerMetricsEnabledKey] = settings.TracerMetricsEnabledInternal; + values[TracerSettingKeyConstants.MaxTracesSubmittedPerSecondKey] = settings.MaxTracesSubmittedPerSecond; + values[TracerSettingKeyConstants.ServiceNameKey] = settings.ServiceName; + values[TracerSettingKeyConstants.ServiceVersionKey] = settings.ServiceVersion; + values[TracerSettingKeyConstants.StartupDiagnosticLogEnabledKey] = settings.StartupDiagnosticLogEnabled; + values[TracerSettingKeyConstants.StatsComputationEnabledKey] = settings.StatsComputationEnabled; + values[TracerSettingKeyConstants.TraceEnabledKey] = settings.TraceEnabled; + values[TracerSettingKeyConstants.TracerMetricsEnabledKey] = settings.TracerMetricsEnabled; - values[TracerSettingKeyConstants.GlobalTagsKey] = settings.GlobalTagsInternal; - values[TracerSettingKeyConstants.IntegrationSettingsKey] = BuildIntegrationSettings(settings.IntegrationsInternal); + values[TracerSettingKeyConstants.GlobalTagsKey] = settings.GlobalTags; + values[TracerSettingKeyConstants.IntegrationSettingsKey] = BuildIntegrationSettings(settings.Integrations); } private static Dictionary? BuildIntegrationSettings(IntegrationSettingsCollection settings) @@ -82,7 +82,7 @@ internal static void PopulateSettings(Dictionary values, Trace. var results = new Dictionary(settings.Settings.Length, StringComparer.OrdinalIgnoreCase); foreach (var setting in settings.Settings) { - results[setting.IntegrationNameInternal] = IntegrationSettingsSerializationHelper.SerializeFromAutomatic(setting.EnabledInternal, setting.AnalyticsEnabledInternal, setting.AnalyticsSampleRateInternal); + results[setting.IntegrationName] = IntegrationSettingsSerializationHelper.SerializeFromAutomatic(setting.Enabled, setting.AnalyticsEnabled, setting.AnalyticsSampleRate); } return results; diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/ManualInstrumentation/Tracer/ConfigureIntegration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/ManualInstrumentation/Tracer/ConfigureIntegration.cs index 7f83ab3af100..efff5919f71c 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/ManualInstrumentation/Tracer/ConfigureIntegration.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/ManualInstrumentation/Tracer/ConfigureIntegration.cs @@ -64,7 +64,7 @@ internal static void UpdateSettings(Dictionary dictionary, Trac { case TracerSettingKeyConstants.AgentUriKey: TelemetryFactory.Metrics.Record(PublicApiUsage.ExporterSettings_AgentUri_Set); - tracerSettings.ExporterInternal.AgentUriInternal = (setting.Value as Uri)!; + tracerSettings.Exporter.AgentUriInternal = (setting.Value as Uri)!; break; case TracerSettingKeyConstants.AnalyticsEnabledKey: @@ -72,15 +72,15 @@ internal static void UpdateSettings(Dictionary dictionary, Trac var boolValue = (bool)setting.Value!; TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_AnalyticsEnabled_Set); tracerSettings.Telemetry.Record(ConfigurationKeys.GlobalAnalyticsEnabled, boolValue, ConfigurationOrigins.Code); - tracerSettings.AnalyticsEnabledInternal = boolValue; + tracerSettings.AnalyticsEnabled = boolValue; #pragma warning restore CS0618 // Type or member is obsolete break; case TracerSettingKeyConstants.CustomSamplingRules: var rulesAsString = setting.Value as string; - TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_CustomSamplingRules_Get); + TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_CustomSamplingRules_Set); tracerSettings.Telemetry.Record(ConfigurationKeys.CustomSamplingRules, rulesAsString, recordValue: true, ConfigurationOrigins.Code); - tracerSettings.CustomSamplingRulesInternal = rulesAsString; + tracerSettings.CustomSamplingRules = rulesAsString; break; case TracerSettingKeyConstants.DiagnosticSourceEnabledKey: @@ -93,28 +93,28 @@ internal static void UpdateSettings(Dictionary dictionary, Trac var hashset = setting.Value as HashSet; var stringified = hashset is null ? null : string.Join(",", hashset); tracerSettings.Telemetry.Record(ConfigurationKeys.DisabledIntegrations, stringified, recordValue: true, ConfigurationOrigins.Code); - tracerSettings.DisabledIntegrationNamesInternal = hashset ?? []; + tracerSettings.DisabledIntegrationNames = hashset ?? []; break; case TracerSettingKeyConstants.EnvironmentKey: var envAsString = setting.Value as string; TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_Environment_Set); tracerSettings.Telemetry.Record(ConfigurationKeys.Environment, envAsString, recordValue: true, ConfigurationOrigins.Code); - tracerSettings.EnvironmentInternal = envAsString; + tracerSettings.Environment = envAsString; break; case TracerSettingKeyConstants.GlobalSamplingRateKey: var rateAsDouble = setting.Value as double?; TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_GlobalSamplingRate_Set); tracerSettings.Telemetry.Record(ConfigurationKeys.GlobalSamplingRate, rateAsDouble, ConfigurationOrigins.Code); - tracerSettings.GlobalSamplingRateInternal = rateAsDouble; + tracerSettings.GlobalSamplingRate = rateAsDouble; break; case TracerSettingKeyConstants.GrpcTags: if (setting.Value is IDictionary { } grpcTags) { TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_GrpcTags_Set); - var currentTags = tracerSettings.GrpcTagsInternal; + var currentTags = tracerSettings.GrpcTags; // This is a replacement, so make sure to clear // Could also use a setter currentTags.Clear(); @@ -132,7 +132,7 @@ internal static void UpdateSettings(Dictionary dictionary, Trac if (setting.Value is IDictionary { } headerTags) { TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_HeaderTags_Set); - var currentTags = tracerSettings.HeaderTagsInternal; + var currentTags = tracerSettings.HeaderTags; // This is a replacement, so make sure to clear // Could also use a setter currentTags.Clear(); @@ -150,7 +150,7 @@ internal static void UpdateSettings(Dictionary dictionary, Trac if (setting.Value is IDictionary { } tags) { TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_GlobalTags_Set); - var globalTags = tracerSettings.GlobalTagsInternal; + var globalTags = tracerSettings.GlobalTags; // This is a replacement, so make sure to clear // Could also use a setter globalTags.Clear(); @@ -188,7 +188,7 @@ internal static void UpdateSettings(Dictionary dictionary, Trac var kafkaScopeEnabled = (bool)setting.Value!; TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_KafkaCreateConsumerScopeEnabled_Set); tracerSettings.Telemetry.Record(ConfigurationKeys.KafkaCreateConsumerScopeEnabled, kafkaScopeEnabled, ConfigurationOrigins.Code); - tracerSettings.KafkaCreateConsumerScopeEnabledInternal = kafkaScopeEnabled; + tracerSettings.KafkaCreateConsumerScopeEnabled = kafkaScopeEnabled; break; case TracerSettingKeyConstants.LogsInjectionEnabledKey: @@ -202,7 +202,7 @@ internal static void UpdateSettings(Dictionary dictionary, Trac var serviceName = setting.Value as string; TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_ServiceName_Set); tracerSettings.Telemetry.Record(ConfigurationKeys.ServiceName, serviceName, recordValue: true, ConfigurationOrigins.Code); - tracerSettings.ServiceNameInternal = serviceName; + tracerSettings.ServiceName = serviceName; break; case TracerSettingKeyConstants.ServiceNameMappingsKey: @@ -219,42 +219,42 @@ internal static void UpdateSettings(Dictionary dictionary, Trac TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_MaxTracesSubmittedPerSecond_Set); var tracesPerSecond = (int)setting.Value!; tracerSettings.Telemetry.Record(ConfigurationKeys.TraceRateLimit, tracesPerSecond, ConfigurationOrigins.Code); - tracerSettings.MaxTracesSubmittedPerSecondInternal = tracesPerSecond; + tracerSettings.MaxTracesSubmittedPerSecond = tracesPerSecond; break; case TracerSettingKeyConstants.ServiceVersionKey: TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_ServiceVersion_Set); var serviceVersion = setting.Value as string; tracerSettings.Telemetry.Record(ConfigurationKeys.ServiceVersion, serviceVersion, recordValue: true, ConfigurationOrigins.Code); - tracerSettings.ServiceVersionInternal = serviceVersion; + tracerSettings.ServiceVersion = serviceVersion; break; case TracerSettingKeyConstants.StartupDiagnosticLogEnabledKey: var logEnabled = (bool)setting.Value!; TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_StartupDiagnosticLogEnabled_Set); tracerSettings.Telemetry.Record(ConfigurationKeys.StartupDiagnosticLogEnabled, logEnabled, ConfigurationOrigins.Code); - tracerSettings.StartupDiagnosticLogEnabledInternal = logEnabled; + tracerSettings.StartupDiagnosticLogEnabled = logEnabled; break; case TracerSettingKeyConstants.StatsComputationEnabledKey: TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_StatsComputationEnabled_Set); var statsComputation = (bool)setting.Value!; tracerSettings.Telemetry.Record(ConfigurationKeys.StatsComputationEnabled, statsComputation, ConfigurationOrigins.Code); - tracerSettings.StatsComputationEnabledInternal = statsComputation; + tracerSettings.StatsComputationEnabled = statsComputation; break; case TracerSettingKeyConstants.TraceEnabledKey: TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_TraceEnabled_Set); var traceEnabled = (bool)setting.Value!; tracerSettings.Telemetry.Record(ConfigurationKeys.TraceEnabled, traceEnabled, ConfigurationOrigins.Code); - tracerSettings.TraceEnabledInternal = traceEnabled; + tracerSettings.TraceEnabled = traceEnabled; break; case TracerSettingKeyConstants.TracerMetricsEnabledKey: TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_TracerMetricsEnabled_Set); var metricsEnabled = (bool)setting.Value!; tracerSettings.Telemetry.Record(ConfigurationKeys.TracerMetricsEnabled, metricsEnabled, ConfigurationOrigins.Code); - tracerSettings.TracerMetricsEnabledInternal = metricsEnabled; + tracerSettings.TracerMetricsEnabled = metricsEnabled; break; case TracerSettingKeyConstants.IntegrationSettingsKey: @@ -294,7 +294,7 @@ static void UpdateIntegrations(TracerSettings settings, Dictionary values, Immuta { // record all the settings in the dictionary // This key is used to detect if the settings have been populated _at all_, so should always be sent - values[TracerSettingKeyConstants.AgentUriKey] = settings.ExporterInternal.AgentUriInternal; + values[TracerSettingKeyConstants.AgentUriKey] = settings.Exporter.AgentUri; #pragma warning disable CS0618 // Type or member is obsolete - values[TracerSettingKeyConstants.AnalyticsEnabledKey] = settings.AnalyticsEnabledInternal; + values[TracerSettingKeyConstants.AnalyticsEnabledKey] = settings.AnalyticsEnabled; #pragma warning restore CS0618 // Type or member is obsolete - values[TracerSettingKeyConstants.CustomSamplingRules] = settings.CustomSamplingRulesInternal; + values[TracerSettingKeyConstants.CustomSamplingRules] = settings.CustomSamplingRules; values[TracerSettingKeyConstants.DiagnosticSourceEnabledKey] = GlobalSettings.Instance.DiagnosticSourceEnabled; - values[TracerSettingKeyConstants.EnvironmentKey] = settings.EnvironmentInternal; - values[TracerSettingKeyConstants.GlobalSamplingRateKey] = settings.GlobalSamplingRateInternal; - values[TracerSettingKeyConstants.KafkaCreateConsumerScopeEnabledKey] = settings.KafkaCreateConsumerScopeEnabledInternal; + values[TracerSettingKeyConstants.EnvironmentKey] = settings.Environment; + values[TracerSettingKeyConstants.GlobalSamplingRateKey] = settings.GlobalSamplingRate; + values[TracerSettingKeyConstants.KafkaCreateConsumerScopeEnabledKey] = settings.KafkaCreateConsumerScopeEnabled; #pragma warning disable DD0002 // This API is only for public usage and should not be called internally (there's no internal version currently) - values[TracerSettingKeyConstants.LogsInjectionEnabledKey] = settings.LogsInjectionEnabledInternal; + values[TracerSettingKeyConstants.LogsInjectionEnabledKey] = settings.LogsInjectionEnabled; #pragma warning restore DD0002 - values[TracerSettingKeyConstants.MaxTracesSubmittedPerSecondKey] = settings.MaxTracesSubmittedPerSecondInternal; - values[TracerSettingKeyConstants.ServiceNameKey] = settings.ServiceNameInternal; - values[TracerSettingKeyConstants.ServiceVersionKey] = settings.ServiceVersionInternal; - values[TracerSettingKeyConstants.StartupDiagnosticLogEnabledKey] = settings.StartupDiagnosticLogEnabledInternal; - values[TracerSettingKeyConstants.StatsComputationEnabledKey] = settings.StatsComputationEnabledInternal; - values[TracerSettingKeyConstants.TraceEnabledKey] = settings.TraceEnabledInternal; - values[TracerSettingKeyConstants.TracerMetricsEnabledKey] = settings.TracerMetricsEnabledInternal; + values[TracerSettingKeyConstants.MaxTracesSubmittedPerSecondKey] = settings.MaxTracesSubmittedPerSecond; + values[TracerSettingKeyConstants.ServiceNameKey] = settings.ServiceName; + values[TracerSettingKeyConstants.ServiceVersionKey] = settings.ServiceVersion; + values[TracerSettingKeyConstants.StartupDiagnosticLogEnabledKey] = settings.StartupDiagnosticLogEnabled; + values[TracerSettingKeyConstants.StatsComputationEnabledKey] = settings.StatsComputationEnabled; + values[TracerSettingKeyConstants.TraceEnabledKey] = settings.TraceEnabled; + values[TracerSettingKeyConstants.TracerMetricsEnabledKey] = settings.TracerMetricsEnabled; // probably don't _have_ to copy these dictionaries, but playing it safe - values[TracerSettingKeyConstants.GlobalTagsKey] = new ConcurrentDictionary(settings.GlobalTagsInternal); - values[TracerSettingKeyConstants.GrpcTags] = new ConcurrentDictionary(settings.GrpcTagsInternal); - values[TracerSettingKeyConstants.HeaderTags] = new ConcurrentDictionary(settings.HeaderTagsInternal); + values[TracerSettingKeyConstants.GlobalTagsKey] = new ConcurrentDictionary(settings.GlobalTags); + values[TracerSettingKeyConstants.GrpcTags] = new ConcurrentDictionary(settings.GrpcTags); + values[TracerSettingKeyConstants.HeaderTags] = new ConcurrentDictionary(settings.HeaderTags); - values[TracerSettingKeyConstants.IntegrationSettingsKey] = BuildIntegrationSettings(settings.IntegrationsInternal); + values[TracerSettingKeyConstants.IntegrationSettingsKey] = BuildIntegrationSettings(settings.Integrations); } private static Dictionary? BuildIntegrationSettings(ImmutableIntegrationSettingsCollection settings) @@ -84,7 +84,7 @@ internal static void PopulateSettings(Dictionary values, Immuta var results = new Dictionary(settings.Settings.Length, StringComparer.OrdinalIgnoreCase); foreach (var setting in settings.Settings) { - results[setting.IntegrationNameInternal] = [setting.EnabledInternal, setting.AnalyticsEnabledInternal, setting.AnalyticsSampleRateInternal]; + results[setting.IntegrationName] = [setting.Enabled, setting.AnalyticsEnabled, setting.AnalyticsSampleRate]; } return results; diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Wcf/WcfCommon.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Wcf/WcfCommon.cs index 21f9cbffa026..5b70b706e1bc 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Wcf/WcfCommon.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Wcf/WcfCommon.cs @@ -173,7 +173,7 @@ internal class WcfCommon if (headers is not null) { var headerTagsProcessor = new SpanContextPropagator.SpanTagHeaderTagProcessor(span); - SpanContextPropagator.Instance.ExtractHeaderTags(ref headerTagsProcessor, headers.Value, tracer.Settings.HeaderTagsInternal!, SpanContextPropagator.HttpRequestHeadersTagPrefix); + SpanContextPropagator.Instance.ExtractHeaderTags(ref headerTagsProcessor, headers.Value, tracer.Settings.HeaderTags!, SpanContextPropagator.HttpRequestHeadersTagPrefix); } tags.SetAnalyticsSampleRate(IntegrationId, tracer.Settings, enabledWithGlobalSetting: true); diff --git a/tracer/src/Datadog.Trace/ClrProfiler/Instrumentation.cs b/tracer/src/Datadog.Trace/ClrProfiler/Instrumentation.cs index d1554a9e13e4..76a62935f1c5 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/Instrumentation.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/Instrumentation.cs @@ -362,7 +362,7 @@ private static void InitializeTracer(Stopwatch sw) { try { - DynamicInstrumentationHelper.ServiceName = TraceUtil.NormalizeTag(tracer.Settings.ServiceNameInternal ?? tracer.DefaultServiceName); + DynamicInstrumentationHelper.ServiceName = TraceUtil.NormalizeTag(tracer.Settings.ServiceName ?? tracer.DefaultServiceName); } catch (Exception e) { diff --git a/tracer/src/Datadog.Trace/Configuration/ExporterSettings.Shared.cs b/tracer/src/Datadog.Trace/Configuration/ExporterSettings.Shared.cs index a08c9a3dfc4c..86c66c3db6da 100644 --- a/tracer/src/Datadog.Trace/Configuration/ExporterSettings.Shared.cs +++ b/tracer/src/Datadog.Trace/Configuration/ExporterSettings.Shared.cs @@ -58,7 +58,7 @@ private void ConfigureTraceTransport(string? agentUri, string? tracesPipeName, s if (!string.IsNullOrWhiteSpace(tracesPipeName)) { TracesTransport = TracesTransportType.WindowsNamedPipe; - TracesPipeNameInternal = tracesPipeName; + TracesPipeName = tracesPipeName; RecordTraceTransport(nameof(TracesTransportType.WindowsNamedPipe), origin); // The Uri isn't needed anymore in that case, just populating it for retro compatibility. @@ -149,7 +149,7 @@ private void SetAgentUriAndTransport(Uri uri, ConfigurationOrigins origin) { #if NETCOREAPP3_1_OR_GREATER TracesTransport = TracesTransportType.UnixDomainSocket; - TracesUnixDomainSocketPathInternal = uri.PathAndQuery; + TracesUnixDomainSocketPath = uri.PathAndQuery; var absoluteUri = uri.AbsoluteUri.Replace(UnixDomainSocketPrefix, string.Empty); bool potentiallyInvalid = false; @@ -170,7 +170,7 @@ private void SetAgentUriAndTransport(Uri uri, ConfigurationOrigins origin) RecordTraceTransport(nameof(TracesTransportType.UnixDomainSocket), origin); _telemetry.Record( ConfigurationKeys.TracesUnixDomainSocketPath, - TracesUnixDomainSocketPathInternal, + TracesUnixDomainSocketPath, recordValue: true, origin, potentiallyInvalid ? TelemetryErrorCode.PotentiallyInvalidUdsPath : null); diff --git a/tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs b/tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs index 7453a0e40b37..8f88ad3300f5 100644 --- a/tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs +++ b/tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs @@ -116,12 +116,12 @@ internal ExporterSettings(IConfigurationSource? source, Func fileE ConfigureTraceTransport(traceAgentUrl, tracesPipeName, agentHost, agentPort, tracesUnixDomainSocketPath); ConfigureMetricsTransport(metricsUrl, traceAgentUrl, agentHost, dogStatsdPort, metricsPipeName, metricsUnixDomainSocketPath); - TracesPipeTimeoutMsInternal = config + TracesPipeTimeoutMs = config .WithKeys(ConfigurationKeys.TracesPipeTimeoutMs) .AsInt32(500, value => value > 0) .Value; - PartialFlushEnabledInternal = config.WithKeys(ConfigurationKeys.PartialFlushEnabled).AsBool(false); + PartialFlushEnabled = config.WithKeys(ConfigurationKeys.PartialFlushEnabled).AsBool(false); PartialFlushMinSpansInternal = config .WithKeys(ConfigurationKeys.PartialFlushMinSpans) .AsInt32(500, value => value > 0).Value; @@ -174,67 +174,45 @@ internal Uri AgentUriInternal /// Default is null. /// /// - [GeneratePublicApi( - PublicApiUsage.ExporterSettings_TracesPipeName_Get, - PublicApiUsage.ExporterSettings_TracesPipeName_Set)] - internal string? TracesPipeNameInternal { get; private set; } + public string? TracesPipeName { get; set; } /// /// Gets or sets the timeout in milliseconds for the windows named pipe requests. /// Default is 100. /// /// - [GeneratePublicApi( - PublicApiUsage.ExporterSettings_TracesPipeTimeoutMs_Get, - PublicApiUsage.ExporterSettings_TracesPipeTimeoutMs_Set)] - internal int TracesPipeTimeoutMsInternal { get; set; } + public int TracesPipeTimeoutMs { get; set; } /// /// Gets or sets the windows pipe name where the Tracer can send stats. /// Default is null. /// /// - [GeneratePublicApi( - PublicApiUsage.ExporterSettings_MetricsPipeName_Get, - PublicApiUsage.ExporterSettings_MetricsPipeName_Set)] - internal string? MetricsPipeNameInternal { get; private set; } + public string? MetricsPipeName { get; set; } /// /// Gets or sets the unix domain socket path where the Tracer can connect to the Agent. /// This parameter is deprecated and shall be removed. Consider using AgentUri instead /// - [GeneratePublicApi( - PublicApiUsage.ExporterSettings_TracesUnixDomainSocketPath_Get, - PublicApiUsage.ExporterSettings_TracesUnixDomainSocketPath_Set)] - internal string? TracesUnixDomainSocketPathInternal { get; private set; } + public string? TracesUnixDomainSocketPath { get; set; } /// /// Gets or sets the unix domain socket path where the Tracer can send stats. /// /// - [GeneratePublicApi( - PublicApiUsage.ExporterSettings_MetricsUnixDomainSocketPath_Get, - PublicApiUsage.ExporterSettings_MetricsUnixDomainSocketPath_Set)] - internal string? MetricsUnixDomainSocketPathInternal { get; private set; } + public string? MetricsUnixDomainSocketPath { get; set; } /// /// Gets or sets the port where the DogStatsd server is listening for connections. /// Default is 8125. /// /// - [GeneratePublicApi( - PublicApiUsage.ExporterSettings_DogStatsdPort_Get, - PublicApiUsage.ExporterSettings_DogStatsdPort_Set)] - internal int DogStatsdPortInternal { get; private set; } + public int DogStatsdPort { get; set; } /// /// Gets or sets a value indicating whether partial flush is enabled /// - [GeneratePublicApi( - PublicApiUsage.ExporterSettings_PartialFlushEnabled_Get, - PublicApiUsage.ExporterSettings_PartialFlushEnabled_Set)] - internal bool PartialFlushEnabledInternal { get; private set; } -#pragma warning restore SA1624 + public bool PartialFlushEnabled { get; set; } /// /// Gets or sets the minimum number of closed spans in a trace before it's partially flushed @@ -273,14 +251,13 @@ private set } } -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property /// - /// Gets or sets the transport used to send traces to the Agent. + /// Gets the transport used to send traces to the Agent. /// internal TracesTransportType TracesTransport { get; private set; } /// - /// Gets or sets the transport used to connect to the DogStatsD. + /// Gets the transport used to connect to the DogStatsD. /// Default is TransportStrategy.Tcp. /// internal MetricsTransportType MetricsTransport { get; private set; } @@ -289,7 +266,6 @@ private set /// Gets or sets the agent host to use when is /// internal string MetricsHostname { get; private set; } -#pragma warning restore SA1624 internal List ValidationWarnings { get; } @@ -346,7 +322,7 @@ private void ConfigureMetricsTransport(string? metricsUrl, string? traceAgentUrl else if (!string.IsNullOrWhiteSpace(metricsPipeName)) { MetricsTransport = MetricsTransportType.NamedPipe; - MetricsPipeNameInternal = metricsPipeName; + MetricsPipeName = metricsPipeName; } else if (metricsUnixDomainSocketPath != null) { @@ -377,7 +353,7 @@ private void ConfigureMetricsTransport(string? metricsUrl, string? traceAgentUrl } // set these values if they're not already set just to keep some things happy - DogStatsdPortInternal = DogStatsdPortInternal > 0 ? DogStatsdPortInternal : dogStatsdPortToUse; + DogStatsdPort = DogStatsdPort > 0 ? DogStatsdPort : dogStatsdPortToUse; MetricsHostname ??= DefaultDogstatsdHostname; return; @@ -399,7 +375,7 @@ bool TrySetMetricsUriAndTransport(string metricsUrl) var probablyValid = SetUds(uri.PathAndQuery, uri.OriginalString, absoluteUri, ConfigurationKeys.AgentUri); _telemetry.Record( ConfigurationKeys.MetricsUnixDomainSocketPath, - MetricsUnixDomainSocketPathInternal, + MetricsUnixDomainSocketPath, recordValue: true, origin, probablyValid ? null : TelemetryErrorCode.PotentiallyInvalidUdsPath); @@ -441,7 +417,7 @@ bool SetUds(string unixSocket, string original, string absoluteUri, string? sour { // Only called in the constructor; MetricsTransport = MetricsTransportType.UDS; - MetricsUnixDomainSocketPathInternal = unixSocket; + MetricsUnixDomainSocketPath = unixSocket; var probablyValid = true; if (source is not null && !Path.IsPathRooted(absoluteUri)) @@ -488,7 +464,7 @@ bool SetUdp(string hostname, string? hostnameSource, int port, string? portSourc // Agent port is set to zero in places like AAS where it's needed to prevent port conflict // The agent will fail to start if it can not bind a port, so we need to override 8125 to prevent port conflict // Port 0 means it will pick some random available port - DogStatsdPortInternal = port; + DogStatsdPort = port; if (portSource is not null && port < 0) { probablyValid = false; diff --git a/tracer/src/Datadog.Trace/Configuration/ImmutableExporterSettings.cs b/tracer/src/Datadog.Trace/Configuration/ImmutableExporterSettings.cs index 7c87511ca034..346086c90c1c 100644 --- a/tracer/src/Datadog.Trace/Configuration/ImmutableExporterSettings.cs +++ b/tracer/src/Datadog.Trace/Configuration/ImmutableExporterSettings.cs @@ -47,22 +47,22 @@ public ImmutableExporterSettings(ExporterSettings settings) internal ImmutableExporterSettings(ExporterSettings settings, bool unused) { // unused parameter is purely so we can avoid calling public APIs - AgentUriInternal = settings.AgentUriInternal; + AgentUri = settings.AgentUriInternal; TracesTransport = settings.TracesTransport; - TracesPipeNameInternal = settings.TracesPipeNameInternal; - TracesPipeTimeoutMsInternal = settings.TracesPipeTimeoutMsInternal; + TracesPipeName = settings.TracesPipeName; + TracesPipeTimeoutMs = settings.TracesPipeTimeoutMs; MetricsTransport = settings.MetricsTransport; MetricsHostname = settings.MetricsHostname; - MetricsPipeNameInternal = settings.MetricsPipeNameInternal; - DogStatsdPortInternal = settings.DogStatsdPortInternal; + MetricsPipeName = settings.MetricsPipeName; + DogStatsdPort = settings.DogStatsdPort; - TracesUnixDomainSocketPathInternal = settings.TracesUnixDomainSocketPathInternal; - MetricsUnixDomainSocketPathInternal = settings.MetricsUnixDomainSocketPathInternal; + TracesUnixDomainSocketPath = settings.TracesUnixDomainSocketPath; + MetricsUnixDomainSocketPath = settings.MetricsUnixDomainSocketPath; - PartialFlushEnabledInternal = settings.PartialFlushEnabledInternal; - PartialFlushMinSpansInternal = settings.PartialFlushMinSpansInternal; + PartialFlushEnabled = settings.PartialFlushEnabled; + PartialFlushMinSpans = settings.PartialFlushMinSpansInternal; ValidationWarnings = settings.ValidationWarnings.ToList(); } @@ -73,66 +73,57 @@ internal ImmutableExporterSettings(ExporterSettings settings, bool unused) /// /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableExporterSettings_AgentUri_Get)] - internal Uri AgentUriInternal { get; } + public Uri AgentUri { get; } /// /// Gets the windows pipe name where the Tracer can connect to the Agent. /// Default is null. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableExporterSettings_TracesPipeName_Get)] - internal string? TracesPipeNameInternal { get; } + public string? TracesPipeName { get; } /// /// Gets the timeout in milliseconds for the windows named pipe requests. /// Default is 100. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableExporterSettings_TracesPipeTimeoutMs_Get)] - internal int TracesPipeTimeoutMsInternal { get; } + public int TracesPipeTimeoutMs { get; } /// /// Gets the windows pipe name where the Tracer can send stats. /// Default is null. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableExporterSettings_MetricsPipeName_Get)] - internal string? MetricsPipeNameInternal { get; } + public string? MetricsPipeName { get; } /// /// Gets the port where the DogStatsd server is listening for connections. /// Default is 8125. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableExporterSettings_DogStatsdPort_Get)] - internal int DogStatsdPortInternal { get; } + public int DogStatsdPort { get; } /// /// Gets a value indicating whether partial flush is enabled /// - [GeneratePublicApi(PublicApiUsage.ImmutableExporterSettings_PartialFlushEnabled_Get)] - internal bool PartialFlushEnabledInternal { get; } + public bool PartialFlushEnabled { get; } /// /// Gets the minimum number of closed spans in a trace before it's partially flushed /// - [GeneratePublicApi(PublicApiUsage.ImmutableExporterSettings_PartialFlushMinSpans_Get)] - internal int PartialFlushMinSpansInternal { get; } + public int PartialFlushMinSpans { get; } /// /// Gets the unix domain socket path where the Tracer can connect to the Agent. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableExporterSettings_TracesUnixDomainSocketPath_Get)] - internal string? TracesUnixDomainSocketPathInternal { get; } + public string? TracesUnixDomainSocketPath { get; } /// /// Gets the unix domain socket path where the Tracer can send stats. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableExporterSettings_MetricsUnixDomainSocketPath_Get)] - internal string? MetricsUnixDomainSocketPathInternal { get; } + public string? MetricsUnixDomainSocketPath { get; } /// /// Gets the transport used to send traces to the Agent. diff --git a/tracer/src/Datadog.Trace/Configuration/ImmutableIntegrationSettings.cs b/tracer/src/Datadog.Trace/Configuration/ImmutableIntegrationSettings.cs index 3ee064adfea5..585143ec181c 100644 --- a/tracer/src/Datadog.Trace/Configuration/ImmutableIntegrationSettings.cs +++ b/tracer/src/Datadog.Trace/Configuration/ImmutableIntegrationSettings.cs @@ -20,45 +20,41 @@ public partial class ImmutableIntegrationSettings /// . /// /// The values to use. - /// If true forces the setting Enabled = false. Otherwise, uses + /// If true forces the setting Enabled = false. Otherwise, uses internal ImmutableIntegrationSettings(IntegrationSettings settings, bool isExplicitlyDisabled) { - IntegrationNameInternal = settings.IntegrationNameInternal; - EnabledInternal = isExplicitlyDisabled ? false : settings.EnabledInternal; - AnalyticsEnabledInternal = settings.AnalyticsEnabledInternal; - AnalyticsSampleRateInternal = settings.AnalyticsSampleRateInternal; + IntegrationName = settings.IntegrationName; + Enabled = isExplicitlyDisabled ? false : settings.Enabled; + AnalyticsEnabled = settings.AnalyticsEnabled; + AnalyticsSampleRate = settings.AnalyticsSampleRate; } internal ImmutableIntegrationSettings(string name) { - IntegrationNameInternal = name; + IntegrationName = name; } /// /// Gets the name of the integration. Used to retrieve integration-specific settings. /// - [GeneratePublicApi(PublicApiUsage.ImmutableIntegrationSettings_IntegrationName_Get)] - internal string IntegrationNameInternal { get; } + public string IntegrationName { get; } /// /// Gets a value indicating whether /// this integration is enabled. /// - [GeneratePublicApi(PublicApiUsage.ImmutableIntegrationSettings_Enabled_Get)] - internal bool? EnabledInternal { get; } + public bool? Enabled { get; } /// /// Gets a value indicating whether /// Analytics are enabled for this integration. /// - [GeneratePublicApi(PublicApiUsage.ImmutableIntegrationSettings_AnalyticsEnabled_Get)] - internal bool? AnalyticsEnabledInternal { get; } + public bool? AnalyticsEnabled { get; } /// /// Gets a value between 0 and 1 (inclusive) /// that determines the sampling rate for this integration. /// - [GeneratePublicApi(PublicApiUsage.ImmutableIntegrationSettings_AnalyticsSampleRate_Get)] - internal double AnalyticsSampleRateInternal { get; } + public double AnalyticsSampleRate { get; } } } diff --git a/tracer/src/Datadog.Trace/Configuration/ImmutableIntegrationSettingsCollection.cs b/tracer/src/Datadog.Trace/Configuration/ImmutableIntegrationSettingsCollection.cs index fd42168ed00c..81ff128ddfd2 100644 --- a/tracer/src/Datadog.Trace/Configuration/ImmutableIntegrationSettingsCollection.cs +++ b/tracer/src/Datadog.Trace/Configuration/ImmutableIntegrationSettingsCollection.cs @@ -71,7 +71,7 @@ private static ImmutableIntegrationSettings[] GetIntegrationSettingsById( for (int i = 0; i < integrations.Length; i++) { var existingSettings = allExistingSettings[i]; - var explicitlyDisabled = disabledIntegrationNames.Contains(existingSettings.IntegrationNameInternal); + var explicitlyDisabled = disabledIntegrationNames.Contains(existingSettings.IntegrationName); integrations[i] = new ImmutableIntegrationSettings(existingSettings, explicitlyDisabled); } diff --git a/tracer/src/Datadog.Trace/Configuration/ImmutableTracerSettings.cs b/tracer/src/Datadog.Trace/Configuration/ImmutableTracerSettings.cs index 096f258302cd..841afb7ee371 100644 --- a/tracer/src/Datadog.Trace/Configuration/ImmutableTracerSettings.cs +++ b/tracer/src/Datadog.Trace/Configuration/ImmutableTracerSettings.cs @@ -69,52 +69,52 @@ internal ImmutableTracerSettings(TracerSettings settings, bool unusedParamNotToU // unused parameter is purely so we can avoid calling public APIs // DD_SERVICE has precedence over DD_TAGS - ServiceNameInternal = GetExplicitSettingOrTag(settings.ServiceNameInternal, settings.GlobalTagsInternal, Tags.Service); + ServiceName = GetExplicitSettingOrTag(settings.ServiceName, settings.GlobalTags, Tags.Service); // DD_ENV has precedence over DD_TAGS - EnvironmentInternal = GetExplicitSettingOrTag(settings.EnvironmentInternal, settings.GlobalTagsInternal, Tags.Env); + Environment = GetExplicitSettingOrTag(settings.Environment, settings.GlobalTags, Tags.Env); // DD_VERSION has precedence over DD_TAGS - ServiceVersionInternal = GetExplicitSettingOrTag(settings.ServiceVersionInternal, settings.GlobalTagsInternal, Tags.Version); + ServiceVersion = GetExplicitSettingOrTag(settings.ServiceVersion, settings.GlobalTags, Tags.Version); // DD_GIT_COMMIT_SHA has precedence over DD_TAGS - GitCommitSha = GetExplicitSettingOrTag(settings.GitCommitSha, settings.GlobalTagsInternal, CommonTags.GitCommit); + GitCommitSha = GetExplicitSettingOrTag(settings.GitCommitSha, settings.GlobalTags, CommonTags.GitCommit); // DD_GIT_REPOSITORY_URL has precedence over DD_TAGS - GitRepositoryUrl = GetExplicitSettingOrTag(settings.GitRepositoryUrl, settings.GlobalTagsInternal, CommonTags.GitRepository); + GitRepositoryUrl = GetExplicitSettingOrTag(settings.GitRepositoryUrl, settings.GlobalTags, CommonTags.GitRepository); // create dictionary copy without "env", "version", "git.commit.sha" or "git.repository.url" tags // these value are used for "Environment" and "ServiceVersion", "GitCommitSha" and "GitRepositoryUrl" properties // or overriden with DD_ENV, DD_VERSION, DD_GIT_COMMIT_SHA and DD_GIT_REPOSITORY_URL respectively - var globalTags = settings.GlobalTagsInternal + var globalTags = settings.GlobalTags .Where(kvp => kvp.Key is not (Tags.Service or Tags.Env or Tags.Version or CommonTags.GitCommit or CommonTags.GitRepository)) .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); _globalTags = new ReadOnlyDictionary(globalTags); GitMetadataEnabled = settings.GitMetadataEnabled; - _traceEnabled = settings.TraceEnabledInternal; + _traceEnabled = settings.TraceEnabled; _appsecStandaloneEnabled = settings.AppsecStandaloneEnabledInternal; - ExporterInternal = new ImmutableExporterSettings(settings.ExporterInternal, true); + Exporter = new ImmutableExporterSettings(settings.Exporter, true); #pragma warning disable 618 // App analytics is deprecated, but still used - AnalyticsEnabledInternal = settings.AnalyticsEnabledInternal; + AnalyticsEnabled = settings.AnalyticsEnabled; #pragma warning restore 618 - MaxTracesSubmittedPerSecondInternal = settings.MaxTracesSubmittedPerSecondInternal; - _customSamplingRules = settings.CustomSamplingRulesInternal; + MaxTracesSubmittedPerSecond = settings.MaxTracesSubmittedPerSecond; + _customSamplingRules = settings.CustomSamplingRules; CustomSamplingRulesFormat = settings.CustomSamplingRulesFormat; SpanSamplingRules = settings.SpanSamplingRules; - _globalSamplingRate = settings.GlobalSamplingRateInternal; - IntegrationsInternal = new ImmutableIntegrationSettingsCollection(settings.IntegrationsInternal, settings.DisabledIntegrationNamesInternal); - _headerTags = new ReadOnlyDictionary(settings.HeaderTagsInternal); - GrpcTagsInternal = new ReadOnlyDictionary(settings.GrpcTagsInternal); + _globalSamplingRate = settings.GlobalSamplingRate; + Integrations = new ImmutableIntegrationSettingsCollection(settings.Integrations, settings.DisabledIntegrationNames); + _headerTags = new ReadOnlyDictionary(settings.HeaderTags); + GrpcTags = new ReadOnlyDictionary(settings.GrpcTags); IpHeader = settings.IpHeader; IpHeaderEnabled = settings.IpHeaderEnabled; - TracerMetricsEnabledInternal = settings.TracerMetricsEnabledInternal; - StatsComputationEnabledInternal = settings.StatsComputationEnabledInternal; + TracerMetricsEnabled = settings.TracerMetricsEnabled; + StatsComputationEnabled = settings.StatsComputationEnabled; StatsComputationInterval = settings.StatsComputationInterval; _runtimeMetricsEnabled = settings.RuntimeMetricsEnabled; - KafkaCreateConsumerScopeEnabledInternal = settings.KafkaCreateConsumerScopeEnabledInternal; - StartupDiagnosticLogEnabledInternal = settings.StartupDiagnosticLogEnabledInternal; + KafkaCreateConsumerScopeEnabled = settings.KafkaCreateConsumerScopeEnabled; + StartupDiagnosticLogEnabled = settings.StartupDiagnosticLogEnabled; HttpClientExcludedUrlSubstrings = settings.HttpClientExcludedUrlSubstrings; HttpServerErrorStatusCodes = settings.HttpServerErrorStatusCodes; HttpClientErrorStatusCodes = settings.HttpClientErrorStatusCodes; @@ -198,12 +198,12 @@ internal ImmutableTracerSettings(TracerSettings settings, bool unusedParamNotToU // through the IntegrationTelemetryCollector currently so record it here instead StringBuilder? sb = null; - foreach (var setting in IntegrationsInternal.Settings) + foreach (var setting in Integrations.Settings) { - if (setting.EnabledInternal == false) + if (setting.Enabled == false) { sb ??= StringBuilderCache.Acquire(); - sb.Append(setting.IntegrationNameInternal); + sb.Append(setting.IntegrationName); sb.Append(';'); } } @@ -216,22 +216,19 @@ internal ImmutableTracerSettings(TracerSettings settings, bool unusedParamNotToU /// Gets the default environment name applied to all spans. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_Environment_Get)] - internal string? EnvironmentInternal { get; } + public string? Environment { get; } /// /// Gets the service name applied to top-level spans and used to build derived service names. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_ServiceName_Get)] - internal string? ServiceNameInternal { get; } + public string? ServiceName { get; } /// /// Gets the version tag applied to all spans. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_ServiceVersion_Get)] - internal string? ServiceVersionInternal { get; } + public string? ServiceVersion { get; } internal ImmutableDynamicSettings DynamicSettings { get; init; } = new(); @@ -259,8 +256,7 @@ internal ImmutableTracerSettings(TracerSettings settings, bool unusedParamNotToU /// Default is true. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_TraceEnabled_Get)] - internal bool TraceEnabledInternal => DynamicSettings.TraceEnabled ?? _traceEnabled; + public bool TraceEnabled => DynamicSettings.TraceEnabled ?? _traceEnabled; /// /// Gets a value indicating whether Appsec standalone billing is enabled. @@ -272,8 +268,7 @@ internal ImmutableTracerSettings(TracerSettings settings, bool unusedParamNotToU /// /// Gets the exporter settings that dictate how the tracer exports data. /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_Exporter_Get)] - internal ImmutableExporterSettings ExporterInternal { get; } + public ImmutableExporterSettings Exporter { get; } #pragma warning disable CS1574 // AnalyticsEnabled is obsolete /// @@ -285,8 +280,7 @@ internal ImmutableTracerSettings(TracerSettings settings, bool unusedParamNotToU /// #pragma warning restore CS1574 [Obsolete(DeprecationMessages.AppAnalytics)] - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_AnalyticsEnabled_Get)] - internal bool AnalyticsEnabledInternal { get; } + public bool AnalyticsEnabled { get; } /// /// Gets a value indicating whether correlation identifiers are @@ -294,23 +288,20 @@ internal ImmutableTracerSettings(TracerSettings settings, bool unusedParamNotToU /// Default is false. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_LogsInjectionEnabled_Get)] - internal bool LogsInjectionEnabledInternal => DynamicSettings.LogsInjectionEnabled ?? _logsInjectionEnabled; + public bool LogsInjectionEnabled => DynamicSettings.LogsInjectionEnabled ?? _logsInjectionEnabled; /// /// Gets a value indicating the maximum number of traces set to AutoKeep (p1) per second. /// Default is 100. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_MaxTracesSubmittedPerSecond_Get)] - internal int MaxTracesSubmittedPerSecondInternal { get; } + public int MaxTracesSubmittedPerSecond { get; } /// /// Gets a value indicating custom sampling rules. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_CustomSamplingRules_Get)] - internal string? CustomSamplingRulesInternal => DynamicSettings.SamplingRules ?? _customSamplingRules; + public string? CustomSamplingRules => DynamicSettings.SamplingRules ?? _customSamplingRules; internal bool CustomSamplingRulesIsRemote => DynamicSettings.SamplingRules != null; @@ -330,34 +321,29 @@ internal ImmutableTracerSettings(TracerSettings settings, bool unusedParamNotToU /// Gets a value indicating a global rate for sampling. /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_GlobalSamplingRate_Get)] - internal double? GlobalSamplingRateInternal => DynamicSettings.GlobalSamplingRate ?? _globalSamplingRate; + public double? GlobalSamplingRate => DynamicSettings.GlobalSamplingRate ?? _globalSamplingRate; /// - /// Gets a collection of keyed by integration name. + /// Gets a collection of keyed by integration name. /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_Integrations_Get)] - internal ImmutableIntegrationSettingsCollection IntegrationsInternal { get; } + public ImmutableIntegrationSettingsCollection Integrations { get; } /// /// Gets the global tags, which are applied to all s. /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_GlobalTags_Get)] - internal IReadOnlyDictionary GlobalTagsInternal => DynamicSettings.GlobalTags ?? _globalTags; + public IReadOnlyDictionary GlobalTags => DynamicSettings.GlobalTags ?? _globalTags; /// /// Gets the map of header keys to tag names, which are applied to the root /// of incoming and outgoing requests. /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_HeaderTags_Get)] - internal IReadOnlyDictionary HeaderTagsInternal => DynamicSettings.HeaderTags ?? _headerTags; + public IReadOnlyDictionary HeaderTags => DynamicSettings.HeaderTags ?? _headerTags; /// /// Gets the map of metadata keys to tag names, which are applied to the root /// of incoming and outgoing GRPC requests. /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_GrpcTags_Get)] - internal IReadOnlyDictionary GrpcTagsInternal { get; } + public IReadOnlyDictionary GrpcTags { get; } /// /// Gets a custom request header configured to read the ip from. For backward compatibility, it fallbacks on DD_APPSEC_IPHEADER @@ -373,28 +359,24 @@ internal ImmutableTracerSettings(TracerSettings settings, bool unusedParamNotToU /// Gets a value indicating whether internal metrics /// are enabled and sent to DogStatsd. /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_TracerMetricsEnabled_Get)] - internal bool TracerMetricsEnabledInternal { get; } + public bool TracerMetricsEnabled { get; } /// /// Gets a value indicating whether stats are computed on the tracer side /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_StatsComputationEnabled_Get)] - internal bool StatsComputationEnabledInternal { get; } + public bool StatsComputationEnabled { get; } /// /// Gets a value indicating whether a span context should be created on exiting a successful Kafka /// Consumer.Consume() call, and closed on entering Consumer.Consume(). /// /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_KafkaCreateConsumerScopeEnabled_Get)] - internal bool KafkaCreateConsumerScopeEnabledInternal { get; } + public bool KafkaCreateConsumerScopeEnabled { get; } /// /// Gets a value indicating whether the diagnostic log at startup is enabled /// - [GeneratePublicApi(PublicApiUsage.ImmutableTracerSettings_StartupDiagnosticLogEnabled_Get)] - internal bool StartupDiagnosticLogEnabledInternal { get; } + public bool StartupDiagnosticLogEnabled { get; } /// /// Gets a value indicating whether runtime metrics @@ -711,9 +693,9 @@ internal bool IsErrorStatusCode(int statusCode, bool serverStatusCode) internal bool IsIntegrationEnabled(IntegrationId integration, bool defaultValue = true) { - if (TraceEnabledInternal && !_domainMetadata.ShouldAvoidAppDomain()) + if (TraceEnabled && !_domainMetadata.ShouldAvoidAppDomain()) { - return IntegrationsInternal[integration].EnabledInternal ?? defaultValue; + return Integrations[integration].Enabled ?? defaultValue; } return false; @@ -722,9 +704,9 @@ internal bool IsIntegrationEnabled(IntegrationId integration, bool defaultValue [Obsolete(DeprecationMessages.AppAnalytics)] internal double? GetIntegrationAnalyticsSampleRate(IntegrationId integration, bool enabledWithGlobalSetting) { - var integrationSettings = IntegrationsInternal[integration]; - var analyticsEnabled = integrationSettings.AnalyticsEnabledInternal ?? (enabledWithGlobalSetting && AnalyticsEnabledInternal); - return analyticsEnabled ? integrationSettings.AnalyticsSampleRateInternal : (double?)null; + var integrationSettings = Integrations[integration]; + var analyticsEnabled = integrationSettings.AnalyticsEnabled ?? (enabledWithGlobalSetting && AnalyticsEnabled); + return analyticsEnabled ? integrationSettings.AnalyticsSampleRate : (double?)null; } } } diff --git a/tracer/src/Datadog.Trace/Configuration/IntegrationSettings.cs b/tracer/src/Datadog.Trace/Configuration/IntegrationSettings.cs index 3ea9b75f7693..33a152eb42ef 100644 --- a/tracer/src/Datadog.Trace/Configuration/IntegrationSettings.cs +++ b/tracer/src/Datadog.Trace/Configuration/IntegrationSettings.cs @@ -38,7 +38,7 @@ internal IntegrationSettings(string integrationName, IConfigurationSource? sourc ThrowHelper.ThrowArgumentNullException(nameof(integrationName)); } - IntegrationNameInternal = integrationName; + IntegrationName = integrationName; if (source == null) { @@ -48,7 +48,7 @@ internal IntegrationSettings(string integrationName, IConfigurationSource? sourc // We don't record these in telemetry, because they're blocked anyway var config = new ConfigurationBuilder(source, NullConfigurationTelemetry.Instance); var upperName = integrationName.ToUpperInvariant(); - EnabledInternal = config + Enabled = config .WithKeys( string.Format(ConfigurationKeys.Integrations.Enabled, upperName), string.Format(ConfigurationKeys.Integrations.Enabled, integrationName), @@ -56,14 +56,14 @@ internal IntegrationSettings(string integrationName, IConfigurationSource? sourc .AsBool(); #pragma warning disable 618 // App analytics is deprecated, but still used - AnalyticsEnabledInternal = config + AnalyticsEnabled = config .WithKeys( string.Format(ConfigurationKeys.Integrations.AnalyticsEnabled, upperName), string.Format(ConfigurationKeys.Integrations.AnalyticsEnabled, integrationName), $"DD_{integrationName}_ANALYTICS_ENABLED") .AsBool(); - AnalyticsSampleRateInternal = config + AnalyticsSampleRate = config .WithKeys( string.Format(ConfigurationKeys.Integrations.AnalyticsSampleRate, upperName), string.Format(ConfigurationKeys.Integrations.AnalyticsSampleRate, integrationName), @@ -75,36 +75,24 @@ internal IntegrationSettings(string integrationName, IConfigurationSource? sourc /// /// Gets the name of the integration. Used to retrieve integration-specific settings. /// - [GeneratePublicApi(PublicApiUsage.IntegrationSettings_IntegrationName_Get)] - internal string IntegrationNameInternal { get; } + public string IntegrationName { get; } -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property /// /// Gets or sets a value indicating whether /// this integration is enabled. /// - [GeneratePublicApi( - PublicApiUsage.IntegrationSettings_Enabled_Get, - PublicApiUsage.IntegrationSettings_Enabled_Set)] - internal bool? EnabledInternal { get; set; } + public bool? Enabled { get; set; } /// /// Gets or sets a value indicating whether /// Analytics are enabled for this integration. /// - [GeneratePublicApi( - PublicApiUsage.IntegrationSettings_AnalyticsEnabled_Get, - PublicApiUsage.IntegrationSettings_AnalyticsEnabled_Set)] - internal bool? AnalyticsEnabledInternal { get; set; } + public bool? AnalyticsEnabled { get; set; } /// /// Gets or sets a value between 0 and 1 (inclusive) /// that determines the sampling rate for this integration. /// - [GeneratePublicApi( - PublicApiUsage.IntegrationSettings_AnalyticsSampleRate_Get, - PublicApiUsage.IntegrationSettings_AnalyticsSampleRate_Set)] - internal double AnalyticsSampleRateInternal { get; set; } -#pragma warning restore SA1624 + public double AnalyticsSampleRate { get; set; } } } diff --git a/tracer/src/Datadog.Trace/Configuration/TracerSettings.cs b/tracer/src/Datadog.Trace/Configuration/TracerSettings.cs index f71924bf3f10..abe4ad0e0fad 100644 --- a/tracer/src/Datadog.Trace/Configuration/TracerSettings.cs +++ b/tracer/src/Datadog.Trace/Configuration/TracerSettings.cs @@ -119,17 +119,17 @@ _ when x.ToBoolean() is { } boolean => boolean, }, validator: null); - EnvironmentInternal = config + Environment = config .WithKeys(ConfigurationKeys.Environment) .AsString(); var otelServiceName = config.WithKeys(ConfigurationKeys.OpenTelemetry.ServiceName).AsStringResult(); - ServiceNameInternal = config + ServiceName = config .WithKeys(ConfigurationKeys.ServiceName, "DD_SERVICE_NAME") .AsStringResult() .OverrideWith(in otelServiceName, ErrorLog); - ServiceVersionInternal = config + ServiceVersion = config .WithKeys(ConfigurationKeys.ServiceVersion) .AsString(); @@ -151,7 +151,7 @@ _ when x.ToBoolean() is { } boolean => boolean, value => string.Equals(value, "none", StringComparison.OrdinalIgnoreCase) ? ParsingResult.Success(result: false) : ParsingResult.Failure()); - TraceEnabledInternal = config + TraceEnabled = config .WithKeys(ConfigurationKeys.TraceEnabled) .AsBoolResult() .OverrideWith(in otelTraceEnabled, ErrorLog, defaultValue: true); @@ -162,7 +162,7 @@ _ when x.ToBoolean() is { } boolean => boolean, if (AzureAppServiceMetadata?.IsUnsafeToTrace == true) { - TraceEnabledInternal = false; + TraceEnabled = false; } var disabledIntegrationNames = config.WithKeys(ConfigurationKeys.DisabledIntegrations) @@ -170,19 +170,19 @@ _ when x.ToBoolean() is { } boolean => boolean, ?.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries) ?? Enumerable.Empty(); - DisabledIntegrationNamesInternal = new HashSet(disabledIntegrationNames, StringComparer.OrdinalIgnoreCase); + DisabledIntegrationNames = new HashSet(disabledIntegrationNames, StringComparer.OrdinalIgnoreCase); - IntegrationsInternal = new IntegrationSettingsCollection(source, unusedParamNotToUsePublicApi: false); + Integrations = new IntegrationSettingsCollection(source, unusedParamNotToUsePublicApi: false); - ExporterInternal = new ExporterSettings(source, _telemetry); + Exporter = new ExporterSettings(source, _telemetry); #pragma warning disable 618 // App analytics is deprecated, but still used - AnalyticsEnabledInternal = config.WithKeys(ConfigurationKeys.GlobalAnalyticsEnabled) + AnalyticsEnabled = config.WithKeys(ConfigurationKeys.GlobalAnalyticsEnabled) .AsBool(defaultValue: false); #pragma warning restore 618 #pragma warning disable 618 // this parameter has been replaced but may still be used - MaxTracesSubmittedPerSecondInternal = config + MaxTracesSubmittedPerSecond = config .WithKeys(ConfigurationKeys.TraceRateLimit, ConfigurationKeys.MaxTracesSubmittedPerSecond) #pragma warning restore 618 .AsInt32(defaultValue: 100); @@ -192,7 +192,7 @@ _ when x.ToBoolean() is { } boolean => boolean, .AsDictionaryResult(separator: '='); // backwards compatibility for names used in the past - GlobalTagsInternal = config + GlobalTags = config .WithKeys(ConfigurationKeys.GlobalTags, "DD_TRACE_GLOBAL_TAGS") .AsDictionaryResult() .OverrideWith( @@ -209,7 +209,7 @@ _ when x.ToBoolean() is { } boolean => boolean, .AsBool(defaultValue: true); // Filter out tags with empty keys or empty values, and trim whitespaces - HeaderTagsInternal = InitializeHeaderTags(config, ConfigurationKeys.HeaderTags, headerTagsNormalizationFixEnabled) + HeaderTags = InitializeHeaderTags(config, ConfigurationKeys.HeaderTags, headerTagsNormalizationFixEnabled) ?? new Dictionary(); PeerServiceTagsEnabled = config @@ -235,7 +235,7 @@ _ when x.ToBoolean() is { } boolean => boolean, ServiceNameMappings = InitializeServiceNameMappings(config, ConfigurationKeys.ServiceNameMappings); - TracerMetricsEnabledInternal = config + TracerMetricsEnabled = config .WithKeys(ConfigurationKeys.TracerMetricsEnabled) .AsBool(defaultValue: false); @@ -255,7 +255,7 @@ _ when x.ToBoolean() is { } boolean => boolean, // We should also be writing telemetry for OTEL_LOGS_EXPORTER similar to OTEL_METRICS_EXPORTER, but we don't have a corresponding Datadog config // When we do, we can insert that here - CustomSamplingRulesInternal = config.WithKeys(ConfigurationKeys.CustomSamplingRules).AsString(); + CustomSamplingRules = config.WithKeys(ConfigurationKeys.CustomSamplingRules).AsString(); CustomSamplingRulesFormat = config.WithKeys(ConfigurationKeys.CustomSamplingRulesFormat) .GetAs( @@ -286,17 +286,17 @@ _ when x.ToBoolean() is { } boolean => boolean, SpanSamplingRules = config.WithKeys(ConfigurationKeys.SpanSamplingRules).AsString(); - GlobalSamplingRateInternal = BuildSampleRate(ErrorLog, in config); + GlobalSamplingRate = BuildSampleRate(ErrorLog, in config); // We need to record a default value for configuration reporting // However, we need to keep GlobalSamplingRateInternal null because it changes the behavior of the tracer in subtle ways // (= we don't run the sampler at all if it's null, so it changes the tagging of the spans, and it's enforced by system tests) - if (GlobalSamplingRateInternal is null) + if (GlobalSamplingRate is null) { _telemetry.Record(ConfigurationKeys.GlobalSamplingRate, 1.0, ConfigurationOrigins.Default); } - StartupDiagnosticLogEnabledInternal = config.WithKeys(ConfigurationKeys.StartupDiagnosticLogEnabled).AsBool(defaultValue: true); + StartupDiagnosticLogEnabled = config.WithKeys(ConfigurationKeys.StartupDiagnosticLogEnabled).AsBool(defaultValue: true); var httpServerErrorStatusCodes = config #pragma warning disable 618 // This config key has been replaced but may still be used @@ -334,7 +334,7 @@ _ when x.ToBoolean() is { } boolean => boolean, .WithKeys(ConfigurationKeys.ExpandRouteTemplatesEnabled) .AsBool(defaultValue: !RouteTemplateResourceNamesEnabled); // disabled by default if route template resource names enabled - KafkaCreateConsumerScopeEnabledInternal = config + KafkaCreateConsumerScopeEnabled = config .WithKeys(ConfigurationKeys.KafkaCreateConsumerScopeEnabled) .AsBool(defaultValue: true); @@ -426,7 +426,7 @@ _ when x.ToBoolean() is { } boolean => boolean, // If Activity support is enabled, we shouldn't enable the W3C Trace Context propagators. if (!IsActivityListenerEnabled) { - DisabledIntegrationNamesInternal.Add(nameof(IntegrationId.OpenTelemetry)); + DisabledIntegrationNames.Add(nameof(IntegrationId.OpenTelemetry)); } LogSubmissionSettings = new DirectLogSubmissionSettings(source, _telemetry); @@ -436,7 +436,7 @@ _ when x.ToBoolean() is { } boolean => boolean, .AsString(string.Empty); // Filter out tags with empty keys or empty values, and trim whitespaces - GrpcTagsInternal = InitializeHeaderTags(config, ConfigurationKeys.GrpcTags, headerTagsNormalizationFixEnabled: true) + GrpcTags = InitializeHeaderTags(config, ConfigurationKeys.GrpcTags, headerTagsNormalizationFixEnabled: true) ?? new Dictionary(); OutgoingTagPropagationHeaderMaxLength = config @@ -462,13 +462,13 @@ _ when x.ToBoolean() is { } boolean => boolean, .WithKeys(ConfigurationKeys.RareSamplerEnabled) .AsBool(false); - StatsComputationEnabledInternal = config + StatsComputationEnabled = config .WithKeys(ConfigurationKeys.StatsComputationEnabled) .AsBool(defaultValue: (IsRunningInGCPFunctions || IsRunningMiniAgentInAzureFunctions)); - if (AppsecStandaloneEnabledInternal && StatsComputationEnabledInternal) + if (AppsecStandaloneEnabledInternal && StatsComputationEnabled) { telemetry.Record(ConfigurationKeys.StatsComputationEnabled, false, ConfigurationOrigins.Calculated); - StatsComputationEnabledInternal = false; + StatsComputationEnabled = false; } var urlSubstringSkips = config @@ -531,34 +531,23 @@ _ when x.ToBoolean() is { } boolean => boolean, internal IConfigurationTelemetry Telemetry => _telemetry; -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property /// /// Gets or sets the default environment name applied to all spans. /// /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_Environment_Get, - PublicApiUsage.TracerSettings_Environment_Set)] - internal string? EnvironmentInternal { get; set; } + public string? Environment { get; set; } /// /// Gets or sets the service name applied to top-level spans and used to build derived service names. /// /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_ServiceName_Get, - PublicApiUsage.TracerSettings_ServiceName_Set)] - internal string? ServiceNameInternal { get; set; } + public string? ServiceName { get; set; } /// /// Gets or sets the version tag applied to all spans. /// /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_ServiceVersion_Get, - PublicApiUsage.TracerSettings_ServiceVersion_Set)] - internal string? ServiceVersionInternal { get; set; } -#pragma warning restore SA1624 + public string? ServiceVersion { get; set; } /// /// Gets the application's git repository url. @@ -579,16 +568,12 @@ _ when x.ToBoolean() is { } boolean => boolean, /// internal bool GitMetadataEnabled { get; } -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property /// /// Gets or sets a value indicating whether tracing is enabled. /// Default is true. /// /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_TraceEnabled_Get, - PublicApiUsage.TracerSettings_TraceEnabled_Set)] - internal bool TraceEnabledInternal { get; set; } + public bool TraceEnabled { get; set; } /// /// Gets a value indicating whether Appsec standalone is enabled. @@ -608,18 +593,12 @@ _ when x.ToBoolean() is { } boolean => boolean, /// Gets or sets the names of disabled integrations. /// /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_DisabledIntegrationNames_Get, - PublicApiUsage.TracerSettings_DisabledIntegrationNames_Set)] - internal HashSet DisabledIntegrationNamesInternal { get; set; } + public HashSet DisabledIntegrationNames { get; set; } /// /// Gets or sets the transport settings that dictate how the tracer connects to the agent. /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_Exporter_Get, - PublicApiUsage.TracerSettings_Exporter_Set)] - internal ExporterSettings ExporterInternal { get; private set; } + public ExporterSettings Exporter { get; set; } /// /// Gets or sets a value indicating whether default Analytics are enabled. @@ -629,12 +608,7 @@ _ when x.ToBoolean() is { } boolean => boolean, /// /// [Obsolete(DeprecationMessages.AppAnalytics)] - [GeneratePublicApi( - PublicApiUsage.TracerSettings_AnalyticsEnabled_Get, - PublicApiUsage.TracerSettings_AnalyticsEnabled_Set)] -#pragma warning disable CS0618 // ConfigurationKeys.GlobalAnalyticsEnabled is obsolete -#pragma warning restore CS0618 // ConfigurationKeys.GlobalAnalyticsEnabled is obsolete - internal bool AnalyticsEnabledInternal { get; set; } + public bool AnalyticsEnabled { get; set; } /// /// Gets or sets a value indicating whether correlation identifiers are @@ -646,11 +620,7 @@ _ when x.ToBoolean() is { } boolean => boolean, [PublicApi] public bool LogsInjectionEnabled { - get - { - TelemetryFactory.Metrics.Record(PublicApiUsage.TracerSettings_LogsInjectionEnabled_Get); - return LogSubmissionSettings.LogsInjectionEnabled; - } + get => LogSubmissionSettings.LogsInjectionEnabled; set { @@ -665,21 +635,13 @@ public bool LogsInjectionEnabled /// Default is 100. /// /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_MaxTracesSubmittedPerSecond_Get, - PublicApiUsage.TracerSettings_MaxTracesSubmittedPerSecond_Set)] -#pragma warning disable CS0618 -#pragma warning restore CS0618 - internal int MaxTracesSubmittedPerSecondInternal { get; set; } + public int MaxTracesSubmittedPerSecond { get; set; } /// /// Gets or sets a value indicating custom sampling rules. /// /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_CustomSamplingRules_Get, - PublicApiUsage.TracerSettings_CustomSamplingRules_Set)] - internal string? CustomSamplingRulesInternal { get; set; } + public string? CustomSamplingRules { get; set; } /// /// Gets a value indicating the format for custom trace sampling rules ("regex" or "glob"). @@ -698,34 +660,23 @@ public bool LogsInjectionEnabled /// Gets or sets a value indicating a global rate for sampling. /// /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_GlobalSamplingRate_Get, - PublicApiUsage.TracerSettings_GlobalSamplingRate_Set)] - internal double? GlobalSamplingRateInternal { get; set; } + public double? GlobalSamplingRate { get; set; } /// /// Gets a collection of keyed by integration name. /// - [GeneratePublicApi(PublicApiUsage.TracerSettings_Integrations_Get)] - internal IntegrationSettingsCollection IntegrationsInternal { get; } + public IntegrationSettingsCollection Integrations { get; } /// /// Gets or sets the global tags, which are applied to all s. /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_GlobalTags_Get, - PublicApiUsage.TracerSettings_GlobalTags_Set)] - internal IDictionary GlobalTagsInternal { get; private set; } + public IDictionary GlobalTags { get; set; } /// /// Gets or sets the map of header keys to tag names, which are applied to the root /// of incoming and outgoing HTTP requests. /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_HeaderTags_Get, - PublicApiUsage.TracerSettings_HeaderTags_Set)] - internal IDictionary HeaderTagsInternal { get; set; } -#pragma warning restore SA1624 + public IDictionary HeaderTags { get; set; } /// /// Gets a custom request header configured to read the ip from. For backward compatibility, it fallbacks on DD_APPSEC_IPHEADER @@ -737,32 +688,22 @@ public bool LogsInjectionEnabled /// internal bool IpHeaderEnabled { get; } -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property /// /// Gets or sets the map of metadata keys to tag names, which are applied to the root /// of incoming and outgoing GRPC requests. /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_GrpcTags_Get, - PublicApiUsage.TracerSettings_GrpcTags_Set)] - internal IDictionary GrpcTagsInternal { get; private set; } + public IDictionary GrpcTags { get; set; } /// /// Gets or sets a value indicating whether internal metrics /// are enabled and sent to DogStatsd. /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_TracerMetricsEnabled_Get, - PublicApiUsage.TracerSettings_TracerMetricsEnabled_Set)] - internal bool TracerMetricsEnabledInternal { get; set; } + public bool TracerMetricsEnabled { get; set; } /// /// Gets or sets a value indicating whether stats are computed on the tracer side /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_StatsComputationEnabled_Get, - PublicApiUsage.TracerSettings_StatsComputationEnabled_Set)] - internal bool StatsComputationEnabledInternal { get; set; } + public bool StatsComputationEnabled { get; set; } /// /// Gets or sets a value indicating whether the use @@ -794,11 +735,7 @@ public bool DiagnosticSourceEnabled /// Consumer.Consume() call, and closed on entering Consumer.Consume(). /// /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_KafkaCreateConsumerScopeEnabled_Get, - PublicApiUsage.TracerSettings_KafkaCreateConsumerScopeEnabled_Set)] - internal bool KafkaCreateConsumerScopeEnabledInternal { get; set; } -#pragma warning restore SA1624 + public bool KafkaCreateConsumerScopeEnabled { get; set; } /// /// Gets a value indicating whether to enable the updated WCF instrumentation that delays execution @@ -842,15 +779,10 @@ public bool DiagnosticSourceEnabled /// internal double ObfuscationQueryStringRegexTimeout { get; } -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property /// /// Gets or sets a value indicating whether the diagnostic log at startup is enabled /// - [GeneratePublicApi( - PublicApiUsage.TracerSettings_StartupDiagnosticLogEnabled_Get, - PublicApiUsage.TracerSettings_StartupDiagnosticLogEnabled_Set)] - internal bool StartupDiagnosticLogEnabledInternal { get; set; } -#pragma warning restore SA1624 + public bool StartupDiagnosticLogEnabled { get; set; } /// /// Gets the time interval (in seconds) for sending stats @@ -1335,7 +1267,7 @@ internal void CollectTelemetry(IConfigurationTelemetry destination) // If ExporterSettings has been replaced, it will have its own telemetry collector // so we need to record those values too. - if (ExporterInternal.Telemetry is { } exporterTelemetry + if (Exporter.Telemetry is { } exporterTelemetry && exporterTelemetry != _telemetry) { exporterTelemetry.CopyTo(destination); diff --git a/tracer/src/Datadog.Trace/CorrelationIdentifier.cs b/tracer/src/Datadog.Trace/CorrelationIdentifier.cs index d18dcee370a7..fc117bc4fe38 100644 --- a/tracer/src/Datadog.Trace/CorrelationIdentifier.cs +++ b/tracer/src/Datadog.Trace/CorrelationIdentifier.cs @@ -47,7 +47,7 @@ public static string Version get { TelemetryFactory.Metrics.Record(PublicApiUsage.Correlation_Identifier_Version_Get); - return Tracer.Instance.Settings.ServiceVersionInternal ?? string.Empty; + return Tracer.Instance.Settings.ServiceVersion ?? string.Empty; } } @@ -59,7 +59,7 @@ public static string Env get { TelemetryFactory.Metrics.Record(PublicApiUsage.Correlation_Identifier_Env_Get); - return Tracer.Instance.Settings.EnvironmentInternal ?? string.Empty; + return Tracer.Instance.Settings.Environment ?? string.Empty; } } diff --git a/tracer/src/Datadog.Trace/DataStreamsMonitoring/Aggregation/DataStreamsMessagePackFormatter.cs b/tracer/src/Datadog.Trace/DataStreamsMonitoring/Aggregation/DataStreamsMessagePackFormatter.cs index 589855c31e0d..9a5718006574 100644 --- a/tracer/src/Datadog.Trace/DataStreamsMonitoring/Aggregation/DataStreamsMessagePackFormatter.cs +++ b/tracer/src/Datadog.Trace/DataStreamsMonitoring/Aggregation/DataStreamsMessagePackFormatter.cs @@ -48,7 +48,7 @@ internal class DataStreamsMessagePackFormatter private readonly byte[] _backlogValueBytes = StringEncoding.UTF8.GetBytes("Value"); public DataStreamsMessagePackFormatter(ImmutableTracerSettings tracerSettings, string defaultServiceName) - : this(tracerSettings.EnvironmentInternal, defaultServiceName) + : this(tracerSettings.Environment, defaultServiceName) { } diff --git a/tracer/src/Datadog.Trace/DataStreamsMonitoring/DataStreamsManager.cs b/tracer/src/Datadog.Trace/DataStreamsMonitoring/DataStreamsManager.cs index 84e8c1527695..2fb734623b12 100644 --- a/tracer/src/Datadog.Trace/DataStreamsMonitoring/DataStreamsManager.cs +++ b/tracer/src/Datadog.Trace/DataStreamsMonitoring/DataStreamsManager.cs @@ -51,7 +51,7 @@ public static DataStreamsManager Create( ? DataStreamsWriter.Create(settings, discoveryService, defaultServiceName) : null; - return new DataStreamsManager(settings.EnvironmentInternal, defaultServiceName, writer); + return new DataStreamsManager(settings.Environment, defaultServiceName, writer); } public async Task DisposeAsync() diff --git a/tracer/src/Datadog.Trace/DataStreamsMonitoring/DataStreamsWriter.cs b/tracer/src/Datadog.Trace/DataStreamsMonitoring/DataStreamsWriter.cs index 31c8f691ecce..5185f9ec9860 100644 --- a/tracer/src/Datadog.Trace/DataStreamsMonitoring/DataStreamsWriter.cs +++ b/tracer/src/Datadog.Trace/DataStreamsMonitoring/DataStreamsWriter.cs @@ -74,9 +74,9 @@ public static DataStreamsWriter Create( string defaultServiceName) => new DataStreamsWriter( new DataStreamsAggregator( - new DataStreamsMessagePackFormatter(settings.EnvironmentInternal, defaultServiceName), + new DataStreamsMessagePackFormatter(settings.Environment, defaultServiceName), bucketDurationMs: DataStreamsConstants.DefaultBucketDurationMs), - new DataStreamsApi(DataStreamsTransportStrategy.GetAgentIntakeFactory(settings.ExporterInternal)), + new DataStreamsApi(DataStreamsTransportStrategy.GetAgentIntakeFactory(settings.Exporter)), bucketDurationMs: DataStreamsConstants.DefaultBucketDurationMs, discoveryService); diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index a290cd4d78bf..3fbd09ad4576 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -45,7 +45,7 @@ propagationLevel is not (DbmPropagationLevel.Service or DbmPropagationLevel.Full } var propagatorStringBuilder = StringBuilderCache.Acquire(); - var dddbs = span.Context.ServiceNameInternal; + var dddbs = span.Context.ServiceName; propagatorStringBuilder.Append(DbmPrefix).Append(Uri.EscapeDataString(dddbs)).Append('\''); string? ddprs = null; diff --git a/tracer/src/Datadog.Trace/Debugger/ExceptionAutoInstrumentation/ExceptionDebugging.cs b/tracer/src/Datadog.Trace/Debugger/ExceptionAutoInstrumentation/ExceptionDebugging.cs index fc1a04ffd9ca..6391f0c60021 100644 --- a/tracer/src/Datadog.Trace/Debugger/ExceptionAutoInstrumentation/ExceptionDebugging.cs +++ b/tracer/src/Datadog.Trace/Debugger/ExceptionAutoInstrumentation/ExceptionDebugging.cs @@ -71,7 +71,7 @@ private static void InitSnapshotsSink() var snapshotSlicer = SnapshotSlicer.Create(debuggerSettings); _snapshotSink = SnapshotSink.Create(debuggerSettings, snapshotSlicer); var apiFactory = AgentTransportStrategy.Get( - tracer.Settings.ExporterInternal, + tracer.Settings.Exporter, productName: "debugger", tcpTimeout: TimeSpan.FromSeconds(15), AgentHttpHeaderNames.MinimalHeaders, diff --git a/tracer/src/Datadog.Trace/Debugger/LiveDebuggerFactory.cs b/tracer/src/Datadog.Trace/Debugger/LiveDebuggerFactory.cs index 204cc8351d15..05718044b64d 100644 --- a/tracer/src/Datadog.Trace/Debugger/LiveDebuggerFactory.cs +++ b/tracer/src/Datadog.Trace/Debugger/LiveDebuggerFactory.cs @@ -46,7 +46,7 @@ public static LiveDebugger Create(IDiscoveryService discoveryService, IRcmSubscr var diagnosticsUploader = CreateDiagnosticsUploader(discoveryService, debuggerSettings, gitMetadataTagsProvider, GetApiFactory(tracerSettings, true), diagnosticsSink); var lineProbeResolver = LineProbeResolver.Create(debuggerSettings.ThirdPartyDetectionExcludes, debuggerSettings.ThirdPartyDetectionIncludes); var probeStatusPoller = ProbeStatusPoller.Create(diagnosticsSink, debuggerSettings); - var configurationUpdater = ConfigurationUpdater.Create(tracerSettings.EnvironmentInternal, tracerSettings.ServiceVersionInternal); + var configurationUpdater = ConfigurationUpdater.Create(tracerSettings.Environment, tracerSettings.ServiceVersion); var symbolsUploader = CreateSymbolsUploader(discoveryService, remoteConfigurationManager, tracerSettings, serviceName, debuggerSettings, gitMetadataTagsProvider); var statsd = GetDogStatsd(tracerSettings, serviceName); @@ -70,7 +70,7 @@ private static IDogStatsd GetDogStatsd(ImmutableTracerSettings tracerSettings, s { IDogStatsd statsd; if (FrameworkDescription.Instance.IsWindows() - && tracerSettings.ExporterInternal.MetricsTransport == TransportType.UDS) + && tracerSettings.Exporter.MetricsTransport == TransportType.UDS) { Log.Information("Metric probes are not supported on Windows when transport type is UDS"); statsd = new NoOpStatsd(); @@ -113,7 +113,7 @@ private static IDebuggerUploader CreateSymbolsUploader(IDiscoveryService discove private static IApiRequestFactory GetApiFactory(ImmutableTracerSettings tracerSettings, bool isMultipart) { return AgentTransportStrategy.Get( - tracerSettings.ExporterInternal, + tracerSettings.Exporter, productName: "debugger", tcpTimeout: TimeSpan.FromSeconds(15), AgentHttpHeaderNames.MinimalHeaders, diff --git a/tracer/src/Datadog.Trace/Debugger/Symbols/SymbolsUploader.cs b/tracer/src/Datadog.Trace/Debugger/Symbols/SymbolsUploader.cs index d57f2fae87ea..28e63ec0c79a 100644 --- a/tracer/src/Datadog.Trace/Debugger/Symbols/SymbolsUploader.cs +++ b/tracer/src/Datadog.Trace/Debugger/Symbols/SymbolsUploader.cs @@ -61,8 +61,8 @@ private SymbolsUploader( { _symDbEndpoint = null; _alreadyProcessed = new HashSet(); - _environment = tracerSettings.EnvironmentInternal; - _serviceVersion = tracerSettings.ServiceVersionInternal; + _environment = tracerSettings.Environment; + _serviceVersion = tracerSettings.ServiceVersion; _serviceName = serviceName; _discoveryService = discoveryService; _api = api; diff --git a/tracer/src/Datadog.Trace/Debugger/Upload/DebuggerUploadApiBase.cs b/tracer/src/Datadog.Trace/Debugger/Upload/DebuggerUploadApiBase.cs index dca8fe6607f6..e5bf88e1d722 100644 --- a/tracer/src/Datadog.Trace/Debugger/Upload/DebuggerUploadApiBase.cs +++ b/tracer/src/Datadog.Trace/Debugger/Upload/DebuggerUploadApiBase.cs @@ -60,13 +60,13 @@ private string GetDefaultTagsMergedWithGlobalTags() try { - var environment = TraceUtil.NormalizeTag(Tracer.Instance.Settings.EnvironmentInternal); + var environment = TraceUtil.NormalizeTag(Tracer.Instance.Settings.Environment); if (!string.IsNullOrEmpty(environment)) { sb.Append($"env:{environment},"); } - var version = Tracer.Instance.Settings.ServiceVersionInternal; + var version = Tracer.Instance.Settings.ServiceVersion; if (!string.IsNullOrEmpty(version)) { sb.Append($"version:{version},"); @@ -92,7 +92,7 @@ private string GetDefaultTagsMergedWithGlobalTags() sb.Append($"{CommonTags.GitCommit}:{gitMetadata.CommitSha},"); } - foreach (var kvp in Tracer.Instance.Settings.GlobalTagsInternal) + foreach (var kvp in Tracer.Instance.Settings.GlobalTags) { sb.Append($"{kvp.Key}:{kvp.Value},"); } diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs deleted file mode 100644 index 1ed2cd00d30e..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs +++ /dev/null @@ -1,163 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ExporterSettings -{ - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the windows pipe name where the Tracer can connect to the Agent. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)48); - return TracesPipeNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)49); - TracesPipeNameInternal = value; - } - } - - /// - /// Gets or sets the timeout in milliseconds for the windows named pipe requests. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int TracesPipeTimeoutMs - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)50); - return TracesPipeTimeoutMsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)51); - TracesPipeTimeoutMsInternal = value; - } - } - - /// - /// Gets or sets the windows pipe name where the Tracer can send stats. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)40); - return MetricsPipeNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)41); - MetricsPipeNameInternal = value; - } - } - - /// - /// Gets or sets the unix domain socket path where the Tracer can connect to the Agent. - /// This parameter is deprecated and shall be removed. Consider using AgentUri instead - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)52); - return TracesUnixDomainSocketPathInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)53); - TracesUnixDomainSocketPathInternal = value; - } - } - - /// - /// Gets or sets the unix domain socket path where the Tracer can send stats. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)42); - return MetricsUnixDomainSocketPathInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)43); - MetricsUnixDomainSocketPathInternal = value; - } - } - - /// - /// Gets or sets the port where the DogStatsd server is listening for connections. - /// Default is 8125. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int DogStatsdPort - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)38); - return DogStatsdPortInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)39); - DogStatsdPortInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether partial flush is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool PartialFlushEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)44); - return PartialFlushEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)45); - PartialFlushEnabledInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs deleted file mode 100644 index 00abcce8bb34..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs +++ /dev/null @@ -1,152 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ImmutableExporterSettings -{ - - /// - /// Gets the Uri where the Tracer can connect to the Agent. - /// Default is "http://localhost:8126". - /// - /// - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Uri AgentUri - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)60); - return AgentUriInternal; - } - } - - /// - /// Gets the windows pipe name where the Tracer can connect to the Agent. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)66); - return TracesPipeNameInternal; - } - } - - /// - /// Gets the timeout in milliseconds for the windows named pipe requests. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int TracesPipeTimeoutMs - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)67); - return TracesPipeTimeoutMsInternal; - } - } - - /// - /// Gets the windows pipe name where the Tracer can send stats. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)62); - return MetricsPipeNameInternal; - } - } - - /// - /// Gets the port where the DogStatsd server is listening for connections. - /// Default is 8125. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int DogStatsdPort - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)61); - return DogStatsdPortInternal; - } - } - - /// - /// Gets a value indicating whether partial flush is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool PartialFlushEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)64); - return PartialFlushEnabledInternal; - } - } - - /// - /// Gets the minimum number of closed spans in a trace before it's partially flushed - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int PartialFlushMinSpans - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)65); - return PartialFlushMinSpansInternal; - } - } - - /// - /// Gets the unix domain socket path where the Tracer can connect to the Agent. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)68); - return TracesUnixDomainSocketPathInternal; - } - } - - /// - /// Gets the unix domain socket path where the Tracer can send stats. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)63); - return MetricsUnixDomainSocketPathInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs deleted file mode 100644 index 995ddfbf4b24..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ImmutableIntegrationSettings -{ - - /// - /// Gets the name of the integration. Used to retrieve integration-specific settings. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string IntegrationName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)82); - return IntegrationNameInternal; - } - } - - /// - /// Gets a value indicating whether - /// this integration is enabled. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? Enabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)81); - return EnabledInternal; - } - } - - /// - /// Gets a value indicating whether - /// Analytics are enabled for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)79); - return AnalyticsEnabledInternal; - } - } - - /// - /// Gets a value between 0 and 1 (inclusive) - /// that determines the sampling rate for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double AnalyticsSampleRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)80); - return AnalyticsSampleRateInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs deleted file mode 100644 index 88df5d72cfec..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs +++ /dev/null @@ -1,288 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial record ImmutableTracerSettings -{ - - /// - /// Gets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)146); - return EnvironmentInternal; - } - } - - /// - /// Gets the service name applied to top-level spans and used to build derived service names. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)156); - return ServiceNameInternal; - } - } - - /// - /// Gets the version tag applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceVersion - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)157); - return ServiceVersionInternal; - } - } - - /// - /// Gets a value indicating whether tracing is enabled. - /// Default is true. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TraceEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)160); - return TraceEnabledInternal; - } - } - - /// - /// Gets the exporter settings that dictate how the tracer exports data. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ImmutableExporterSettings Exporter - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)147); - return ExporterInternal; - } - } - -#pragma warning disable CS1574 // AnalyticsEnabled is obsolete - /// - /// Gets a value indicating whether default Analytics are enabled. - /// Settings this value is a shortcut for setting - /// on some predetermined integrations. - /// See the documentation for more details. - /// - /// -#pragma warning restore CS1574 - [System.Obsolete("App Analytics has been replaced by Tracing without Limits. For more information see https://docs.datadoghq.com/tracing/legacy_app_analytics/")] - [Datadog.Trace.SourceGenerators.PublicApi] - public bool AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)144); - return AnalyticsEnabledInternal; - } - } - - /// - /// Gets a value indicating whether correlation identifiers are - /// automatically injected into the logging context. - /// Default is false. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool LogsInjectionEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)154); - return LogsInjectionEnabledInternal; - } - } - - /// - /// Gets a value indicating the maximum number of traces set to AutoKeep (p1) per second. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int MaxTracesSubmittedPerSecond - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)155); - return MaxTracesSubmittedPerSecondInternal; - } - } - - /// - /// Gets a value indicating custom sampling rules. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? CustomSamplingRules - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)145); - return CustomSamplingRulesInternal; - } - } - - /// - /// Gets a value indicating a global rate for sampling. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double? GlobalSamplingRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)148); - return GlobalSamplingRateInternal; - } - } - - /// - /// Gets a collection of keyed by integration name. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ImmutableIntegrationSettingsCollection Integrations - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)152); - return IntegrationsInternal; - } - } - - /// - /// Gets the global tags, which are applied to all s. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary GlobalTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)149); - return GlobalTagsInternal; - } - } - - /// - /// Gets the map of header keys to tag names, which are applied to the root - /// of incoming and outgoing requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary HeaderTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)151); - return HeaderTagsInternal; - } - } - - /// - /// Gets the map of metadata keys to tag names, which are applied to the root - /// of incoming and outgoing GRPC requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary GrpcTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)150); - return GrpcTagsInternal; - } - } - - /// - /// Gets a value indicating whether internal metrics - /// are enabled and sent to DogStatsd. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TracerMetricsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)161); - return TracerMetricsEnabledInternal; - } - } - - /// - /// Gets a value indicating whether stats are computed on the tracer side - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StatsComputationEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)159); - return StatsComputationEnabledInternal; - } - } - - /// - /// Gets a value indicating whether a span context should be created on exiting a successful Kafka - /// Consumer.Consume() call, and closed on entering Consumer.Consume(). - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool KafkaCreateConsumerScopeEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)153); - return KafkaCreateConsumerScopeEnabledInternal; - } - } - - /// - /// Gets a value indicating whether the diagnostic log at startup is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StartupDiagnosticLogEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)158); - return StartupDiagnosticLogEnabledInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs deleted file mode 100644 index 6fdf07c83703..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class IntegrationSettings -{ - - /// - /// Gets the name of the integration. Used to retrieve integration-specific settings. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string IntegrationName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)76); - return IntegrationNameInternal; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether - /// this integration is enabled. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? Enabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)74); - return EnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)75); - EnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether - /// Analytics are enabled for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)70); - return AnalyticsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)71); - AnalyticsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value between 0 and 1 (inclusive) - /// that determines the sampling rate for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double AnalyticsSampleRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)72); - return AnalyticsSampleRateInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)73); - AnalyticsSampleRateInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs deleted file mode 100644 index cf5500043409..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs +++ /dev/null @@ -1,390 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class TracerSettings -{ - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)105); - return EnvironmentInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)106); - EnvironmentInternal = value; - } - } - - /// - /// Gets or sets the service name applied to top-level spans and used to build derived service names. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)124); - return ServiceNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)125); - ServiceNameInternal = value; - } - } - - /// - /// Gets or sets the version tag applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceVersion - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)126); - return ServiceVersionInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)127); - ServiceVersionInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether tracing is enabled. - /// Default is true. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TraceEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)132); - return TraceEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)133); - TraceEnabledInternal = value; - } - } - - /// - /// Gets or sets the names of disabled integrations. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.HashSet DisabledIntegrationNames - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)103); - return DisabledIntegrationNamesInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)104); - DisabledIntegrationNamesInternal = value; - } - } - - /// - /// Gets or sets the transport settings that dictate how the tracer connects to the agent. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ExporterSettings Exporter - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)107); - return ExporterInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)108); - ExporterInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether default Analytics are enabled. - /// Settings this value is a shortcut for setting - /// on some predetermined integrations. - /// See the documentation for more details. - /// - /// - [System.Obsolete("App Analytics has been replaced by Tracing without Limits. For more information see https://docs.datadoghq.com/tracing/legacy_app_analytics/")] - [Datadog.Trace.SourceGenerators.PublicApi] - public bool AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)97); - return AnalyticsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)98); - AnalyticsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating the maximum number of traces set to AutoKeep (p1) per second. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int MaxTracesSubmittedPerSecond - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)122); - return MaxTracesSubmittedPerSecondInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)123); - MaxTracesSubmittedPerSecondInternal = value; - } - } - - /// - /// Gets or sets a value indicating custom sampling rules. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? CustomSamplingRules - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)99); - return CustomSamplingRulesInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)100); - CustomSamplingRulesInternal = value; - } - } - - /// - /// Gets or sets a value indicating a global rate for sampling. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double? GlobalSamplingRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)109); - return GlobalSamplingRateInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)110); - GlobalSamplingRateInternal = value; - } - } - - /// - /// Gets a collection of keyed by integration name. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.IntegrationSettingsCollection Integrations - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)117); - return IntegrationsInternal; - } - } - - /// - /// Gets or sets the global tags, which are applied to all s. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary GlobalTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)111); - return GlobalTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)112); - GlobalTagsInternal = value; - } - } - - /// - /// Gets or sets the map of header keys to tag names, which are applied to the root - /// of incoming and outgoing HTTP requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary HeaderTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)115); - return HeaderTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)116); - HeaderTagsInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the map of metadata keys to tag names, which are applied to the root - /// of incoming and outgoing GRPC requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary GrpcTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)113); - return GrpcTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)114); - GrpcTagsInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether internal metrics - /// are enabled and sent to DogStatsd. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TracerMetricsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)134); - return TracerMetricsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)135); - TracerMetricsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether stats are computed on the tracer side - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StatsComputationEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)130); - return StatsComputationEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)131); - StatsComputationEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether a span context should be created on exiting a successful Kafka - /// Consumer.Consume() call, and closed on entering Consumer.Consume(). - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool KafkaCreateConsumerScopeEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)118); - return KafkaCreateConsumerScopeEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)119); - KafkaCreateConsumerScopeEnabledInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether the diagnostic log at startup is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StartupDiagnosticLogEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)128); - return StartupDiagnosticLogEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)129); - StartupDiagnosticLogEnabledInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs deleted file mode 100644 index 64cdd48193b0..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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 - -namespace Datadog.Trace; -partial class SpanContext -{ - - /// - /// Gets the parent context. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.ISpanContext Parent - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)30); - return ParentInternal; - } - } - - /// - /// Gets the span id of the parent span. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public ulong? ParentId - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)31); - return ParentIdInternal; - } - } - - /// - /// Gets or sets the service name to propagate to child spans. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)32); - return ServiceNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)33); - ServiceNameInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs deleted file mode 100644 index a2185b2e8683..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.SourceGenerators; - -/// -/// Used to generate a public property for a decorated field, -/// allowing adding aspect-oriented changes such as telemetry etc. -/// Any documentation added to the field is copied to the public API -/// -[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple = false)] -internal class GeneratePublicApiAttribute : System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// Adds a getter and a setter. - /// - /// Gets the name of the public API used for the property getter - /// Gets the name of the public API used for the property setter - public GeneratePublicApiAttribute( - Datadog.Trace.Telemetry.Metrics.PublicApiUsage getApiUsage, - Datadog.Trace.Telemetry.Metrics.PublicApiUsage setApiUsage) - { - Getter = getApiUsage; - Setter = setApiUsage; - } - - /// - /// Initializes a new instance of the class. - /// Adds a getter only. - /// - /// Gets the name of the public API used for the property getter. If null, no getter will be generated. - public GeneratePublicApiAttribute(Datadog.Trace.Telemetry.Metrics.PublicApiUsage getApiUsage) - { - Getter = getApiUsage; - } - - /// - /// Gets the name of the public API used for the getter - /// - public Datadog.Trace.Telemetry.Metrics.PublicApiUsage Getter { get; } - - /// - /// Gets the name of the public API used for the setter - /// - public Datadog.Trace.Telemetry.Metrics.PublicApiUsage? Setter { get; } -} - -/// -/// A marker attribute added to a public API to indicate it should only be -/// called by consumers. Used by analyzers to confirm we're not calling a public API method. -/// -[System.Diagnostics.Conditional("DEBUG")] -[System.AttributeUsage( - System.AttributeTargets.Field - | System.AttributeTargets.Property - | System.AttributeTargets.Method - | System.AttributeTargets.Constructor)] -internal sealed class PublicApiAttribute : System.Attribute -{ -} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs deleted file mode 100644 index 1ed2cd00d30e..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs +++ /dev/null @@ -1,163 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ExporterSettings -{ - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the windows pipe name where the Tracer can connect to the Agent. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)48); - return TracesPipeNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)49); - TracesPipeNameInternal = value; - } - } - - /// - /// Gets or sets the timeout in milliseconds for the windows named pipe requests. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int TracesPipeTimeoutMs - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)50); - return TracesPipeTimeoutMsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)51); - TracesPipeTimeoutMsInternal = value; - } - } - - /// - /// Gets or sets the windows pipe name where the Tracer can send stats. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)40); - return MetricsPipeNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)41); - MetricsPipeNameInternal = value; - } - } - - /// - /// Gets or sets the unix domain socket path where the Tracer can connect to the Agent. - /// This parameter is deprecated and shall be removed. Consider using AgentUri instead - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)52); - return TracesUnixDomainSocketPathInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)53); - TracesUnixDomainSocketPathInternal = value; - } - } - - /// - /// Gets or sets the unix domain socket path where the Tracer can send stats. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)42); - return MetricsUnixDomainSocketPathInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)43); - MetricsUnixDomainSocketPathInternal = value; - } - } - - /// - /// Gets or sets the port where the DogStatsd server is listening for connections. - /// Default is 8125. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int DogStatsdPort - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)38); - return DogStatsdPortInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)39); - DogStatsdPortInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether partial flush is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool PartialFlushEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)44); - return PartialFlushEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)45); - PartialFlushEnabledInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs deleted file mode 100644 index 00abcce8bb34..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs +++ /dev/null @@ -1,152 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ImmutableExporterSettings -{ - - /// - /// Gets the Uri where the Tracer can connect to the Agent. - /// Default is "http://localhost:8126". - /// - /// - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Uri AgentUri - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)60); - return AgentUriInternal; - } - } - - /// - /// Gets the windows pipe name where the Tracer can connect to the Agent. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)66); - return TracesPipeNameInternal; - } - } - - /// - /// Gets the timeout in milliseconds for the windows named pipe requests. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int TracesPipeTimeoutMs - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)67); - return TracesPipeTimeoutMsInternal; - } - } - - /// - /// Gets the windows pipe name where the Tracer can send stats. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)62); - return MetricsPipeNameInternal; - } - } - - /// - /// Gets the port where the DogStatsd server is listening for connections. - /// Default is 8125. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int DogStatsdPort - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)61); - return DogStatsdPortInternal; - } - } - - /// - /// Gets a value indicating whether partial flush is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool PartialFlushEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)64); - return PartialFlushEnabledInternal; - } - } - - /// - /// Gets the minimum number of closed spans in a trace before it's partially flushed - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int PartialFlushMinSpans - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)65); - return PartialFlushMinSpansInternal; - } - } - - /// - /// Gets the unix domain socket path where the Tracer can connect to the Agent. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)68); - return TracesUnixDomainSocketPathInternal; - } - } - - /// - /// Gets the unix domain socket path where the Tracer can send stats. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)63); - return MetricsUnixDomainSocketPathInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs deleted file mode 100644 index 995ddfbf4b24..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ImmutableIntegrationSettings -{ - - /// - /// Gets the name of the integration. Used to retrieve integration-specific settings. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string IntegrationName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)82); - return IntegrationNameInternal; - } - } - - /// - /// Gets a value indicating whether - /// this integration is enabled. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? Enabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)81); - return EnabledInternal; - } - } - - /// - /// Gets a value indicating whether - /// Analytics are enabled for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)79); - return AnalyticsEnabledInternal; - } - } - - /// - /// Gets a value between 0 and 1 (inclusive) - /// that determines the sampling rate for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double AnalyticsSampleRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)80); - return AnalyticsSampleRateInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs deleted file mode 100644 index 88df5d72cfec..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs +++ /dev/null @@ -1,288 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial record ImmutableTracerSettings -{ - - /// - /// Gets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)146); - return EnvironmentInternal; - } - } - - /// - /// Gets the service name applied to top-level spans and used to build derived service names. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)156); - return ServiceNameInternal; - } - } - - /// - /// Gets the version tag applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceVersion - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)157); - return ServiceVersionInternal; - } - } - - /// - /// Gets a value indicating whether tracing is enabled. - /// Default is true. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TraceEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)160); - return TraceEnabledInternal; - } - } - - /// - /// Gets the exporter settings that dictate how the tracer exports data. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ImmutableExporterSettings Exporter - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)147); - return ExporterInternal; - } - } - -#pragma warning disable CS1574 // AnalyticsEnabled is obsolete - /// - /// Gets a value indicating whether default Analytics are enabled. - /// Settings this value is a shortcut for setting - /// on some predetermined integrations. - /// See the documentation for more details. - /// - /// -#pragma warning restore CS1574 - [System.Obsolete("App Analytics has been replaced by Tracing without Limits. For more information see https://docs.datadoghq.com/tracing/legacy_app_analytics/")] - [Datadog.Trace.SourceGenerators.PublicApi] - public bool AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)144); - return AnalyticsEnabledInternal; - } - } - - /// - /// Gets a value indicating whether correlation identifiers are - /// automatically injected into the logging context. - /// Default is false. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool LogsInjectionEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)154); - return LogsInjectionEnabledInternal; - } - } - - /// - /// Gets a value indicating the maximum number of traces set to AutoKeep (p1) per second. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int MaxTracesSubmittedPerSecond - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)155); - return MaxTracesSubmittedPerSecondInternal; - } - } - - /// - /// Gets a value indicating custom sampling rules. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? CustomSamplingRules - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)145); - return CustomSamplingRulesInternal; - } - } - - /// - /// Gets a value indicating a global rate for sampling. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double? GlobalSamplingRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)148); - return GlobalSamplingRateInternal; - } - } - - /// - /// Gets a collection of keyed by integration name. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ImmutableIntegrationSettingsCollection Integrations - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)152); - return IntegrationsInternal; - } - } - - /// - /// Gets the global tags, which are applied to all s. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary GlobalTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)149); - return GlobalTagsInternal; - } - } - - /// - /// Gets the map of header keys to tag names, which are applied to the root - /// of incoming and outgoing requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary HeaderTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)151); - return HeaderTagsInternal; - } - } - - /// - /// Gets the map of metadata keys to tag names, which are applied to the root - /// of incoming and outgoing GRPC requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary GrpcTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)150); - return GrpcTagsInternal; - } - } - - /// - /// Gets a value indicating whether internal metrics - /// are enabled and sent to DogStatsd. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TracerMetricsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)161); - return TracerMetricsEnabledInternal; - } - } - - /// - /// Gets a value indicating whether stats are computed on the tracer side - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StatsComputationEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)159); - return StatsComputationEnabledInternal; - } - } - - /// - /// Gets a value indicating whether a span context should be created on exiting a successful Kafka - /// Consumer.Consume() call, and closed on entering Consumer.Consume(). - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool KafkaCreateConsumerScopeEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)153); - return KafkaCreateConsumerScopeEnabledInternal; - } - } - - /// - /// Gets a value indicating whether the diagnostic log at startup is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StartupDiagnosticLogEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)158); - return StartupDiagnosticLogEnabledInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs deleted file mode 100644 index 6fdf07c83703..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class IntegrationSettings -{ - - /// - /// Gets the name of the integration. Used to retrieve integration-specific settings. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string IntegrationName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)76); - return IntegrationNameInternal; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether - /// this integration is enabled. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? Enabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)74); - return EnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)75); - EnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether - /// Analytics are enabled for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)70); - return AnalyticsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)71); - AnalyticsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value between 0 and 1 (inclusive) - /// that determines the sampling rate for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double AnalyticsSampleRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)72); - return AnalyticsSampleRateInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)73); - AnalyticsSampleRateInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs deleted file mode 100644 index cf5500043409..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs +++ /dev/null @@ -1,390 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class TracerSettings -{ - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)105); - return EnvironmentInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)106); - EnvironmentInternal = value; - } - } - - /// - /// Gets or sets the service name applied to top-level spans and used to build derived service names. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)124); - return ServiceNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)125); - ServiceNameInternal = value; - } - } - - /// - /// Gets or sets the version tag applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceVersion - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)126); - return ServiceVersionInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)127); - ServiceVersionInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether tracing is enabled. - /// Default is true. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TraceEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)132); - return TraceEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)133); - TraceEnabledInternal = value; - } - } - - /// - /// Gets or sets the names of disabled integrations. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.HashSet DisabledIntegrationNames - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)103); - return DisabledIntegrationNamesInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)104); - DisabledIntegrationNamesInternal = value; - } - } - - /// - /// Gets or sets the transport settings that dictate how the tracer connects to the agent. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ExporterSettings Exporter - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)107); - return ExporterInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)108); - ExporterInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether default Analytics are enabled. - /// Settings this value is a shortcut for setting - /// on some predetermined integrations. - /// See the documentation for more details. - /// - /// - [System.Obsolete("App Analytics has been replaced by Tracing without Limits. For more information see https://docs.datadoghq.com/tracing/legacy_app_analytics/")] - [Datadog.Trace.SourceGenerators.PublicApi] - public bool AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)97); - return AnalyticsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)98); - AnalyticsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating the maximum number of traces set to AutoKeep (p1) per second. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int MaxTracesSubmittedPerSecond - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)122); - return MaxTracesSubmittedPerSecondInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)123); - MaxTracesSubmittedPerSecondInternal = value; - } - } - - /// - /// Gets or sets a value indicating custom sampling rules. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? CustomSamplingRules - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)99); - return CustomSamplingRulesInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)100); - CustomSamplingRulesInternal = value; - } - } - - /// - /// Gets or sets a value indicating a global rate for sampling. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double? GlobalSamplingRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)109); - return GlobalSamplingRateInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)110); - GlobalSamplingRateInternal = value; - } - } - - /// - /// Gets a collection of keyed by integration name. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.IntegrationSettingsCollection Integrations - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)117); - return IntegrationsInternal; - } - } - - /// - /// Gets or sets the global tags, which are applied to all s. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary GlobalTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)111); - return GlobalTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)112); - GlobalTagsInternal = value; - } - } - - /// - /// Gets or sets the map of header keys to tag names, which are applied to the root - /// of incoming and outgoing HTTP requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary HeaderTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)115); - return HeaderTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)116); - HeaderTagsInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the map of metadata keys to tag names, which are applied to the root - /// of incoming and outgoing GRPC requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary GrpcTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)113); - return GrpcTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)114); - GrpcTagsInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether internal metrics - /// are enabled and sent to DogStatsd. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TracerMetricsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)134); - return TracerMetricsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)135); - TracerMetricsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether stats are computed on the tracer side - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StatsComputationEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)130); - return StatsComputationEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)131); - StatsComputationEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether a span context should be created on exiting a successful Kafka - /// Consumer.Consume() call, and closed on entering Consumer.Consume(). - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool KafkaCreateConsumerScopeEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)118); - return KafkaCreateConsumerScopeEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)119); - KafkaCreateConsumerScopeEnabledInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether the diagnostic log at startup is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StartupDiagnosticLogEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)128); - return StartupDiagnosticLogEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)129); - StartupDiagnosticLogEnabledInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs deleted file mode 100644 index 64cdd48193b0..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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 - -namespace Datadog.Trace; -partial class SpanContext -{ - - /// - /// Gets the parent context. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.ISpanContext Parent - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)30); - return ParentInternal; - } - } - - /// - /// Gets the span id of the parent span. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public ulong? ParentId - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)31); - return ParentIdInternal; - } - } - - /// - /// Gets or sets the service name to propagate to child spans. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)32); - return ServiceNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)33); - ServiceNameInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs deleted file mode 100644 index a2185b2e8683..000000000000 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.SourceGenerators; - -/// -/// Used to generate a public property for a decorated field, -/// allowing adding aspect-oriented changes such as telemetry etc. -/// Any documentation added to the field is copied to the public API -/// -[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple = false)] -internal class GeneratePublicApiAttribute : System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// Adds a getter and a setter. - /// - /// Gets the name of the public API used for the property getter - /// Gets the name of the public API used for the property setter - public GeneratePublicApiAttribute( - Datadog.Trace.Telemetry.Metrics.PublicApiUsage getApiUsage, - Datadog.Trace.Telemetry.Metrics.PublicApiUsage setApiUsage) - { - Getter = getApiUsage; - Setter = setApiUsage; - } - - /// - /// Initializes a new instance of the class. - /// Adds a getter only. - /// - /// Gets the name of the public API used for the property getter. If null, no getter will be generated. - public GeneratePublicApiAttribute(Datadog.Trace.Telemetry.Metrics.PublicApiUsage getApiUsage) - { - Getter = getApiUsage; - } - - /// - /// Gets the name of the public API used for the getter - /// - public Datadog.Trace.Telemetry.Metrics.PublicApiUsage Getter { get; } - - /// - /// Gets the name of the public API used for the setter - /// - public Datadog.Trace.Telemetry.Metrics.PublicApiUsage? Setter { get; } -} - -/// -/// A marker attribute added to a public API to indicate it should only be -/// called by consumers. Used by analyzers to confirm we're not calling a public API method. -/// -[System.Diagnostics.Conditional("DEBUG")] -[System.AttributeUsage( - System.AttributeTargets.Field - | System.AttributeTargets.Property - | System.AttributeTargets.Method - | System.AttributeTargets.Constructor)] -internal sealed class PublicApiAttribute : System.Attribute -{ -} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs deleted file mode 100644 index 1ed2cd00d30e..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs +++ /dev/null @@ -1,163 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ExporterSettings -{ - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the windows pipe name where the Tracer can connect to the Agent. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)48); - return TracesPipeNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)49); - TracesPipeNameInternal = value; - } - } - - /// - /// Gets or sets the timeout in milliseconds for the windows named pipe requests. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int TracesPipeTimeoutMs - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)50); - return TracesPipeTimeoutMsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)51); - TracesPipeTimeoutMsInternal = value; - } - } - - /// - /// Gets or sets the windows pipe name where the Tracer can send stats. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)40); - return MetricsPipeNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)41); - MetricsPipeNameInternal = value; - } - } - - /// - /// Gets or sets the unix domain socket path where the Tracer can connect to the Agent. - /// This parameter is deprecated and shall be removed. Consider using AgentUri instead - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)52); - return TracesUnixDomainSocketPathInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)53); - TracesUnixDomainSocketPathInternal = value; - } - } - - /// - /// Gets or sets the unix domain socket path where the Tracer can send stats. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)42); - return MetricsUnixDomainSocketPathInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)43); - MetricsUnixDomainSocketPathInternal = value; - } - } - - /// - /// Gets or sets the port where the DogStatsd server is listening for connections. - /// Default is 8125. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int DogStatsdPort - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)38); - return DogStatsdPortInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)39); - DogStatsdPortInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether partial flush is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool PartialFlushEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)44); - return PartialFlushEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)45); - PartialFlushEnabledInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs deleted file mode 100644 index 00abcce8bb34..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs +++ /dev/null @@ -1,152 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ImmutableExporterSettings -{ - - /// - /// Gets the Uri where the Tracer can connect to the Agent. - /// Default is "http://localhost:8126". - /// - /// - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Uri AgentUri - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)60); - return AgentUriInternal; - } - } - - /// - /// Gets the windows pipe name where the Tracer can connect to the Agent. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)66); - return TracesPipeNameInternal; - } - } - - /// - /// Gets the timeout in milliseconds for the windows named pipe requests. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int TracesPipeTimeoutMs - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)67); - return TracesPipeTimeoutMsInternal; - } - } - - /// - /// Gets the windows pipe name where the Tracer can send stats. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)62); - return MetricsPipeNameInternal; - } - } - - /// - /// Gets the port where the DogStatsd server is listening for connections. - /// Default is 8125. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int DogStatsdPort - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)61); - return DogStatsdPortInternal; - } - } - - /// - /// Gets a value indicating whether partial flush is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool PartialFlushEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)64); - return PartialFlushEnabledInternal; - } - } - - /// - /// Gets the minimum number of closed spans in a trace before it's partially flushed - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int PartialFlushMinSpans - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)65); - return PartialFlushMinSpansInternal; - } - } - - /// - /// Gets the unix domain socket path where the Tracer can connect to the Agent. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)68); - return TracesUnixDomainSocketPathInternal; - } - } - - /// - /// Gets the unix domain socket path where the Tracer can send stats. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)63); - return MetricsUnixDomainSocketPathInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs deleted file mode 100644 index 995ddfbf4b24..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ImmutableIntegrationSettings -{ - - /// - /// Gets the name of the integration. Used to retrieve integration-specific settings. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string IntegrationName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)82); - return IntegrationNameInternal; - } - } - - /// - /// Gets a value indicating whether - /// this integration is enabled. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? Enabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)81); - return EnabledInternal; - } - } - - /// - /// Gets a value indicating whether - /// Analytics are enabled for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)79); - return AnalyticsEnabledInternal; - } - } - - /// - /// Gets a value between 0 and 1 (inclusive) - /// that determines the sampling rate for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double AnalyticsSampleRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)80); - return AnalyticsSampleRateInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs deleted file mode 100644 index 88df5d72cfec..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs +++ /dev/null @@ -1,288 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial record ImmutableTracerSettings -{ - - /// - /// Gets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)146); - return EnvironmentInternal; - } - } - - /// - /// Gets the service name applied to top-level spans and used to build derived service names. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)156); - return ServiceNameInternal; - } - } - - /// - /// Gets the version tag applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceVersion - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)157); - return ServiceVersionInternal; - } - } - - /// - /// Gets a value indicating whether tracing is enabled. - /// Default is true. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TraceEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)160); - return TraceEnabledInternal; - } - } - - /// - /// Gets the exporter settings that dictate how the tracer exports data. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ImmutableExporterSettings Exporter - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)147); - return ExporterInternal; - } - } - -#pragma warning disable CS1574 // AnalyticsEnabled is obsolete - /// - /// Gets a value indicating whether default Analytics are enabled. - /// Settings this value is a shortcut for setting - /// on some predetermined integrations. - /// See the documentation for more details. - /// - /// -#pragma warning restore CS1574 - [System.Obsolete("App Analytics has been replaced by Tracing without Limits. For more information see https://docs.datadoghq.com/tracing/legacy_app_analytics/")] - [Datadog.Trace.SourceGenerators.PublicApi] - public bool AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)144); - return AnalyticsEnabledInternal; - } - } - - /// - /// Gets a value indicating whether correlation identifiers are - /// automatically injected into the logging context. - /// Default is false. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool LogsInjectionEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)154); - return LogsInjectionEnabledInternal; - } - } - - /// - /// Gets a value indicating the maximum number of traces set to AutoKeep (p1) per second. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int MaxTracesSubmittedPerSecond - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)155); - return MaxTracesSubmittedPerSecondInternal; - } - } - - /// - /// Gets a value indicating custom sampling rules. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? CustomSamplingRules - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)145); - return CustomSamplingRulesInternal; - } - } - - /// - /// Gets a value indicating a global rate for sampling. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double? GlobalSamplingRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)148); - return GlobalSamplingRateInternal; - } - } - - /// - /// Gets a collection of keyed by integration name. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ImmutableIntegrationSettingsCollection Integrations - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)152); - return IntegrationsInternal; - } - } - - /// - /// Gets the global tags, which are applied to all s. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary GlobalTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)149); - return GlobalTagsInternal; - } - } - - /// - /// Gets the map of header keys to tag names, which are applied to the root - /// of incoming and outgoing requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary HeaderTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)151); - return HeaderTagsInternal; - } - } - - /// - /// Gets the map of metadata keys to tag names, which are applied to the root - /// of incoming and outgoing GRPC requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary GrpcTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)150); - return GrpcTagsInternal; - } - } - - /// - /// Gets a value indicating whether internal metrics - /// are enabled and sent to DogStatsd. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TracerMetricsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)161); - return TracerMetricsEnabledInternal; - } - } - - /// - /// Gets a value indicating whether stats are computed on the tracer side - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StatsComputationEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)159); - return StatsComputationEnabledInternal; - } - } - - /// - /// Gets a value indicating whether a span context should be created on exiting a successful Kafka - /// Consumer.Consume() call, and closed on entering Consumer.Consume(). - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool KafkaCreateConsumerScopeEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)153); - return KafkaCreateConsumerScopeEnabledInternal; - } - } - - /// - /// Gets a value indicating whether the diagnostic log at startup is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StartupDiagnosticLogEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)158); - return StartupDiagnosticLogEnabledInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs deleted file mode 100644 index 6fdf07c83703..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class IntegrationSettings -{ - - /// - /// Gets the name of the integration. Used to retrieve integration-specific settings. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string IntegrationName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)76); - return IntegrationNameInternal; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether - /// this integration is enabled. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? Enabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)74); - return EnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)75); - EnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether - /// Analytics are enabled for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)70); - return AnalyticsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)71); - AnalyticsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value between 0 and 1 (inclusive) - /// that determines the sampling rate for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double AnalyticsSampleRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)72); - return AnalyticsSampleRateInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)73); - AnalyticsSampleRateInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs deleted file mode 100644 index cf5500043409..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs +++ /dev/null @@ -1,390 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class TracerSettings -{ - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)105); - return EnvironmentInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)106); - EnvironmentInternal = value; - } - } - - /// - /// Gets or sets the service name applied to top-level spans and used to build derived service names. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)124); - return ServiceNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)125); - ServiceNameInternal = value; - } - } - - /// - /// Gets or sets the version tag applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceVersion - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)126); - return ServiceVersionInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)127); - ServiceVersionInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether tracing is enabled. - /// Default is true. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TraceEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)132); - return TraceEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)133); - TraceEnabledInternal = value; - } - } - - /// - /// Gets or sets the names of disabled integrations. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.HashSet DisabledIntegrationNames - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)103); - return DisabledIntegrationNamesInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)104); - DisabledIntegrationNamesInternal = value; - } - } - - /// - /// Gets or sets the transport settings that dictate how the tracer connects to the agent. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ExporterSettings Exporter - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)107); - return ExporterInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)108); - ExporterInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether default Analytics are enabled. - /// Settings this value is a shortcut for setting - /// on some predetermined integrations. - /// See the documentation for more details. - /// - /// - [System.Obsolete("App Analytics has been replaced by Tracing without Limits. For more information see https://docs.datadoghq.com/tracing/legacy_app_analytics/")] - [Datadog.Trace.SourceGenerators.PublicApi] - public bool AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)97); - return AnalyticsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)98); - AnalyticsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating the maximum number of traces set to AutoKeep (p1) per second. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int MaxTracesSubmittedPerSecond - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)122); - return MaxTracesSubmittedPerSecondInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)123); - MaxTracesSubmittedPerSecondInternal = value; - } - } - - /// - /// Gets or sets a value indicating custom sampling rules. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? CustomSamplingRules - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)99); - return CustomSamplingRulesInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)100); - CustomSamplingRulesInternal = value; - } - } - - /// - /// Gets or sets a value indicating a global rate for sampling. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double? GlobalSamplingRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)109); - return GlobalSamplingRateInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)110); - GlobalSamplingRateInternal = value; - } - } - - /// - /// Gets a collection of keyed by integration name. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.IntegrationSettingsCollection Integrations - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)117); - return IntegrationsInternal; - } - } - - /// - /// Gets or sets the global tags, which are applied to all s. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary GlobalTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)111); - return GlobalTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)112); - GlobalTagsInternal = value; - } - } - - /// - /// Gets or sets the map of header keys to tag names, which are applied to the root - /// of incoming and outgoing HTTP requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary HeaderTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)115); - return HeaderTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)116); - HeaderTagsInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the map of metadata keys to tag names, which are applied to the root - /// of incoming and outgoing GRPC requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary GrpcTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)113); - return GrpcTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)114); - GrpcTagsInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether internal metrics - /// are enabled and sent to DogStatsd. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TracerMetricsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)134); - return TracerMetricsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)135); - TracerMetricsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether stats are computed on the tracer side - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StatsComputationEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)130); - return StatsComputationEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)131); - StatsComputationEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether a span context should be created on exiting a successful Kafka - /// Consumer.Consume() call, and closed on entering Consumer.Consume(). - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool KafkaCreateConsumerScopeEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)118); - return KafkaCreateConsumerScopeEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)119); - KafkaCreateConsumerScopeEnabledInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether the diagnostic log at startup is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StartupDiagnosticLogEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)128); - return StartupDiagnosticLogEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)129); - StartupDiagnosticLogEnabledInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs deleted file mode 100644 index 64cdd48193b0..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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 - -namespace Datadog.Trace; -partial class SpanContext -{ - - /// - /// Gets the parent context. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.ISpanContext Parent - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)30); - return ParentInternal; - } - } - - /// - /// Gets the span id of the parent span. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public ulong? ParentId - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)31); - return ParentIdInternal; - } - } - - /// - /// Gets or sets the service name to propagate to child spans. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)32); - return ServiceNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)33); - ServiceNameInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs deleted file mode 100644 index a2185b2e8683..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.SourceGenerators; - -/// -/// Used to generate a public property for a decorated field, -/// allowing adding aspect-oriented changes such as telemetry etc. -/// Any documentation added to the field is copied to the public API -/// -[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple = false)] -internal class GeneratePublicApiAttribute : System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// Adds a getter and a setter. - /// - /// Gets the name of the public API used for the property getter - /// Gets the name of the public API used for the property setter - public GeneratePublicApiAttribute( - Datadog.Trace.Telemetry.Metrics.PublicApiUsage getApiUsage, - Datadog.Trace.Telemetry.Metrics.PublicApiUsage setApiUsage) - { - Getter = getApiUsage; - Setter = setApiUsage; - } - - /// - /// Initializes a new instance of the class. - /// Adds a getter only. - /// - /// Gets the name of the public API used for the property getter. If null, no getter will be generated. - public GeneratePublicApiAttribute(Datadog.Trace.Telemetry.Metrics.PublicApiUsage getApiUsage) - { - Getter = getApiUsage; - } - - /// - /// Gets the name of the public API used for the getter - /// - public Datadog.Trace.Telemetry.Metrics.PublicApiUsage Getter { get; } - - /// - /// Gets the name of the public API used for the setter - /// - public Datadog.Trace.Telemetry.Metrics.PublicApiUsage? Setter { get; } -} - -/// -/// A marker attribute added to a public API to indicate it should only be -/// called by consumers. Used by analyzers to confirm we're not calling a public API method. -/// -[System.Diagnostics.Conditional("DEBUG")] -[System.AttributeUsage( - System.AttributeTargets.Field - | System.AttributeTargets.Property - | System.AttributeTargets.Method - | System.AttributeTargets.Constructor)] -internal sealed class PublicApiAttribute : System.Attribute -{ -} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs deleted file mode 100644 index 1ed2cd00d30e..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ExporterSettings.g.cs +++ /dev/null @@ -1,163 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ExporterSettings -{ - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the windows pipe name where the Tracer can connect to the Agent. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)48); - return TracesPipeNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)49); - TracesPipeNameInternal = value; - } - } - - /// - /// Gets or sets the timeout in milliseconds for the windows named pipe requests. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int TracesPipeTimeoutMs - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)50); - return TracesPipeTimeoutMsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)51); - TracesPipeTimeoutMsInternal = value; - } - } - - /// - /// Gets or sets the windows pipe name where the Tracer can send stats. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)40); - return MetricsPipeNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)41); - MetricsPipeNameInternal = value; - } - } - - /// - /// Gets or sets the unix domain socket path where the Tracer can connect to the Agent. - /// This parameter is deprecated and shall be removed. Consider using AgentUri instead - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)52); - return TracesUnixDomainSocketPathInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)53); - TracesUnixDomainSocketPathInternal = value; - } - } - - /// - /// Gets or sets the unix domain socket path where the Tracer can send stats. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)42); - return MetricsUnixDomainSocketPathInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)43); - MetricsUnixDomainSocketPathInternal = value; - } - } - - /// - /// Gets or sets the port where the DogStatsd server is listening for connections. - /// Default is 8125. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int DogStatsdPort - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)38); - return DogStatsdPortInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)39); - DogStatsdPortInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether partial flush is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool PartialFlushEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)44); - return PartialFlushEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)45); - PartialFlushEnabledInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs deleted file mode 100644 index 00abcce8bb34..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableExporterSettings.g.cs +++ /dev/null @@ -1,152 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ImmutableExporterSettings -{ - - /// - /// Gets the Uri where the Tracer can connect to the Agent. - /// Default is "http://localhost:8126". - /// - /// - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Uri AgentUri - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)60); - return AgentUriInternal; - } - } - - /// - /// Gets the windows pipe name where the Tracer can connect to the Agent. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)66); - return TracesPipeNameInternal; - } - } - - /// - /// Gets the timeout in milliseconds for the windows named pipe requests. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int TracesPipeTimeoutMs - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)67); - return TracesPipeTimeoutMsInternal; - } - } - - /// - /// Gets the windows pipe name where the Tracer can send stats. - /// Default is null. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsPipeName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)62); - return MetricsPipeNameInternal; - } - } - - /// - /// Gets the port where the DogStatsd server is listening for connections. - /// Default is 8125. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int DogStatsdPort - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)61); - return DogStatsdPortInternal; - } - } - - /// - /// Gets a value indicating whether partial flush is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool PartialFlushEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)64); - return PartialFlushEnabledInternal; - } - } - - /// - /// Gets the minimum number of closed spans in a trace before it's partially flushed - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int PartialFlushMinSpans - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)65); - return PartialFlushMinSpansInternal; - } - } - - /// - /// Gets the unix domain socket path where the Tracer can connect to the Agent. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TracesUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)68); - return TracesUnixDomainSocketPathInternal; - } - } - - /// - /// Gets the unix domain socket path where the Tracer can send stats. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? MetricsUnixDomainSocketPath - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)63); - return MetricsUnixDomainSocketPathInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs deleted file mode 100644 index 995ddfbf4b24..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableIntegrationSettings.g.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class ImmutableIntegrationSettings -{ - - /// - /// Gets the name of the integration. Used to retrieve integration-specific settings. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string IntegrationName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)82); - return IntegrationNameInternal; - } - } - - /// - /// Gets a value indicating whether - /// this integration is enabled. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? Enabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)81); - return EnabledInternal; - } - } - - /// - /// Gets a value indicating whether - /// Analytics are enabled for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)79); - return AnalyticsEnabledInternal; - } - } - - /// - /// Gets a value between 0 and 1 (inclusive) - /// that determines the sampling rate for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double AnalyticsSampleRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)80); - return AnalyticsSampleRateInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs deleted file mode 100644 index 88df5d72cfec..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.ImmutableTracerSettings.g.cs +++ /dev/null @@ -1,288 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial record ImmutableTracerSettings -{ - - /// - /// Gets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)146); - return EnvironmentInternal; - } - } - - /// - /// Gets the service name applied to top-level spans and used to build derived service names. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)156); - return ServiceNameInternal; - } - } - - /// - /// Gets the version tag applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceVersion - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)157); - return ServiceVersionInternal; - } - } - - /// - /// Gets a value indicating whether tracing is enabled. - /// Default is true. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TraceEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)160); - return TraceEnabledInternal; - } - } - - /// - /// Gets the exporter settings that dictate how the tracer exports data. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ImmutableExporterSettings Exporter - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)147); - return ExporterInternal; - } - } - -#pragma warning disable CS1574 // AnalyticsEnabled is obsolete - /// - /// Gets a value indicating whether default Analytics are enabled. - /// Settings this value is a shortcut for setting - /// on some predetermined integrations. - /// See the documentation for more details. - /// - /// -#pragma warning restore CS1574 - [System.Obsolete("App Analytics has been replaced by Tracing without Limits. For more information see https://docs.datadoghq.com/tracing/legacy_app_analytics/")] - [Datadog.Trace.SourceGenerators.PublicApi] - public bool AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)144); - return AnalyticsEnabledInternal; - } - } - - /// - /// Gets a value indicating whether correlation identifiers are - /// automatically injected into the logging context. - /// Default is false. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool LogsInjectionEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)154); - return LogsInjectionEnabledInternal; - } - } - - /// - /// Gets a value indicating the maximum number of traces set to AutoKeep (p1) per second. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int MaxTracesSubmittedPerSecond - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)155); - return MaxTracesSubmittedPerSecondInternal; - } - } - - /// - /// Gets a value indicating custom sampling rules. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? CustomSamplingRules - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)145); - return CustomSamplingRulesInternal; - } - } - - /// - /// Gets a value indicating a global rate for sampling. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double? GlobalSamplingRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)148); - return GlobalSamplingRateInternal; - } - } - - /// - /// Gets a collection of keyed by integration name. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ImmutableIntegrationSettingsCollection Integrations - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)152); - return IntegrationsInternal; - } - } - - /// - /// Gets the global tags, which are applied to all s. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary GlobalTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)149); - return GlobalTagsInternal; - } - } - - /// - /// Gets the map of header keys to tag names, which are applied to the root - /// of incoming and outgoing requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary HeaderTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)151); - return HeaderTagsInternal; - } - } - - /// - /// Gets the map of metadata keys to tag names, which are applied to the root - /// of incoming and outgoing GRPC requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IReadOnlyDictionary GrpcTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)150); - return GrpcTagsInternal; - } - } - - /// - /// Gets a value indicating whether internal metrics - /// are enabled and sent to DogStatsd. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TracerMetricsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)161); - return TracerMetricsEnabledInternal; - } - } - - /// - /// Gets a value indicating whether stats are computed on the tracer side - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StatsComputationEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)159); - return StatsComputationEnabledInternal; - } - } - - /// - /// Gets a value indicating whether a span context should be created on exiting a successful Kafka - /// Consumer.Consume() call, and closed on entering Consumer.Consume(). - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool KafkaCreateConsumerScopeEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)153); - return KafkaCreateConsumerScopeEnabledInternal; - } - } - - /// - /// Gets a value indicating whether the diagnostic log at startup is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StartupDiagnosticLogEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)158); - return StartupDiagnosticLogEnabledInternal; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs deleted file mode 100644 index 6fdf07c83703..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.IntegrationSettings.g.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class IntegrationSettings -{ - - /// - /// Gets the name of the integration. Used to retrieve integration-specific settings. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string IntegrationName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)76); - return IntegrationNameInternal; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether - /// this integration is enabled. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? Enabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)74); - return EnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)75); - EnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether - /// Analytics are enabled for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool? AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)70); - return AnalyticsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)71); - AnalyticsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value between 0 and 1 (inclusive) - /// that determines the sampling rate for this integration. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double AnalyticsSampleRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)72); - return AnalyticsSampleRateInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)73); - AnalyticsSampleRateInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs deleted file mode 100644 index cf5500043409..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.Configuration.TracerSettings.g.cs +++ /dev/null @@ -1,390 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.Configuration; -partial class TracerSettings -{ - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)105); - return EnvironmentInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)106); - EnvironmentInternal = value; - } - } - - /// - /// Gets or sets the service name applied to top-level spans and used to build derived service names. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)124); - return ServiceNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)125); - ServiceNameInternal = value; - } - } - - /// - /// Gets or sets the version tag applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? ServiceVersion - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)126); - return ServiceVersionInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)127); - ServiceVersionInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether tracing is enabled. - /// Default is true. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TraceEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)132); - return TraceEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)133); - TraceEnabledInternal = value; - } - } - - /// - /// Gets or sets the names of disabled integrations. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.HashSet DisabledIntegrationNames - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)103); - return DisabledIntegrationNamesInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)104); - DisabledIntegrationNamesInternal = value; - } - } - - /// - /// Gets or sets the transport settings that dictate how the tracer connects to the agent. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.ExporterSettings Exporter - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)107); - return ExporterInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)108); - ExporterInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether default Analytics are enabled. - /// Settings this value is a shortcut for setting - /// on some predetermined integrations. - /// See the documentation for more details. - /// - /// - [System.Obsolete("App Analytics has been replaced by Tracing without Limits. For more information see https://docs.datadoghq.com/tracing/legacy_app_analytics/")] - [Datadog.Trace.SourceGenerators.PublicApi] - public bool AnalyticsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)97); - return AnalyticsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)98); - AnalyticsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating the maximum number of traces set to AutoKeep (p1) per second. - /// Default is 100. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public int MaxTracesSubmittedPerSecond - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)122); - return MaxTracesSubmittedPerSecondInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)123); - MaxTracesSubmittedPerSecondInternal = value; - } - } - - /// - /// Gets or sets a value indicating custom sampling rules. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? CustomSamplingRules - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)99); - return CustomSamplingRulesInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)100); - CustomSamplingRulesInternal = value; - } - } - - /// - /// Gets or sets a value indicating a global rate for sampling. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public double? GlobalSamplingRate - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)109); - return GlobalSamplingRateInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)110); - GlobalSamplingRateInternal = value; - } - } - - /// - /// Gets a collection of keyed by integration name. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.Configuration.IntegrationSettingsCollection Integrations - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)117); - return IntegrationsInternal; - } - } - - /// - /// Gets or sets the global tags, which are applied to all s. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary GlobalTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)111); - return GlobalTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)112); - GlobalTagsInternal = value; - } - } - - /// - /// Gets or sets the map of header keys to tag names, which are applied to the root - /// of incoming and outgoing HTTP requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary HeaderTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)115); - return HeaderTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)116); - HeaderTagsInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets the map of metadata keys to tag names, which are applied to the root - /// of incoming and outgoing GRPC requests. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public System.Collections.Generic.IDictionary GrpcTags - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)113); - return GrpcTagsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)114); - GrpcTagsInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether internal metrics - /// are enabled and sent to DogStatsd. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool TracerMetricsEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)134); - return TracerMetricsEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)135); - TracerMetricsEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether stats are computed on the tracer side - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StatsComputationEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)130); - return StatsComputationEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)131); - StatsComputationEnabledInternal = value; - } - } - - /// - /// Gets or sets a value indicating whether a span context should be created on exiting a successful Kafka - /// Consumer.Consume() call, and closed on entering Consumer.Consume(). - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool KafkaCreateConsumerScopeEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)118); - return KafkaCreateConsumerScopeEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)119); - KafkaCreateConsumerScopeEnabledInternal = value; - } - } - -#pragma warning disable SA1624 // Documentation summary should begin with "Gets" - the documentation is primarily for public property - /// - /// Gets or sets a value indicating whether the diagnostic log at startup is enabled - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public bool StartupDiagnosticLogEnabled - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)128); - return StartupDiagnosticLogEnabledInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)129); - StartupDiagnosticLogEnabledInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs deleted file mode 100644 index 64cdd48193b0..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/Datadog.Trace.SpanContext.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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 - -namespace Datadog.Trace; -partial class SpanContext -{ - - /// - /// Gets the parent context. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public Datadog.Trace.ISpanContext Parent - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)30); - return ParentInternal; - } - } - - /// - /// Gets the span id of the parent span. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public ulong? ParentId - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)31); - return ParentIdInternal; - } - } - - /// - /// Gets or sets the service name to propagate to child spans. - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)32); - return ServiceNameInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)33); - ServiceNameInternal = value; - } - } -} \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs deleted file mode 100644 index a2185b2e8683..000000000000 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/PublicApiGenerator/GeneratePublicApiAttribute.g.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// 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 - -namespace Datadog.Trace.SourceGenerators; - -/// -/// Used to generate a public property for a decorated field, -/// allowing adding aspect-oriented changes such as telemetry etc. -/// Any documentation added to the field is copied to the public API -/// -[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple = false)] -internal class GeneratePublicApiAttribute : System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// Adds a getter and a setter. - /// - /// Gets the name of the public API used for the property getter - /// Gets the name of the public API used for the property setter - public GeneratePublicApiAttribute( - Datadog.Trace.Telemetry.Metrics.PublicApiUsage getApiUsage, - Datadog.Trace.Telemetry.Metrics.PublicApiUsage setApiUsage) - { - Getter = getApiUsage; - Setter = setApiUsage; - } - - /// - /// Initializes a new instance of the class. - /// Adds a getter only. - /// - /// Gets the name of the public API used for the property getter. If null, no getter will be generated. - public GeneratePublicApiAttribute(Datadog.Trace.Telemetry.Metrics.PublicApiUsage getApiUsage) - { - Getter = getApiUsage; - } - - /// - /// Gets the name of the public API used for the getter - /// - public Datadog.Trace.Telemetry.Metrics.PublicApiUsage Getter { get; } - - /// - /// Gets the name of the public API used for the setter - /// - public Datadog.Trace.Telemetry.Metrics.PublicApiUsage? Setter { get; } -} - -/// -/// A marker attribute added to a public API to indicate it should only be -/// called by consumers. Used by analyzers to confirm we're not calling a public API method. -/// -[System.Diagnostics.Conditional("DEBUG")] -[System.AttributeUsage( - System.AttributeTargets.Field - | System.AttributeTargets.Property - | System.AttributeTargets.Method - | System.AttributeTargets.Constructor)] -internal sealed class PublicApiAttribute : System.Attribute -{ -} diff --git a/tracer/src/Datadog.Trace/Logging/DirectSubmission/Formatting/LogFormatter.cs b/tracer/src/Datadog.Trace/Logging/DirectSubmission/Formatting/LogFormatter.cs index 863d0df27372..029c34137c3c 100644 --- a/tracer/src/Datadog.Trace/Logging/DirectSubmission/Formatting/LogFormatter.cs +++ b/tracer/src/Datadog.Trace/Logging/DirectSubmission/Formatting/LogFormatter.cs @@ -52,7 +52,7 @@ public LogFormatter( _service = string.IsNullOrEmpty(serviceName) ? null : serviceName; _host = string.IsNullOrEmpty(directLogSettings.Host) ? null : directLogSettings.Host; - var globalTags = directLogSettings.GlobalTags is { Count: > 0 } ? directLogSettings.GlobalTags : settings.GlobalTagsInternal; + var globalTags = directLogSettings.GlobalTags is { Count: > 0 } ? directLogSettings.GlobalTags : settings.GlobalTags; Tags = EnrichTagsWithAasMetadata(StringifyGlobalTags(globalTags), aasSettings); _env = string.IsNullOrEmpty(env) ? null : env; diff --git a/tracer/src/Datadog.Trace/PlatformHelpers/AspNetCoreHttpRequestHandler.cs b/tracer/src/Datadog.Trace/PlatformHelpers/AspNetCoreHttpRequestHandler.cs index 6bd65741cec6..4225cbf3520e 100644 --- a/tracer/src/Datadog.Trace/PlatformHelpers/AspNetCoreHttpRequestHandler.cs +++ b/tracer/src/Datadog.Trace/PlatformHelpers/AspNetCoreHttpRequestHandler.cs @@ -74,7 +74,7 @@ private PropagationContext ExtractPropagatedContext(HttpRequest request) private void AddHeaderTagsToSpan(ISpan span, HttpRequest request, Tracer tracer) { - var headerTagsInternal = tracer.Settings.HeaderTagsInternal; + var headerTagsInternal = tracer.Settings.HeaderTags; if (!headerTagsInternal.IsNullOrEmpty()) { @@ -167,7 +167,7 @@ public void StopAspNetCorePipelineScope(Tracer tracer, Security security, Scope } } - span.SetHeaderTags(new HeadersCollectionAdapter(httpContext.Response.Headers), tracer.Settings.HeaderTagsInternal, defaultTagPrefix: SpanContextPropagator.HttpResponseHeadersTagPrefix); + span.SetHeaderTags(new HeadersCollectionAdapter(httpContext.Response.Headers), tracer.Settings.HeaderTags, defaultTagPrefix: SpanContextPropagator.HttpResponseHeadersTagPrefix); if (security.AppsecEnabled) { var transport = SecurityCoordinator.Get(security, span, new SecurityCoordinator.HttpTransport(httpContext)); diff --git a/tracer/src/Datadog.Trace/RemoteConfigurationManagement/RemoteConfigurationManager.cs b/tracer/src/Datadog.Trace/RemoteConfigurationManagement/RemoteConfigurationManager.cs index 24252179f640..666cf1f5d619 100644 --- a/tracer/src/Datadog.Trace/RemoteConfigurationManagement/RemoteConfigurationManager.cs +++ b/tracer/src/Datadog.Trace/RemoteConfigurationManagement/RemoteConfigurationManager.cs @@ -70,7 +70,7 @@ public static RemoteConfigurationManager Create( return new RemoteConfigurationManager( discoveryService, remoteConfigurationApi, - rcmTracer: new RcmClientTracer(settings.RuntimeId, settings.TracerVersion, serviceName, TraceUtil.NormalizeTag(tracerSettings.EnvironmentInternal), tracerSettings.ServiceVersionInternal, tags), + rcmTracer: new RcmClientTracer(settings.RuntimeId, settings.TracerVersion, serviceName, TraceUtil.NormalizeTag(tracerSettings.Environment), tracerSettings.ServiceVersion, tags), pollInterval: settings.PollInterval, gitMetadataTagsProvider, subscriptionManager); @@ -78,15 +78,15 @@ public static RemoteConfigurationManager Create( private static List GetTags(RemoteConfigurationSettings rcmSettings, ImmutableTracerSettings tracerSettings) { - var tags = tracerSettings.GlobalTagsInternal?.Select(pair => pair.Key + ":" + pair.Value).ToList() ?? new List(); + var tags = tracerSettings.GlobalTags?.Select(pair => pair.Key + ":" + pair.Value).ToList() ?? new List(); - var environment = TraceUtil.NormalizeTag(tracerSettings.EnvironmentInternal); + var environment = TraceUtil.NormalizeTag(tracerSettings.Environment); if (!string.IsNullOrEmpty(environment)) { tags.Add($"env:{environment}"); } - var serviceVersion = tracerSettings.ServiceVersionInternal; + var serviceVersion = tracerSettings.ServiceVersion; if (!string.IsNullOrEmpty(serviceVersion)) { tags.Add($"version:{serviceVersion}"); diff --git a/tracer/src/Datadog.Trace/Span.cs b/tracer/src/Datadog.Trace/Span.cs index fc4c5d2d8a8c..a1ec204a9d64 100644 --- a/tracer/src/Datadog.Trace/Span.cs +++ b/tracer/src/Datadog.Trace/Span.cs @@ -76,10 +76,10 @@ internal Span(SpanContext context, DateTimeOffset? start, ITags tags) /// internal string ServiceName { - get => Context.ServiceNameInternal; + get => Context.ServiceName; set { - Context.ServiceNameInternal = value; + Context.ServiceName = value; } } @@ -127,11 +127,11 @@ internal bool IsFinished internal bool IsRootSpan => Context.TraceContext?.RootSpan == this; - internal bool IsTopLevel => Context.ParentInternal == null - || Context.ParentInternal.SpanId == 0 - || Context.ParentInternal switch + internal bool IsTopLevel => Context.Parent == null + || Context.Parent.SpanId == 0 + || Context.Parent switch { - SpanContext s => s.ServiceNameInternal != ServiceName, + SpanContext s => s.ServiceName != ServiceName, { } s => s.ServiceName != ServiceName, }; @@ -156,7 +156,7 @@ public override string ToString() sb.AppendLine($"TraceId64: {Context.TraceId128.Lower}"); sb.AppendLine($"TraceId128: {Context.TraceId128}"); sb.AppendLine($"RawTraceId: {Context.RawTraceId}"); - sb.AppendLine($"ParentId: {Context.ParentIdInternal}"); + sb.AppendLine($"ParentId: {Context.ParentId}"); sb.AppendLine($"SpanId: {Context.SpanId}"); sb.AppendLine($"RawSpanId: {Context.RawSpanId}"); sb.AppendLine($"Origin: {Context.Origin}"); @@ -524,7 +524,7 @@ private void WriteCtorDebugMessage() Log.Debug( "Span started: [s_id: {SpanId}, p_id: {ParentId}, t_id: {TraceId}] with Tags: [{Tags}], Tags Type: [{TagsType}])", - new object[] { Context.RawSpanId, Context.ParentIdInternal, Context.RawTraceId, Tags, tagsType }); + new object[] { Context.RawSpanId, Context.ParentId, Context.RawTraceId, Tags, tagsType }); } [MethodImpl(MethodImplOptions.NoInlining)] @@ -532,7 +532,7 @@ private void WriteCloseDebugMessage() { Log.Debug( "Span closed: [s_id: {SpanId}, p_id: {ParentId}, t_id: {TraceId}] for (Service: {ServiceName}, Resource: {ResourceName}, Operation: {OperationName}, Tags: [{Tags}])\nDetails:{ToString}", - new object[] { Context.RawSpanId, Context.ParentIdInternal, Context.RawTraceId, ServiceName, ResourceName, OperationName, Tags, ToString() }); + new object[] { Context.RawSpanId, Context.ParentId, Context.RawTraceId, ServiceName, ResourceName, OperationName, Tags, ToString() }); } /// diff --git a/tracer/src/Datadog.Trace/SpanContext.cs b/tracer/src/Datadog.Trace/SpanContext.cs index 705c2c3f1742..63236b61ef3a 100644 --- a/tracer/src/Datadog.Trace/SpanContext.cs +++ b/tracer/src/Datadog.Trace/SpanContext.cs @@ -55,7 +55,7 @@ public partial class SpanContext : ISpanContext, IReadOnlyDictionary /// Initializes a new instance of the class - /// from a propagated context. will be null + /// from a propagated context. will be null /// since this is a root context locally. /// /// The propagated trace id. @@ -76,7 +76,7 @@ public SpanContext(ulong? traceId, ulong spanId, SamplingPriority? samplingPrior /// /// Initializes a new instance of the class - /// from a propagated context. will be null + /// from a propagated context. will be null /// since this is a root context locally. /// /// The propagated trace id. @@ -96,7 +96,7 @@ internal SpanContext(TraceId traceId, ulong spanId, int? samplingPriority, strin /// /// Initializes a new instance of the class - /// from a propagated context. will be null + /// from a propagated context. will be null /// since this is a root context locally. /// /// The propagated trace id. @@ -138,7 +138,7 @@ internal SpanContext(ISpanContext parent, TraceContext traceContext, string serv var useAllBits = traceContext?.Tracer?.Settings?.TraceId128BitGenerationEnabled ?? true; SpanId = spanId > 0 ? spanId : RandomIdGenerator.Shared.NextSpanId(useAllBits); - ParentInternal = parent; + Parent = parent; TraceContext = traceContext; if (parent is SpanContext spanContext) @@ -161,7 +161,7 @@ private SpanContext(TraceId traceId, string serviceName) ? RandomIdGenerator.Shared.NextTraceId(useAllBits: false) : traceId; - ServiceNameInternal = serviceName; + ServiceName = serviceName; // Because we have a ctor as part of the public api without accepting the origin tag, // we need to ensure new SpanContext created by this .ctor has the CI Visibility origin @@ -176,8 +176,7 @@ private SpanContext(TraceId traceId, string serviceName) /// /// Gets the parent context. /// - [GeneratePublicApi(PublicApiUsage.SpanContext_Parent_Get)] - internal ISpanContext ParentInternal { get; } + public ISpanContext Parent { get; } /// /// Gets the 128-bit trace id. @@ -193,8 +192,7 @@ private SpanContext(TraceId traceId, string serviceName) /// /// Gets the span id of the parent span. /// - [GeneratePublicApi(PublicApiUsage.SpanContext_ParentId_Get)] - internal ulong? ParentIdInternal => ParentInternal?.SpanId; + public ulong? ParentId => Parent?.SpanId; /// /// Gets the span id. @@ -204,8 +202,7 @@ private SpanContext(TraceId traceId, string serviceName) /// /// Gets or sets the service name to propagate to child spans. /// - [GeneratePublicApi(PublicApiUsage.SpanContext_ServiceName_Get, PublicApiUsage.SpanContext_ServiceName_Set)] - internal string ServiceNameInternal { get; set; } + public string ServiceName { get; set; } /// /// Gets or sets the origin of the trace. diff --git a/tracer/src/Datadog.Trace/Telemetry/Collectors/ApplicationTelemetryCollector.cs b/tracer/src/Datadog.Trace/Telemetry/Collectors/ApplicationTelemetryCollector.cs index 2609be77531a..4f8961764491 100644 --- a/tracer/src/Datadog.Trace/Telemetry/Collectors/ApplicationTelemetryCollector.cs +++ b/tracer/src/Datadog.Trace/Telemetry/Collectors/ApplicationTelemetryCollector.cs @@ -33,8 +33,8 @@ public void RecordTracerSettings( var frameworkDescription = FrameworkDescription.Instance; var application = new ApplicationTelemetryData( serviceName: defaultServiceName, - env: tracerSettings.EnvironmentInternal ?? string.Empty, // required, but we don't have it - serviceVersion: tracerSettings.ServiceVersionInternal ?? string.Empty, // required, but we don't have it + env: tracerSettings.Environment ?? string.Empty, // required, but we don't have it + serviceVersion: tracerSettings.ServiceVersion ?? string.Empty, // required, but we don't have it tracerVersion: TracerConstants.AssemblyVersion, languageName: TracerConstants.Language, languageVersion: frameworkDescription.ProductVersion, diff --git a/tracer/src/Datadog.Trace/Telemetry/Collectors/IntegrationTelemetryCollector.cs b/tracer/src/Datadog.Trace/Telemetry/Collectors/IntegrationTelemetryCollector.cs index 38c148db9ec3..e56e61caf229 100644 --- a/tracer/src/Datadog.Trace/Telemetry/Collectors/IntegrationTelemetryCollector.cs +++ b/tracer/src/Datadog.Trace/Telemetry/Collectors/IntegrationTelemetryCollector.cs @@ -32,10 +32,10 @@ public IntegrationTelemetryCollector() public void RecordTracerSettings(ImmutableTracerSettings settings) { - for (var i = 0; i < settings.IntegrationsInternal.Settings.Length; i++) + for (var i = 0; i < settings.Integrations.Settings.Length; i++) { - var integration = settings.IntegrationsInternal.Settings[i]; - if (integration.EnabledInternal == false) + var integration = settings.Integrations.Settings[i]; + if (integration.Enabled == false) { _integrationsById[i].WasExplicitlyDisabled = 1; } diff --git a/tracer/src/Datadog.Trace/Telemetry/TelemetryFactory.cs b/tracer/src/Datadog.Trace/Telemetry/TelemetryFactory.cs index 99596c18b164..8ad05b43e946 100644 --- a/tracer/src/Datadog.Trace/Telemetry/TelemetryFactory.cs +++ b/tracer/src/Datadog.Trace/Telemetry/TelemetryFactory.cs @@ -80,7 +80,7 @@ public ITelemetryController CreateTelemetryController(ImmutableTracerSettings tr try { - var telemetryTransports = TelemetryTransportFactory.Create(settings, tracerSettings.ExporterInternal); + var telemetryTransports = TelemetryTransportFactory.Create(settings, tracerSettings.Exporter); if (!telemetryTransports.HasTransports) { diff --git a/tracer/src/Datadog.Trace/TraceContext.cs b/tracer/src/Datadog.Trace/TraceContext.cs index bb3afd6481dc..4efb42b5486b 100644 --- a/tracer/src/Datadog.Trace/TraceContext.cs +++ b/tracer/src/Datadog.Trace/TraceContext.cs @@ -55,8 +55,8 @@ public TraceContext(IDatadogTracer tracer, TraceTagCollection? tags = null) if (tracer.Settings is { } settings) { // these could be set from DD_ENV/DD_VERSION or from DD_TAGS - Environment = settings.EnvironmentInternal; - ServiceVersion = settings.ServiceVersionInternal; + Environment = settings.Environment; + ServiceVersion = settings.ServiceVersion; } Tracer = tracer; @@ -147,7 +147,7 @@ public void AddSpan(Span span) public void CloseSpan(Span span) { - bool ShouldTriggerPartialFlush() => Tracer.Settings.ExporterInternal.PartialFlushEnabledInternal && _spans.Count >= Tracer.Settings.ExporterInternal.PartialFlushMinSpansInternal; + bool ShouldTriggerPartialFlush() => Tracer.Settings.Exporter.PartialFlushEnabled && _spans.Count >= Tracer.Settings.Exporter.PartialFlushMinSpans; ArraySegment spansToWrite = default; diff --git a/tracer/src/Datadog.Trace/Tracer.cs b/tracer/src/Datadog.Trace/Tracer.cs index c7d03b08d5fa..cbd039869eee 100644 --- a/tracer/src/Datadog.Trace/Tracer.cs +++ b/tracer/src/Datadog.Trace/Tracer.cs @@ -393,7 +393,7 @@ public Task ForceFlushAsync() /// The collection to write. void IDatadogTracer.Write(ArraySegment trace) { - if (Settings.TraceEnabledInternal || Settings.AzureAppServiceMetadata?.CustomTracingEnabled is true) + if (Settings.TraceEnabled || Settings.AzureAppServiceMetadata?.CustomTracingEnabled is true) { TracerManager.WriteTrace(trace); } @@ -533,12 +533,12 @@ internal Span StartSpan(string operationName, ITags tags = null, ISpanContext pa }; // Apply any global tags - if (Settings.GlobalTagsInternal.Count > 0) + if (Settings.GlobalTags.Count > 0) { // if DD_TAGS contained "env", "version", "git.commit.sha", or "git.repository.url", they were used to set // ImmutableTracerSettings.Environment, ImmutableTracerSettings.ServiceVersion, ImmutableTracerSettings.GitCommitSha, and ImmutableTracerSettings.GitRepositoryUrl // and removed from Settings.GlobalTags - foreach (var entry in Settings.GlobalTagsInternal) + foreach (var entry in Settings.GlobalTags) { span.SetTag(entry.Key, entry.Value); } diff --git a/tracer/src/Datadog.Trace/TracerManager.cs b/tracer/src/Datadog.Trace/TracerManager.cs index e506f2b006dc..905a88e5adc3 100644 --- a/tracer/src/Datadog.Trace/TracerManager.cs +++ b/tracer/src/Datadog.Trace/TracerManager.cs @@ -313,7 +313,7 @@ private static async Task WriteDiagnosticLog(TracerManager instance) // In AAS, the trace agent is deployed alongside the tracer and managed by the tracer // Disable this check as it may hit the trace agent before it is ready to receive requests and give false negatives // Also disable if tracing is not enabled (as likely to be in an environment where agent is not available) - if (instanceSettings.TraceEnabledInternal && !instanceSettings.IsRunningInAzureAppService) + if (instanceSettings.TraceEnabled && !instanceSettings.IsRunningInAzureAppService) { try { @@ -377,42 +377,42 @@ void WriteDictionary(IReadOnlyDictionary dictionary) writer.WriteValue(FrameworkDescription.Instance.ProductVersion); writer.WritePropertyName("env"); - writer.WriteValue(instanceSettings.EnvironmentInternal); + writer.WriteValue(instanceSettings.Environment); writer.WritePropertyName("enabled"); - writer.WriteValue(instanceSettings.TraceEnabledInternal); + writer.WriteValue(instanceSettings.TraceEnabled); writer.WritePropertyName("service"); writer.WriteValue(instance.DefaultServiceName); writer.WritePropertyName("agent_url"); - writer.WriteValue(instanceSettings.ExporterInternal.AgentUriInternal); + writer.WriteValue(instanceSettings.Exporter.AgentUri); writer.WritePropertyName("agent_transport"); - writer.WriteValue(instanceSettings.ExporterInternal.TracesTransport.ToString()); + writer.WriteValue(instanceSettings.Exporter.TracesTransport.ToString()); writer.WritePropertyName("debug"); writer.WriteValue(GlobalSettings.Instance.DebugEnabledInternal); writer.WritePropertyName("health_checks_enabled"); - writer.WriteValue(instanceSettings.TracerMetricsEnabledInternal); + writer.WriteValue(instanceSettings.TracerMetricsEnabled); #pragma warning disable 618 // App analytics is deprecated, but still used writer.WritePropertyName("analytics_enabled"); - writer.WriteValue(instanceSettings.AnalyticsEnabledInternal); + writer.WriteValue(instanceSettings.AnalyticsEnabled); #pragma warning restore 618 writer.WritePropertyName("sample_rate"); - writer.WriteValue(instanceSettings.GlobalSamplingRateInternal); + writer.WriteValue(instanceSettings.GlobalSamplingRate); writer.WritePropertyName("sampling_rules"); - writer.WriteValue(instanceSettings.CustomSamplingRulesInternal); + writer.WriteValue(instanceSettings.CustomSamplingRules); writer.WritePropertyName("tags"); - WriteDictionary(instanceSettings.GlobalTagsInternal); + WriteDictionary(instanceSettings.GlobalTags); writer.WritePropertyName("log_injection_enabled"); - writer.WriteValue(instanceSettings.LogsInjectionEnabledInternal); + writer.WriteValue(instanceSettings.LogsInjectionEnabled); writer.WritePropertyName("runtime_metrics_enabled"); writer.WriteValue(instanceSettings.RuntimeMetricsEnabled); @@ -424,11 +424,11 @@ void WriteDictionary(IReadOnlyDictionary dictionary) // lists them whether they were explicitly disabled with // DD_DISABLED_INTEGRATIONS, DD_TRACE_{0}_ENABLED, DD_{0}_ENABLED, // or manually in code. - foreach (var integration in instanceSettings.IntegrationsInternal.Settings) + foreach (var integration in instanceSettings.Integrations.Settings) { - if (integration.EnabledInternal == false) + if (integration.Enabled == false) { - writer.WriteValue(integration.IntegrationNameInternal); + writer.WriteValue(integration.IntegrationName); } } @@ -456,10 +456,10 @@ void WriteDictionary(IReadOnlyDictionary dictionary) } writer.WritePropertyName("partialflush_enabled"); - writer.WriteValue(instanceSettings.ExporterInternal.PartialFlushEnabledInternal); + writer.WriteValue(instanceSettings.Exporter.PartialFlushEnabled); writer.WritePropertyName("partialflush_minspans"); - writer.WriteValue(instanceSettings.ExporterInternal.PartialFlushMinSpansInternal); + writer.WriteValue(instanceSettings.Exporter.PartialFlushMinSpans); writer.WritePropertyName("runtime_id"); writer.WriteValue(Tracer.RuntimeId); @@ -503,7 +503,7 @@ void WriteDictionary(IReadOnlyDictionary dictionary) writer.WritePropertyName("exporter_settings_warning"); writer.WriteStartArray(); - foreach (var warning in instanceSettings.ExporterInternal.ValidationWarnings) + foreach (var warning in instanceSettings.Exporter.ValidationWarnings) { writer.WriteValue(warning); } @@ -532,7 +532,7 @@ void WriteDictionary(IReadOnlyDictionary dictionary) writer.WriteValue(instanceSettings.SpanSamplingRules); writer.WritePropertyName("stats_computation_enabled"); - writer.WriteValue(instanceSettings.StatsComputationEnabledInternal); + writer.WriteValue(instanceSettings.StatsComputationEnabled); writer.WritePropertyName("dbm_propagation_mode"); writer.WriteValue(instanceSettings.DbmPropagationMode.ToString()); @@ -541,7 +541,7 @@ void WriteDictionary(IReadOnlyDictionary dictionary) writer.WriteValue(instanceSettings.IsRemoteConfigurationAvailable); writer.WritePropertyName("header_tags"); - WriteDictionary(instanceSettings.HeaderTagsInternal); + WriteDictionary(instanceSettings.HeaderTags); writer.WritePropertyName("service_mapping"); WriteDictionary(instanceSettings.ServiceNameMappings); @@ -649,7 +649,7 @@ private static TracerManager CreateInitializedTracer(ImmutableTracerSettings set OneTimeSetup(); } - if (newManager.Settings.StartupDiagnosticLogEnabledInternal) + if (newManager.Settings.StartupDiagnosticLogEnabled) { _ = Task.Run(() => WriteDiagnosticLog(newManager)); } @@ -729,7 +729,7 @@ private static void HeartbeatCallback(object state) // use the count of Tracer instances as the heartbeat value // to estimate the number of "live" Tracers than can potentially // send traces to the Agent - if (_instance?.Settings.TracerMetricsEnabledInternal == true) + if (_instance?.Settings.TracerMetricsEnabled == true) { _instance?.Statsd?.Gauge(TracerMetricNames.Health.Heartbeat, Tracer.LiveTracerCount); } diff --git a/tracer/src/Datadog.Trace/TracerManagerFactory.cs b/tracer/src/Datadog.Trace/TracerManagerFactory.cs index 202f2cbf3c2d..655d36df3ab9 100644 --- a/tracer/src/Datadog.Trace/TracerManagerFactory.cs +++ b/tracer/src/Datadog.Trace/TracerManagerFactory.cs @@ -67,7 +67,7 @@ internal TracerManager CreateTracerManager(ImmutableTracerSettings settings, Tra { if (Profiler.Instance.Status.IsProfilerReady) { - NativeInterop.SetApplicationInfoForAppDomain(RuntimeId.Get(), tracer.DefaultServiceName, tracer.Settings.EnvironmentInternal, tracer.Settings.ServiceVersionInternal); + NativeInterop.SetApplicationInfoForAppDomain(RuntimeId.Get(), tracer.DefaultServiceName, tracer.Settings.Environment, tracer.Settings.ServiceVersion); } } catch (Exception ex) @@ -102,7 +102,7 @@ internal TracerManager CreateTracerManager( { settings ??= new ImmutableTracerSettings(TracerSettings.FromDefaultSourcesInternal(), true); - var defaultServiceName = settings.ServiceNameInternal ?? + var defaultServiceName = settings.ServiceName ?? GetApplicationName(settings) ?? UnknownServiceName; @@ -110,11 +110,11 @@ internal TracerManager CreateTracerManager( bool runtimeMetricsEnabled = settings.RuntimeMetricsEnabled && !DistributedTracer.Instance.IsChildTracer; - statsd = (settings.TracerMetricsEnabledInternal || runtimeMetricsEnabled) + statsd = (settings.TracerMetricsEnabled || runtimeMetricsEnabled) ? (statsd ?? CreateDogStatsdClient(settings, defaultServiceName)) : null; sampler ??= GetSampler(settings); - agentWriter ??= GetAgentWriter(settings, settings.TracerMetricsEnabledInternal ? statsd : null, rates => sampler.SetDefaultSampleRates(rates), discoveryService); + agentWriter ??= GetAgentWriter(settings, settings.TracerMetricsEnabled ? statsd : null, rates => sampler.SetDefaultSampleRates(rates), discoveryService); scopeManager ??= new AsyncLocalScopeManager(); if (runtimeMetricsEnabled) @@ -135,8 +135,8 @@ internal TracerManager CreateTracerManager( settings.LogSubmissionSettings, settings.AzureAppServiceMetadata, defaultServiceName, - settings.EnvironmentInternal, - settings.ServiceVersionInternal, + settings.Environment, + settings.ServiceVersion, gitMetadataTagsProvider); telemetry.RecordTracerSettings(settings, defaultServiceName); @@ -161,10 +161,10 @@ internal TracerManager CreateTracerManager( var sw = Stopwatch.StartNew(); var rcmSettings = RemoteConfigurationSettings.FromDefaultSource(); - var rcmApi = RemoteConfigurationApiFactory.Create(settings.ExporterInternal, rcmSettings, discoveryService); + var rcmApi = RemoteConfigurationApiFactory.Create(settings.Exporter, rcmSettings, discoveryService); // Service Name must be lowercase, otherwise the agent will not be able to find the service - var serviceName = TraceUtil.NormalizeTag(settings.ServiceNameInternal ?? defaultServiceName); + var serviceName = TraceUtil.NormalizeTag(settings.ServiceName ?? defaultServiceName); remoteConfigurationManager = RemoteConfigurationManager.Create( @@ -180,7 +180,7 @@ internal TracerManager CreateTracerManager( } dynamicConfigurationManager ??= new DynamicConfigurationManager(RcmSubscriptionManager.Instance); - tracerFlareManager ??= new TracerFlareManager(discoveryService, RcmSubscriptionManager.Instance, telemetry, TracerFlareApi.Create(settings.ExporterInternal)); + tracerFlareManager ??= new TracerFlareManager(discoveryService, RcmSubscriptionManager.Instance, telemetry, TracerFlareApi.Create(settings.Exporter)); } else { @@ -270,10 +270,10 @@ protected virtual ITraceSampler GetSampler(ImmutableTracerSettings settings) return samplerStandalone; } - var sampler = new TraceSampler(new TracerRateLimiter(maxTracesPerInterval: settings.MaxTracesSubmittedPerSecondInternal, intervalMilliseconds: null)); + var sampler = new TraceSampler(new TracerRateLimiter(maxTracesPerInterval: settings.MaxTracesSubmittedPerSecond, intervalMilliseconds: null)); // sampling rules (remote value overrides local value) - var samplingRulesJson = settings.CustomSamplingRulesInternal; + var samplingRulesJson = settings.CustomSamplingRules; // check if the rules are remote or local because they have different JSON schemas if (settings.CustomSamplingRulesIsRemote) @@ -307,14 +307,14 @@ protected virtual ITraceSampler GetSampler(ImmutableTracerSettings settings) } // global sampling rate (remote value overrides local value) - if (settings.GlobalSamplingRateInternal is { } globalSamplingRate) + if (settings.GlobalSamplingRate is { } globalSamplingRate) { if (globalSamplingRate is < 0f or > 1f) { Log.Warning( "{ConfigurationKey} configuration of {ConfigurationValue} is out of range", ConfigurationKeys.GlobalSamplingRate, - settings.GlobalSamplingRateInternal); + settings.GlobalSamplingRate); } else { @@ -341,8 +341,8 @@ protected virtual ISpanSampler GetSpanSampler(ImmutableTracerSettings settings) protected virtual IAgentWriter GetAgentWriter(ImmutableTracerSettings settings, IDogStatsd statsd, Action> updateSampleRates, IDiscoveryService discoveryService) { - var apiRequestFactory = TracesTransportStrategy.Get(settings.ExporterInternal); - var api = new Api(apiRequestFactory, statsd, updateSampleRates, settings.ExporterInternal.PartialFlushEnabledInternal); + var apiRequestFactory = TracesTransportStrategy.Get(settings.Exporter); + var api = new Api(apiRequestFactory, statsd, updateSampleRates, settings.Exporter.PartialFlushEnabled); var statsAggregator = StatsAggregator.Create(api, settings, discoveryService); @@ -350,7 +350,7 @@ protected virtual IAgentWriter GetAgentWriter(ImmutableTracerSettings settings, } protected virtual IDiscoveryService GetDiscoveryService(ImmutableTracerSettings settings) - => DiscoveryService.Create(settings.ExporterInternal); + => DiscoveryService.Create(settings.Exporter); internal static IDogStatsd CreateDogStatsdClient(ImmutableTracerSettings settings, string serviceName, List constantTags, string prefix = null) { @@ -363,27 +363,27 @@ internal static IDogStatsd CreateDogStatsdClient(ImmutableTracerSettings setting Prefix = prefix, // note that if these are null, statsd tries to grab them directly from the environment, which could be unsafe ServiceName = NormalizerTraceProcessor.NormalizeService(serviceName), - Environment = settings.EnvironmentInternal, - ServiceVersion = settings.ServiceVersionInternal, + Environment = settings.Environment, + ServiceVersion = settings.ServiceVersion, Advanced = { TelemetryFlushInterval = null } }; - switch (settings.ExporterInternal.MetricsTransport) + switch (settings.Exporter.MetricsTransport) { case MetricsTransportType.NamedPipe: - config.PipeName = settings.ExporterInternal.MetricsPipeNameInternal; + config.PipeName = settings.Exporter.MetricsPipeName; Log.Information("Using windows named pipes for metrics transport: {PipeName}.", config.PipeName); break; #if NETCOREAPP3_1_OR_GREATER case MetricsTransportType.UDS: - config.StatsdServerName = $"{ExporterSettings.UnixDomainSocketPrefix}{settings.ExporterInternal.MetricsUnixDomainSocketPathInternal}"; + config.StatsdServerName = $"{ExporterSettings.UnixDomainSocketPrefix}{settings.Exporter.MetricsUnixDomainSocketPath}"; Log.Information("Using unix domain sockets for metrics transport: {Socket}.", config.StatsdServerName); break; #endif case MetricsTransportType.UDP: default: - config.StatsdServerName = settings.ExporterInternal.MetricsHostname; - config.StatsdPort = settings.ExporterInternal.DogStatsdPortInternal; + config.StatsdServerName = settings.Exporter.MetricsHostname; + config.StatsdPort = settings.Exporter.DogStatsdPort; Log.Information("Using UDP for metrics transport: {Hostname}:{Port}.", config.StatsdServerName, config.StatsdPort); break; } @@ -400,7 +400,7 @@ internal static IDogStatsd CreateDogStatsdClient(ImmutableTracerSettings setting private static IDogStatsd CreateDogStatsdClient(ImmutableTracerSettings settings, string serviceName) { - var customTagCount = settings.GlobalTagsInternal.Count; + var customTagCount = settings.GlobalTags.Count; var constantTags = new List(5 + customTagCount) { "lang:.NET", @@ -413,7 +413,7 @@ private static IDogStatsd CreateDogStatsdClient(ImmutableTracerSettings settings if (customTagCount > 0) { var tagProcessor = new TruncatorTagsProcessor(); - foreach (var kvp in settings.GlobalTagsInternal) + foreach (var kvp in settings.GlobalTags) { var key = kvp.Key; var value = kvp.Value; diff --git a/tracer/src/Datadog.Trace/Util/PublicApiAttribute.cs b/tracer/src/Datadog.Trace/Util/PublicApiAttribute.cs new file mode 100644 index 000000000000..7947109ef8bf --- /dev/null +++ b/tracer/src/Datadog.Trace/Util/PublicApiAttribute.cs @@ -0,0 +1,22 @@ +// +// 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 + +namespace Datadog.Trace.SourceGenerators; + +/// +/// A marker attribute added to a public API to indicate it should only be +/// called by consumers. Used by analyzers to confirm we're not calling a public API method. +/// +[System.Diagnostics.Conditional("DEBUG")] +[System.AttributeUsage( + System.AttributeTargets.Field + | System.AttributeTargets.Property + | System.AttributeTargets.Method + | System.AttributeTargets.Constructor)] +internal sealed class PublicApiAttribute : System.Attribute +{ +} diff --git a/tracer/test/Datadog.Trace.Security.Unit.Tests/StandaloneASMBillingTests.cs b/tracer/test/Datadog.Trace.Security.Unit.Tests/StandaloneASMBillingTests.cs index 7fa53c754397..81370bf8e26d 100644 --- a/tracer/test/Datadog.Trace.Security.Unit.Tests/StandaloneASMBillingTests.cs +++ b/tracer/test/Datadog.Trace.Security.Unit.Tests/StandaloneASMBillingTests.cs @@ -37,6 +37,6 @@ public void GivenAppsecStandaloneEnabledSettings_WhenEnabled_StatsComputationIsD // Should ignore the configuration set by the customer Assert.False(tracerSettings.StatsComputationEnabled); - Assert.False(tracerSettings.StatsComputationEnabledInternal); + Assert.False(tracerSettings.StatsComputationEnabled); } } diff --git a/tracer/test/Datadog.Trace.SourceGenerators.Tests/PublicApiGeneratorTests.cs b/tracer/test/Datadog.Trace.SourceGenerators.Tests/PublicApiGeneratorTests.cs deleted file mode 100644 index 9431a08505b4..000000000000 --- a/tracer/test/Datadog.Trace.SourceGenerators.Tests/PublicApiGeneratorTests.cs +++ /dev/null @@ -1,467 +0,0 @@ -// -// 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 Datadog.Trace.SourceGenerators.PublicApi; -using Datadog.Trace.SourceGenerators.PublicApi.Diagnostics; -using FluentAssertions; -using FluentAssertions.Execution; -using Xunit; - -namespace Datadog.Trace.SourceGenerators.Tests; - -public class PublicApiGeneratorTests -{ - [Theory] - [InlineData("=> null;")] - [InlineData("{ get; }")] - [InlineData("{ get; } = null;")] - public void CanGenerateReadOnlyProperty(string definition) - { - var input = $$""" - using Datadog.Trace.Configuration; - using Datadog.Trace.SourceGenerators; - using Datadog.Trace.Telemetry.Metrics; - - #nullable enable - namespace MyTests.TestMetricNameSpace; - public partial class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.Environment_Get)] - internal string? _Environment {{definition}} - } - """; - - const string expected = Constants.FileHeader + """ - namespace MyTests.TestMetricNameSpace; - partial class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)0); - return _Environment; - } - } - } - """; - - var (diagnostics, output) = TestHelpers.GetGeneratedOutput(input, GetPublicApiAttribute()); - using var scope = new AssertionScope(); - diagnostics.Should().BeEmpty(); - output.Should().Be(expected); - } - - [Theory] - [InlineData("GeneratePublicApi")] - [InlineData("GeneratePublicApiAttribute")] - [InlineData("Datadog.Trace.SourceGenerators.GeneratePublicApiAttribute")] - public void CanGenerateReadWriteProperty(string attributeName) - { - var input = $$""" - using Datadog.Trace.Configuration; - using Datadog.Trace.SourceGenerators; - using Datadog.Trace.Telemetry.Metrics; - - #nullable enable - namespace MyTests.TestMetricNameSpace; - public partial class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [{{attributeName}}(PublicApiUsage.Environment_Get, PublicApiUsage.Environment_Set)] - internal string? _Environment { get; set; } - } - """; - - const string expected = Constants.FileHeader + """ - namespace MyTests.TestMetricNameSpace; - partial class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)0); - return _Environment; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)1); - _Environment = value; - } - } - } - """; - - var (diagnostics, output) = TestHelpers.GetGeneratedOutput(input, GetPublicApiAttribute()); - using var scope = new AssertionScope(); - diagnostics.Should().BeEmpty(); - output.Should().Be(expected); - } - - [Fact] - public void CanGenerateMultipleProperties() - { - const string input = """ - using Datadog.Trace.Configuration; - using Datadog.Trace.SourceGenerators; - using Datadog.Trace.Telemetry.Metrics; - - #nullable enable - namespace MyTests.TestMetricNameSpace; - public partial class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.Environment_Get, PublicApiUsage.Environment_Set)] - internal string? _Environment { get; set; } - - /// - /// Gets the default service name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.ServiceName_Get)] - internal HashSet ServiceNameInternal { get; } - } - """; - - const string expected = Constants.FileHeader + """ - namespace MyTests.TestMetricNameSpace; - partial class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public string? Environment - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)0); - return _Environment; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)1); - _Environment = value; - } - } - - /// - /// Gets the default service name applied to all spans. - /// - /// - [Datadog.Trace.SourceGenerators.PublicApi] - public HashSet ServiceName - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)2); - return ServiceNameInternal; - } - } - } - """; - - var (diagnostics, output) = TestHelpers.GetGeneratedOutput(input, GetPublicApiAttribute()); - using var scope = new AssertionScope(); - diagnostics.Should().BeEmpty(); - output.Should().Be(expected); - } - - [Theory] - [InlineData("Obsolete")] - [InlineData("ObsoleteAttribute")] - [InlineData("System.Obsolete")] - public void CanHandleObsoleteProperties(string obsoleteAttribute) - { - var input = $$""" - using System; - using Datadog.Trace.Configuration; - using Datadog.Trace.SourceGenerators; - using Datadog.Trace.Telemetry.Metrics; - - #nullable enable - namespace MyTests.TestMetricNameSpace; - public partial class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.Environment_Get, PublicApiUsage.Environment_Set)] - [{{obsoleteAttribute}}] - internal string? NoArgsInternal { get; set; } - - /// - /// Gets the default service name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.Environment_Get, PublicApiUsage.Environment_Set)] - [{{obsoleteAttribute}}("some reason")] - internal string? OneArgInternal { get; set; } - - /// - /// Gets the default service name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.Environment_Get, PublicApiUsage.Environment_Set)] - [{{obsoleteAttribute}}(Reason)] - internal string? OneArg2Internal { get; set; } - - /// - /// Gets the default service name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.Environment_Get, PublicApiUsage.Environment_Set)] - [{{obsoleteAttribute}}("some reason", true)] - internal string? TwoArgsInternal { get; set; } - - private const string Reason = "some reason"; - } - """; - - var expected = Constants.FileHeader + """ - namespace MyTests.TestMetricNameSpace; - partial class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [System.Obsolete] - [Datadog.Trace.SourceGenerators.PublicApi] - public string? NoArgs - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)0); - return NoArgsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)1); - NoArgsInternal = value; - } - } - - /// - /// Gets the default service name applied to all spans. - /// - /// - [System.Obsolete("some reason")] - [Datadog.Trace.SourceGenerators.PublicApi] - public string? OneArg - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)0); - return OneArgInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)1); - OneArgInternal = value; - } - } - - /// - /// Gets the default service name applied to all spans. - /// - /// - [System.Obsolete("some reason")] - [Datadog.Trace.SourceGenerators.PublicApi] - public string? OneArg2 - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)0); - return OneArg2Internal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)1); - OneArg2Internal = value; - } - } - - /// - /// Gets the default service name applied to all spans. - /// - /// - [System.Obsolete("some reason")] - [Datadog.Trace.SourceGenerators.PublicApi] - public string? TwoArgs - { - get - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)0); - return TwoArgsInternal; - } - set - { - Datadog.Trace.Telemetry.TelemetryFactory.Metrics.Record( - (Datadog.Trace.Telemetry.Metrics.PublicApiUsage)1); - TwoArgsInternal = value; - } - } - } - """; - - var (diagnostics, output) = TestHelpers.GetGeneratedOutput(input, GetPublicApiAttribute()); - using var scope = new AssertionScope(); - diagnostics.Should().BeEmpty(); - output.Should().Be(expected); - } - - [Theory] - [InlineData("struct")] - [InlineData("record struct")] - public void CanNotGenerateForStruct(string type) - { - var input = $$""" - using Datadog.Trace.Configuration; - using Datadog.Trace.SourceGenerators; - using Datadog.Trace.Telemetry.Metrics; - - #nullable enable - namespace MyTests.TestMetricNameSpace; - public partial {{type}} TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.Environment_Get, PublicApiUsage.Environment_Set)] - internal string? _Environment { get; set; } - } - """; - - var (diagnostics, output) = TestHelpers.GetGeneratedOutput(input, GetPublicApiAttribute()); - Assert.Contains(diagnostics, diag => diag.Id == OnlySupportsClassesDiagnostic.Id); - } - - [Theory] - [InlineData("=> null;")] - [InlineData("{ get; }")] - [InlineData("{ get; } = null;")] - public void CanNotGenerateSetterForReadOnlyProperty(string definition) - { - var input = $$""" - using Datadog.Trace.Configuration; - using Datadog.Trace.SourceGenerators; - using Datadog.Trace.Telemetry.Metrics; - - #nullable enable - namespace MyTests.TestMetricNameSpace; - public partial class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.Environment_Get, PublicApiUsage.Environment_Set)] - internal string? _Environment {{definition}} - } - """; - - var (diagnostics, output) = TestHelpers.GetGeneratedOutput(input, GetPublicApiAttribute()); - Assert.Contains(diagnostics, diag => diag.Id == SetterOnReadonlyFieldDiagnostic.Id); - } - - [Fact] - public void ErrorsWhenCantDetermineName() - { - var input = """ - using Datadog.Trace.Configuration; - using Datadog.Trace.SourceGenerators; - using Datadog.Trace.Telemetry.Metrics; - - #nullable enable - namespace MyTests.TestMetricNameSpace; - public partial class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.Environment_Get, PublicApiUsage.Environment_Set)] - internal string? Environment { get; set; } - } - """; - - var (diagnostics, output) = TestHelpers.GetGeneratedOutput(input, GetPublicApiAttribute()); - Assert.Contains(diagnostics, diag => diag.Id == NamingProblemDiagnostic.Id); - } - - [Fact] - public void AddsDiagnosticWhenPartialModifierMissing() - { - var input = """ - using Datadog.Trace.Configuration; - using Datadog.Trace.SourceGenerators; - using Datadog.Trace.Telemetry.Metrics; - - #nullable enable - namespace MyTests.TestMetricNameSpace; - public class TestSettings - { - /// - /// Gets the default environment name applied to all spans. - /// - /// - [GeneratePublicApi(PublicApiUsage.Environment_Get, PublicApiUsage.Environment_Set)] - internal string? Environment { get; set; } - } - """; - - var (diagnostics, output) = TestHelpers.GetGeneratedOutput(input, GetPublicApiAttribute()); - Assert.Contains(diagnostics, diag => diag.Id == PartialModifierIsRequiredDiagnostic.Id); - } - - private static string GetPublicApiAttribute() - => """ - namespace Datadog.Trace.Telemetry.Metrics; - public enum PublicApiUsage - { - Environment_Get, - Environment_Set, - ServiceName_Get, - } - """; -} diff --git a/tracer/test/Datadog.Trace.Tests/Agent/MessagePack/SpanMessagePackFormatterTests.cs b/tracer/test/Datadog.Trace.Tests/Agent/MessagePack/SpanMessagePackFormatterTests.cs index 76928a95c333..967b6e638c6b 100644 --- a/tracer/test/Datadog.Trace.Tests/Agent/MessagePack/SpanMessagePackFormatterTests.cs +++ b/tracer/test/Datadog.Trace.Tests/Agent/MessagePack/SpanMessagePackFormatterTests.cs @@ -80,7 +80,7 @@ public void SerializeSpans() actual.Duration.Should().Be(expected.Duration.ToNanoseconds()); actual.ParentId.Should().Be(expected.Context.ParentId); actual.Error.Should().Be(expected.Error ? (byte)0x1 : (byte)0x0); - actual.ParentId.Should().Be(expected.Context.ParentIdInternal); + actual.ParentId.Should().Be(expected.Context.ParentId); var tagsProcessor = new TagsProcessor(actual.Tags); expected.Tags.EnumerateTags(ref tagsProcessor); diff --git a/tracer/test/Datadog.Trace.Tests/Configuration/DynamicConfigurationTests.cs b/tracer/test/Datadog.Trace.Tests/Configuration/DynamicConfigurationTests.cs index 7f4aa1ad252c..433439f16768 100644 --- a/tracer/test/Datadog.Trace.Tests/Configuration/DynamicConfigurationTests.cs +++ b/tracer/test/Datadog.Trace.Tests/Configuration/DynamicConfigurationTests.cs @@ -61,7 +61,7 @@ public void ApplyConfigurationTwice() public void ApplyTagsToDirectLogs() { var tracerSettings = new TracerSettings(); - tracerSettings.GlobalTagsInternal.Add("key1", "value1"); + tracerSettings.GlobalTags.Add("key1", "value1"); TracerManager.ReplaceGlobalManager(new ImmutableTracerSettings(tracerSettings), TracerManagerFactory.Instance); TracerManager.Instance.DirectLogSubmission.Formatter.Tags.Should().Be("key1:value1"); @@ -78,7 +78,7 @@ public void DoesNotOverrideDirectLogsTags() var tracerSettings = new TracerSettings(); tracerSettings.LogSubmissionSettings.DirectLogSubmissionGlobalTags.Add("key1", "value1"); tracerSettings.LogSubmissionSettings.DirectLogSubmissionEnabledIntegrations.Add("test"); - tracerSettings.GlobalTagsInternal.Add("key2", "value2"); + tracerSettings.GlobalTags.Add("key2", "value2"); TracerManager.ReplaceGlobalManager(new ImmutableTracerSettings(tracerSettings), TracerManagerFactory.Instance); TracerManager.Instance.DirectLogSubmission.Formatter.Tags.Should().Be("key1:value1"); @@ -125,7 +125,7 @@ public void SetSamplingRules() TracerManager.ReplaceGlobalManager(new ImmutableTracerSettings(tracerSettings), TracerManagerFactory.Instance); - TracerManager.Instance.Settings.CustomSamplingRulesInternal.Should().Be(localSamplingRulesJson); + TracerManager.Instance.Settings.CustomSamplingRules.Should().Be(localSamplingRulesJson); TracerManager.Instance.Settings.CustomSamplingRulesIsRemote.Should().BeFalse(); var rules = ((TraceSampler)TracerManager.Instance.PerTraceSettings.TraceSampler)!.GetRules(); @@ -156,7 +156,7 @@ public void SetSamplingRules() DynamicConfigurationManager.OnlyForTests_ApplyConfiguration(configBuilder); var remoteSamplingRulesJson = JsonConvert.SerializeObject(remoteSamplingRulesConfig); - TracerManager.Instance.Settings.CustomSamplingRulesInternal.Should().Be(remoteSamplingRulesJson); + TracerManager.Instance.Settings.CustomSamplingRules.Should().Be(remoteSamplingRulesJson); TracerManager.Instance.Settings.CustomSamplingRulesIsRemote.Should().BeTrue(); rules = ((TraceSampler)TracerManager.Instance.PerTraceSettings.TraceSampler)!.GetRules(); diff --git a/tracer/test/Datadog.Trace.Tests/Configuration/ImmutableExporterSettingsTests.cs b/tracer/test/Datadog.Trace.Tests/Configuration/ImmutableExporterSettingsTests.cs index fd0ca9ea2c0e..34559a98133e 100644 --- a/tracer/test/Datadog.Trace.Tests/Configuration/ImmutableExporterSettingsTests.cs +++ b/tracer/test/Datadog.Trace.Tests/Configuration/ImmutableExporterSettingsTests.cs @@ -52,10 +52,9 @@ public void HasSamePropertiesAsExporterSettings() { var mutableProperties = typeof(ExporterSettings) .GetProperties(Flags) - .Where(// Exclude "internal" properties - x => !(x.HasAttribute() - || x.Name == "AgentUriInternal" - || x.Name == "PartialFlushMinSpansInternal")) + .Where(x => + x.Name != "AgentUriInternal" + && x.Name != "PartialFlushMinSpansInternal") .Select(x => x.Name) .Where(x => !ExcludedProperties.Contains(x)); @@ -88,11 +87,10 @@ public void AllPropertyValuesMatch() var mutableProperties = typeof(ExporterSettings) .GetProperties(Flags) - .Where(// Exclude "internal" properties - x => !(x.HasAttribute() - || x.Name == "AgentUriInternal" - || x.Name == "Telemetry" - || x.Name == "PartialFlushMinSpansInternal")); + .Where( + x => x.Name != "AgentUriInternal" + && x.Name != "Telemetry" + && x.Name != "PartialFlushMinSpansInternal"); // Ensure that all properties are represented Assert.Equal(mutableProperties.Count(), equalityCheckers.Count); diff --git a/tracer/test/Datadog.Trace.Tests/Configuration/ImmutableTracerSettingsTests.cs b/tracer/test/Datadog.Trace.Tests/Configuration/ImmutableTracerSettingsTests.cs index a2f3ae3bd71e..936c91a56bbe 100644 --- a/tracer/test/Datadog.Trace.Tests/Configuration/ImmutableTracerSettingsTests.cs +++ b/tracer/test/Datadog.Trace.Tests/Configuration/ImmutableTracerSettingsTests.cs @@ -61,7 +61,6 @@ public void HasSamePropertiesAsTracerSettings() { var mutableProperties = typeof(TracerSettings) .GetProperties(Flags) - .Where(x => !x.HasAttribute()) .Select(x => x.Name) .Where(x => !ExcludedProperties.Contains(x)); @@ -163,9 +162,9 @@ public void DDTagsSetsServiceInformation() var tracerSettings = new TracerSettings(source); var immutableTracerSettings = tracerSettings.Build(); - immutableTracerSettings.EnvironmentInternal.Should().Be("datadog_env"); - immutableTracerSettings.ServiceVersionInternal.Should().Be("datadog_version"); - immutableTracerSettings.ServiceNameInternal.Should().Be("datadog_service"); + immutableTracerSettings.Environment.Should().Be("datadog_env"); + immutableTracerSettings.ServiceVersion.Should().Be("datadog_version"); + immutableTracerSettings.ServiceName.Should().Be("datadog_service"); } [Fact] @@ -179,9 +178,9 @@ public void OTELTagsSetsServiceInformation() var tracerSettings = new TracerSettings(source); var immutableTracerSettings = tracerSettings.Build(); - immutableTracerSettings.EnvironmentInternal.Should().Be("datadog_env"); - immutableTracerSettings.ServiceVersionInternal.Should().Be("datadog_version"); - immutableTracerSettings.ServiceNameInternal.Should().Be("datadog_service"); + immutableTracerSettings.Environment.Should().Be("datadog_env"); + immutableTracerSettings.ServiceVersion.Should().Be("datadog_version"); + immutableTracerSettings.ServiceName.Should().Be("datadog_service"); } [Fact] @@ -197,11 +196,11 @@ public void DDTagsTakesPrecedenceOverOTELTags() var tracerSettings = new TracerSettings(source, NullConfigurationTelemetry.Instance, errorLog); var immutableTracerSettings = tracerSettings.Build(); - immutableTracerSettings.EnvironmentInternal.Should().Be("datadog_env"); + immutableTracerSettings.Environment.Should().Be("datadog_env"); // Since the DD_TAGS config is set, the OTEL_RESOURCE_ATTRIBUTES config is ignored - immutableTracerSettings.ServiceVersionInternal.Should().NotBe("datadog_version"); - immutableTracerSettings.ServiceNameInternal.Should().NotBe("datadog_service"); + immutableTracerSettings.ServiceVersion.Should().NotBe("datadog_version"); + immutableTracerSettings.ServiceName.Should().NotBe("datadog_service"); errorLog.ShouldHaveExpectedOtelMetric(Count.OpenTelemetryConfigHiddenByDatadogConfig, "OTEL_RESOURCE_ATTRIBUTES".ToLowerInvariant(), "DD_TAGS".ToLowerInvariant()); } } diff --git a/tracer/test/Datadog.Trace.Tests/Configuration/IntegrationSettingsTests.cs b/tracer/test/Datadog.Trace.Tests/Configuration/IntegrationSettingsTests.cs index 1388b309daaa..326034523f5a 100644 --- a/tracer/test/Datadog.Trace.Tests/Configuration/IntegrationSettingsTests.cs +++ b/tracer/test/Datadog.Trace.Tests/Configuration/IntegrationSettingsTests.cs @@ -44,7 +44,7 @@ public void CaseInsenstiveIntegrationEnabled(string settingName, string settingV var src = new DictionaryConfigurationSource(dict); var settings = new IntegrationSettings(nameof(IntegrationId.MySql), src); - settings.EnabledInternal.Should().Be(expected); + settings.Enabled.Should().Be(expected); } [Theory]