diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridCommon.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridCommon.cs new file mode 100644 index 000000000000..c8627f423070 --- /dev/null +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridCommon.cs @@ -0,0 +1,267 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using Datadog.Trace.ClrProfiler.CallTarget; +using Datadog.Trace.Configuration; +using Datadog.Trace.Configuration.Schema; +using Datadog.Trace.DuckTyping; +using Datadog.Trace.Logging; +using Datadog.Trace.Propagators; +using Datadog.Trace.Tagging; + +namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Azure.EventGrid; + +internal static class EventGridCommon +{ + private static readonly IDatadogLogger Log = DatadogLogging.GetLoggerFor(typeof(EventGridCommon)); + + internal static CallTargetState CreateProducerSpan(TTarget instance, ref TEvents events, bool injectContext) + where TTarget : IEventGridPublisherClient + { + var tracer = Tracer.Instance; + if (!IsIntegrationEnabled(tracer)) + { + return CallTargetState.GetDefault(); + } + + var uriBuilder = instance.UriBuilder; + var host = uriBuilder?.Host; + var port = uriBuilder?.Port ?? -1; + return CreateProducerSpan(tracer, host, port, ref events, injectContext); + } + + internal static CallTargetState CreateNamespaceProducerSpanForEvent(TTarget instance, TCloudEvent cloudEvent) + where TTarget : IEventGridSenderClient + where TCloudEvent : ICloudEvent + { + var tracer = Tracer.Instance; + if (!IsIntegrationEnabled(tracer)) + { + return CallTargetState.GetDefault(); + } + + var endpoint = instance.Endpoint; + object? singleEvent = cloudEvent.Instance is null ? null : cloudEvent; + return CreateProducerSpan(tracer, endpoint?.Host, endpoint?.Port ?? -1, events: null, singleEvent); + } + + internal static CallTargetState CreateNamespaceProducerSpanForEvents(TTarget instance, ref TEvents cloudEvents) + where TTarget : IEventGridSenderClient + { + var tracer = Tracer.Instance; + if (!IsIntegrationEnabled(tracer)) + { + return CallTargetState.GetDefault(); + } + + var endpoint = instance.Endpoint; + return CreateProducerSpan(tracer, endpoint?.Host, endpoint?.Port ?? -1, ref cloudEvents, injectContext: true); + } + + private static bool IsIntegrationEnabled(Tracer tracer) => + tracer.CurrentTraceSettings.Settings.IsIntegrationEnabled(IntegrationId.AzureEventGrid, defaultValue: false); + + private static CallTargetState CreateProducerSpan(Tracer tracer, string? host, int port, ref TEvents events, bool injectContext) + { + var enumerable = events as IEnumerable; + var state = CreateProducerSpan(tracer, host, port, enumerable, singleEvent: null); + if (state.Scope is not { } scope || enumerable is null) + { + return state; + } + + try + { + var observer = new EventGridEnumerableObserver(scope, enumerable is ICollection collection ? collection.Count : null, injectContext); + events = EventGridObservingEnumerable.Wrap(events, observer); + } + catch (Exception ex) + { + Log.Debug(ex, "Error wrapping Azure Event Grid events for context injection"); + } + + return state; + } + + private static CallTargetState CreateProducerSpan(Tracer tracer, string? host, int port, IEnumerable? events, object? singleEvent) + { + Scope? scope = null; + + try + { + var tags = tracer.CurrentTraceSettings.Schema.Messaging.CreateAzureEventGridTags(SpanKinds.Producer); + tags.MessagingOperation = "send"; + + tags.NetworkDestinationName = host; + + if (port is not -1) + { + tags.NetworkDestinationPort = port.ToString(); + } + + var messageCount = singleEvent is not null ? 1 : events is ICollection collection ? collection.Count : 0; + if (messageCount > 1) + { + tags.MessagingBatchMessageCount = messageCount.ToString(); + } + + var (serviceName, serviceNameSource) = tracer.CurrentTraceSettings.Schema.Messaging.GetServiceNameMetadata(MessagingSchema.ServiceType.AzureEventGrid); + scope = tracer.StartActiveInternal("azure_eventgrid.send", tags: tags, serviceName: serviceName, serviceNameSource: serviceNameSource); + var span = scope.Span; + + span.Type = SpanTypes.Queue; + span.ResourceName = "eventgrid"; + + if (singleEvent is not null) + { + ProcessEvent(singleEvent, span, scope); + } + + tracer.TracerManager.Telemetry.IntegrationGeneratedSpan(IntegrationId.AzureEventGrid); + + return new CallTargetState(scope); + } + catch (Exception ex) + { + Log.Error(ex, "Error creating Azure Event Grid producer span"); + scope?.Dispose(); + return CallTargetState.GetDefault(); + } + } + + private static void ProcessEvent(object evt, Span span, Scope scope) + { + SetMessageId(evt, span); + InjectContext(evt, scope); + } + + private static void InjectContext(object evt, Scope scope) + { + if (evt.TryDuckCast(out var cloudEvent) + && cloudEvent.ExtensionAttributes is { } attrs) + { + InjectW3CContext(attrs, scope, Tracer.Instance.Settings.PropagationStyleInject); + } + } + + private static void SetMessageId(object evt, Span span) + { + if (evt.TryDuckCast(out var eventGridEvent) && eventGridEvent.Id is { Length: > 0 } id) + { + span.SetTag(Tags.MessagingMessageId, id); + } + } + + /// + /// Injects the configured W3C traceparent, tracestate, and baggage into CloudEvent ExtensionAttributes. + /// Uses the W3C propagator directly because CloudEvent extension attribute names + /// only allow lowercase letters and digits — Datadog-format headers (x-datadog-*) + /// would throw ArgumentException. Pre-populating the W3C attributes also prevents + /// the Azure SDK from overwriting them with its Activity-based context. + /// + internal static void InjectW3CContext(IDictionary extensionAttributes, Scope scope, string[] propagationStyles) + { + if (scope.Span.Context is not { } spanContext) + { + return; + } + + try + { + var context = new PropagationContext(spanContext, Baggage.Current); + var carrier = default(Shared.AzureMessagingCommon.DictionaryContextPropagation); + + if (IsPropagationStyleEnabled(propagationStyles, ContextPropagationHeaderStyle.W3CTraceContext) || + IsPropagationStyleEnabled(propagationStyles, ContextPropagationHeaderStyle.Deprecated.W3CTraceContext)) + { + W3CTraceContextPropagator.Instance.Inject(context, extensionAttributes, carrier); + } + + if (IsPropagationStyleEnabled(propagationStyles, ContextPropagationHeaderStyle.W3CBaggage)) + { + W3CBaggagePropagator.Instance.Inject(context, extensionAttributes, carrier); + } + } + catch (Exception ex) + { + Log.Warning(ex, "Failed to inject W3C trace context into CloudEvent ExtensionAttributes"); + } + } + + private static bool IsPropagationStyleEnabled(string[] propagationStyles, string expectedStyle) + { + foreach (var propagationStyle in propagationStyles) + { + if (string.Equals(propagationStyle, expectedStyle, StringComparison.OrdinalIgnoreCase)) + { + return true; + } + } + + return false; + } + + private sealed class EventGridEnumerableObserver : EventGridObservingEnumerable.IObserver + { + private readonly Scope _scope; + private readonly int? _knownCount; + private readonly bool _injectContext; + + public EventGridEnumerableObserver(Scope scope, int? knownCount, bool injectContext) + { + _scope = scope; + _knownCount = knownCount; + _injectContext = injectContext; + } + + public void OnItem(object? item) + { + try + { + if (item is not null) + { + if (_knownCount == 1) + { + SetMessageId(item, _scope.Span); + } + + if (_injectContext) + { + InjectContext(item, _scope); + } + } + } + catch (Exception ex) + { + Log.Debug(ex, "Error processing an Azure Event Grid event"); + } + } + + public void OnEnumerationCompleted(int count, object? firstItem) + { + try + { + if (!_knownCount.HasValue && count > 1) + { + _scope.Span.SetTag(Tags.MessagingBatchMessageCount, count.ToString()); + } + + if (!_knownCount.HasValue && count == 1 && firstItem is not null) + { + SetMessageId(firstItem, _scope.Span); + } + } + catch (Exception ex) + { + Log.Debug(ex, "Error finalizing Azure Event Grid event processing"); + } + } + } +} diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridObservingEnumerable.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridObservingEnumerable.cs new file mode 100644 index 000000000000..acf2595c3c9c --- /dev/null +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridObservingEnumerable.cs @@ -0,0 +1,109 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// + +#nullable enable + +using System; +using System.Collections.Generic; + +namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Azure.EventGrid; + +/// +/// Replaces a declared argument with an observing wrapper without +/// taking a compile-time dependency on the enumerable's item type. +/// +/// +/// Event Grid send APIs accept deferred or one-shot sequences. Enumerating them in the CallTarget begin callback +/// could execute customer code early, consume the sequence, or observe different event instances from those the +/// Azure SDK eventually sends. This wrapper observes items only as the SDK enumerates them, preserving the source's +/// enumeration timing and item flow. It is constructed dynamically because the tracer cannot reference the Azure SDK +/// event types. +/// +internal static class EventGridObservingEnumerable +{ + internal interface IObserver + { + void OnItem(object? item); + + void OnEnumerationCompleted(int count, object? firstItem); + } + + private interface IEnumerableWrapperFactory + { + object Create(object events, IObserver observer); + } + + internal static TEvents Wrap(TEvents events, IObserver observer) + { + if ((object?)events is null || FactoryCache.Factory is not { } factory) + { + return events; + } + + return (TEvents)factory.Create(events, observer); + } + + private static IEnumerable Observe(IEnumerable events, IObserver observer) + { + object? firstItem = null; + var count = 0; + + foreach (var item in events) + { + if (count == 0) + { + firstItem = item; + } + + count++; + try + { + observer.OnItem(item); + } + catch + { + // Instrumentation must not affect customer enumeration. + } + + yield return item; + } + + try + { + observer.OnEnumerationCompleted(count, firstItem); + } + catch + { + // Instrumentation must not affect customer enumeration. + } + } + + // CallTarget supplies TEvents as the method's declared parameter type, for example IEnumerable. + // The tracer cannot reference CloudEvent directly, so reflection closes EnumerableWrapperFactory once. + // The resulting factory is cached, and subsequent calls perform no reflection. + private static class FactoryCache + { + public static readonly IEnumerableWrapperFactory? Factory = CreateFactory(); + + private static IEnumerableWrapperFactory? CreateFactory() + { + var eventsType = typeof(TEvents); + if (!eventsType.IsGenericType || eventsType.GetGenericTypeDefinition() != typeof(IEnumerable<>)) + { + return null; + } + + var eventType = eventsType.GetGenericArguments()[0]; + var factoryType = typeof(EnumerableWrapperFactory<>).MakeGenericType(eventType); + return Activator.CreateInstance(factoryType, nonPublic: true) as IEnumerableWrapperFactory; + } + } + + private sealed class EnumerableWrapperFactory : IEnumerableWrapperFactory + { + public object Create(object events, IObserver observer) + => Observe((IEnumerable)events, observer); + } +} diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/ICloudEvent.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/ICloudEvent.cs new file mode 100644 index 000000000000..80d6bf7dd9bb --- /dev/null +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/ICloudEvent.cs @@ -0,0 +1,19 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// + +#nullable enable + +using System.Collections.Generic; +using Datadog.Trace.DuckTyping; + +namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Azure.EventGrid; + +/// +/// Duck type for Azure.Messaging.CloudEvent +/// +internal interface ICloudEvent : IEventGridEventId, IDuckType +{ + IDictionary ExtensionAttributes { get; } +} diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IEventGridEventId.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IEventGridEventId.cs new file mode 100644 index 000000000000..695ae9ec32cf --- /dev/null +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IEventGridEventId.cs @@ -0,0 +1,16 @@ +// +// 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.ClrProfiler.AutoInstrumentation.Azure.EventGrid; + +/// +/// Duck type for EventGridEvent.Id and CloudEvent.Id +/// +internal interface IEventGridEventId +{ + string? Id { get; } +} diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IEventGridPublisherClient.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IEventGridPublisherClient.cs new file mode 100644 index 000000000000..40a1a3628c9c --- /dev/null +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IEventGridPublisherClient.cs @@ -0,0 +1,19 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// + +#nullable enable + +using Datadog.Trace.DuckTyping; + +namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Azure.EventGrid; + +/// +/// Duck type for Azure.Messaging.EventGrid.EventGridPublisherClient +/// +internal interface IEventGridPublisherClient : IDuckType +{ + [DuckField(Name = "_uriBuilder")] + IRequestUriBuilder? UriBuilder { get; } +} diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IEventGridSenderClient.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IEventGridSenderClient.cs new file mode 100644 index 000000000000..4eb6c3eb7b24 --- /dev/null +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IEventGridSenderClient.cs @@ -0,0 +1,20 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// + +#nullable enable + +using System; +using Datadog.Trace.DuckTyping; + +namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Azure.EventGrid; + +/// +/// Duck type for Azure.Messaging.EventGrid.Namespaces.EventGridSenderClient +/// +internal interface IEventGridSenderClient : IDuckType +{ + [DuckField(Name = "_endpoint")] + Uri? Endpoint { get; } +} diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IRequestUriBuilder.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IRequestUriBuilder.cs new file mode 100644 index 000000000000..7f9737553d8f --- /dev/null +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/IRequestUriBuilder.cs @@ -0,0 +1,20 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// + +#nullable enable + +using Datadog.Trace.DuckTyping; + +namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Azure.EventGrid; + +/// +/// Duck type for Azure.Core.RequestUriBuilder +/// +internal interface IRequestUriBuilder : IDuckType +{ + string? Host { get; } + + int Port { get; } +} diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/Shared/AzureMessagingCommon.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/Shared/AzureMessagingCommon.cs index 57e5321af7d6..601a1404610c 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/Shared/AzureMessagingCommon.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/Shared/AzureMessagingCommon.cs @@ -66,7 +66,7 @@ public static PropagationContext ExtractContext(IDictionary? pro /// /// Context propagation helper for IDictionary string,object /// - private readonly struct DictionaryContextPropagation : ICarrierGetter>, ICarrierSetter> + internal readonly struct DictionaryContextPropagation : ICarrierGetter>, ICarrierSetter> { public IEnumerable Get(IDictionary carrier, string key) { diff --git a/tracer/src/Datadog.Trace/Configuration/IntegrationId.cs b/tracer/src/Datadog.Trace/Configuration/IntegrationId.cs index 787eb373cf17..6fbfd6921880 100644 --- a/tracer/src/Datadog.Trace/Configuration/IntegrationId.cs +++ b/tracer/src/Datadog.Trace/Configuration/IntegrationId.cs @@ -88,6 +88,7 @@ internal enum IntegrationId EmailHtmlInjection, Protobuf, AzureEventHubs, + AzureEventGrid, DatadogTraceVersionConflict, Hangfire, OpenFeature, diff --git a/tracer/src/Datadog.Trace/Configuration/Schema/MessagingSchema.cs b/tracer/src/Datadog.Trace/Configuration/Schema/MessagingSchema.cs index 48ad7594507c..2ab3e98096d8 100644 --- a/tracer/src/Datadog.Trace/Configuration/Schema/MessagingSchema.cs +++ b/tracer/src/Datadog.Trace/Configuration/Schema/MessagingSchema.cs @@ -44,6 +44,7 @@ public MessagingSchema(SchemaVersion version, bool peerServiceTagsEnabled, bool ServiceNameMetadata.Resolve("aws.stepfunctions", defaultServiceName, serviceNameMappings, useSuffix), ServiceNameMetadata.Resolve("azureeventhubs", defaultServiceName, serviceNameMappings, useSuffix), ServiceNameMetadata.Resolve("azureservicebus", defaultServiceName, serviceNameMappings, useSuffix), + ServiceNameMetadata.Resolve("azureeventgrid", defaultServiceName, serviceNameMappings, useSuffix), ServiceNameMetadata.Resolve("ibmmq", defaultServiceName, serviceNameMappings, useSuffix), ServiceNameMetadata.Resolve("kafka", defaultServiceName, serviceNameMappings, useSuffix), ServiceNameMetadata.Resolve("msmq", defaultServiceName, serviceNameMappings, useSuffix), @@ -79,6 +80,7 @@ public enum ServiceType AwsStepFunctions, AzureEventHubs, AzureServiceBus, + AzureEventGrid, IbmMq, Kafka, Msmq, @@ -127,6 +129,12 @@ public AzureEventHubsTags CreateAzureEventHubsTags(string spanKind) return tags; } + public AzureEventGridTags CreateAzureEventGridTags(string spanKind) + { + var tags = _useV0Tags ? new AzureEventGridTags(spanKind) : new AzureEventGridV1Tags(spanKind); + return tags; + } + private static class V0Values { public static readonly string[] InboundOperationNames = diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs index cfc3e86ece7b..79b784525c54 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs @@ -17,7 +17,7 @@ internal static partial class IntegrationIdExtensions /// The number of members in the enum. /// This is a non-distinct count of defined names. /// - public const int Length = 80; + public const int Length = 81; /// /// Returns the string representation of the value. @@ -106,6 +106,7 @@ public static string ToStringFast(this Datadog.Trace.Configuration.IntegrationId Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection => nameof(Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection), Datadog.Trace.Configuration.IntegrationId.Protobuf => nameof(Datadog.Trace.Configuration.IntegrationId.Protobuf), Datadog.Trace.Configuration.IntegrationId.AzureEventHubs => nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventHubs), + Datadog.Trace.Configuration.IntegrationId.AzureEventGrid => nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventGrid), Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict => nameof(Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict), Datadog.Trace.Configuration.IntegrationId.Hangfire => nameof(Datadog.Trace.Configuration.IntegrationId.Hangfire), Datadog.Trace.Configuration.IntegrationId.OpenFeature => nameof(Datadog.Trace.Configuration.IntegrationId.OpenFeature), @@ -199,6 +200,7 @@ public static Datadog.Trace.Configuration.IntegrationId[] GetValues() Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection, Datadog.Trace.Configuration.IntegrationId.Protobuf, Datadog.Trace.Configuration.IntegrationId.AzureEventHubs, + Datadog.Trace.Configuration.IntegrationId.AzureEventGrid, Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict, Datadog.Trace.Configuration.IntegrationId.Hangfire, Datadog.Trace.Configuration.IntegrationId.OpenFeature, @@ -292,6 +294,7 @@ public static string[] GetNames() nameof(Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection), nameof(Datadog.Trace.Configuration.IntegrationId.Protobuf), nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventHubs), + nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventGrid), nameof(Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict), nameof(Datadog.Trace.Configuration.IntegrationId.Hangfire), nameof(Datadog.Trace.Configuration.IntegrationId.OpenFeature), diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs index 20b20f78f193..4b700cb16a0b 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs @@ -250,6 +250,9 @@ public static string[] GetAllIntegrationEnabledKeys() => "DD_TRACE_AZUREEVENTHUBS_ENABLED", "DD_TRACE_AzureEventHubs_ENABLED", "DD_AzureEventHubs_ENABLED", "DD_TRACE_AZUREEVENTHUBS_ANALYTICS_ENABLED", "DD_TRACE_AzureEventHubs_ANALYTICS_ENABLED", "DD_AzureEventHubs_ANALYTICS_ENABLED", "DD_TRACE_AZUREEVENTHUBS_ANALYTICS_SAMPLE_RATE", "DD_TRACE_AzureEventHubs_ANALYTICS_SAMPLE_RATE", "DD_AzureEventHubs_ANALYTICS_SAMPLE_RATE", + "DD_TRACE_AZUREEVENTGRID_ENABLED", "DD_TRACE_AzureEventGrid_ENABLED", "DD_AzureEventGrid_ENABLED", + "DD_TRACE_AZUREEVENTGRID_ANALYTICS_ENABLED", "DD_TRACE_AzureEventGrid_ANALYTICS_ENABLED", "DD_AzureEventGrid_ANALYTICS_ENABLED", + "DD_TRACE_AZUREEVENTGRID_ANALYTICS_SAMPLE_RATE", "DD_TRACE_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ENABLED", "DD_TRACE_DatadogTraceVersionConflict_ENABLED", "DD_DatadogTraceVersionConflict_ENABLED", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_ENABLED", "DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_SAMPLE_RATE", "DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", "DD_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", @@ -348,6 +351,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ENABLED", ["DD_TRACE_EmailHtmlInjection_ENABLED", "DD_EmailHtmlInjection_ENABLED"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ENABLED", ["DD_TRACE_Protobuf_ENABLED", "DD_Protobuf_ENABLED"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ENABLED", ["DD_TRACE_AzureEventHubs_ENABLED", "DD_AzureEventHubs_ENABLED"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ENABLED", ["DD_TRACE_AzureEventGrid_ENABLED", "DD_AzureEventGrid_ENABLED"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ENABLED", ["DD_TRACE_DatadogTraceVersionConflict_ENABLED", "DD_DatadogTraceVersionConflict_ENABLED"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ENABLED", ["DD_TRACE_Hangfire_ENABLED", "DD_Hangfire_ENABLED"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ENABLED", ["DD_TRACE_OpenFeature_ENABLED", "DD_OpenFeature_ENABLED"]), @@ -440,6 +444,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ANALYTICS_ENABLED", ["DD_TRACE_EmailHtmlInjection_ANALYTICS_ENABLED", "DD_EmailHtmlInjection_ANALYTICS_ENABLED"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ANALYTICS_ENABLED", ["DD_TRACE_Protobuf_ANALYTICS_ENABLED", "DD_Protobuf_ANALYTICS_ENABLED"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ANALYTICS_ENABLED", ["DD_TRACE_AzureEventHubs_ANALYTICS_ENABLED", "DD_AzureEventHubs_ANALYTICS_ENABLED"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ANALYTICS_ENABLED", ["DD_TRACE_AzureEventGrid_ANALYTICS_ENABLED", "DD_AzureEventGrid_ANALYTICS_ENABLED"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_ENABLED", ["DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_DatadogTraceVersionConflict_ANALYTICS_ENABLED"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ANALYTICS_ENABLED", ["DD_TRACE_Hangfire_ANALYTICS_ENABLED", "DD_Hangfire_ANALYTICS_ENABLED"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ANALYTICS_ENABLED", ["DD_TRACE_OpenFeature_ANALYTICS_ENABLED", "DD_OpenFeature_ANALYTICS_ENABLED"]), @@ -532,6 +537,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_EmailHtmlInjection_ANALYTICS_SAMPLE_RATE", "DD_EmailHtmlInjection_ANALYTICS_SAMPLE_RATE"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_Protobuf_ANALYTICS_SAMPLE_RATE", "DD_Protobuf_ANALYTICS_SAMPLE_RATE"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_AzureEventHubs_ANALYTICS_SAMPLE_RATE", "DD_AzureEventHubs_ANALYTICS_SAMPLE_RATE"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_AzureEventGrid_ANALYTICS_SAMPLE_RATE"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", "DD_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_Hangfire_ANALYTICS_SAMPLE_RATE", "DD_Hangfire_ANALYTICS_SAMPLE_RATE"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_OpenFeature_ANALYTICS_SAMPLE_RATE", "DD_OpenFeature_ANALYTICS_SAMPLE_RATE"]), diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs new file mode 100644 index 000000000000..9fbb3989de91 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs @@ -0,0 +1,212 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +using Datadog.Trace.Processors; +using Datadog.Trace.Tagging; +using System; + +namespace Datadog.Trace.Tagging +{ + partial class AzureEventGridTags + { + // SpanKindBytes = MessagePack.Serialize("span.kind"); + private static ReadOnlySpan SpanKindBytes => [169, 115, 112, 97, 110, 46, 107, 105, 110, 100]; + + // InstrumentationNameBytes = MessagePack.Serialize("component"); + private static ReadOnlySpan InstrumentationNameBytes => [169, 99, 111, 109, 112, 111, 110, 101, 110, 116]; + + // MessagingSystemBytes = MessagePack.Serialize("messaging.system"); + private static ReadOnlySpan MessagingSystemBytes => [176, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 115, 121, 115, 116, 101, 109]; + + // MessagingOperationBytes = MessagePack.Serialize("messaging.operation"); + private static ReadOnlySpan MessagingOperationBytes => [179, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 111, 112, 101, 114, 97, 116, 105, 111, 110]; + + // MessagingDestinationNameBytes = MessagePack.Serialize("messaging.destination.name"); + private static ReadOnlySpan MessagingDestinationNameBytes => [186, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 110, 97, 109, 101]; + + // NetworkDestinationNameBytes = MessagePack.Serialize("network.destination.name"); + private static ReadOnlySpan NetworkDestinationNameBytes => [184, 110, 101, 116, 119, 111, 114, 107, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 110, 97, 109, 101]; + + // NetworkDestinationPortBytes = MessagePack.Serialize("network.destination.port"); + private static ReadOnlySpan NetworkDestinationPortBytes => [184, 110, 101, 116, 119, 111, 114, 107, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 112, 111, 114, 116]; + + // MessagingBatchMessageCountBytes = MessagePack.Serialize("messaging.batch.message_count"); + private static ReadOnlySpan MessagingBatchMessageCountBytes => [189, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 98, 97, 116, 99, 104, 46, 109, 101, 115, 115, 97, 103, 101, 95, 99, 111, 117, 110, 116]; + + // MessagingMessageIdBytes = MessagePack.Serialize("messaging.message_id"); + private static ReadOnlySpan MessagingMessageIdBytes => [180, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 109, 101, 115, 115, 97, 103, 101, 95, 105, 100]; + + public override string? GetTag(string key) + { + return key switch + { + "span.kind" => SpanKind, + "component" => InstrumentationName, + "messaging.system" => MessagingSystem, + "messaging.operation" => MessagingOperation, + "messaging.destination.name" => MessagingDestinationName, + "network.destination.name" => NetworkDestinationName, + "network.destination.port" => NetworkDestinationPort, + "messaging.batch.message_count" => MessagingBatchMessageCount, + "messaging.message_id" => MessagingMessageId, + _ => base.GetTag(key), + }; + } + + public override void SetTag(string key, string? value) + { + switch(key) + { + case "messaging.operation": + MessagingOperation = value; + break; + case "messaging.destination.name": + MessagingDestinationName = value; + break; + case "network.destination.name": + NetworkDestinationName = value; + break; + case "network.destination.port": + NetworkDestinationPort = value; + break; + case "messaging.batch.message_count": + MessagingBatchMessageCount = value; + break; + case "messaging.message_id": + MessagingMessageId = value; + break; + case "span.kind": + case "component": + case "messaging.system": + Logger.Value.Warning("Attempted to set readonly tag {TagName} on {TagType}. Ignoring.", key, nameof(AzureEventGridTags)); + break; + default: + base.SetTag(key, value); + break; + } + } + + public override void EnumerateTags(ref TProcessor processor, bool openTelemetrySemanticsEnabled) + { + if (SpanKind is not null) + { + processor.Process(new TagItem("span.kind", SpanKind, SpanKindBytes)); + } + + if (InstrumentationName is not null) + { + processor.Process(new TagItem("component", InstrumentationName, InstrumentationNameBytes)); + } + + if (MessagingSystem is not null) + { + processor.Process(new TagItem("messaging.system", MessagingSystem, MessagingSystemBytes)); + } + + if (MessagingOperation is not null) + { + processor.Process(new TagItem("messaging.operation", MessagingOperation, MessagingOperationBytes)); + } + + if (MessagingDestinationName is not null) + { + processor.Process(new TagItem("messaging.destination.name", MessagingDestinationName, MessagingDestinationNameBytes)); + } + + if (NetworkDestinationName is not null) + { + processor.Process(new TagItem("network.destination.name", NetworkDestinationName, NetworkDestinationNameBytes)); + } + + if (NetworkDestinationPort is not null) + { + processor.Process(new TagItem("network.destination.port", NetworkDestinationPort, NetworkDestinationPortBytes)); + } + + if (MessagingBatchMessageCount is not null) + { + processor.Process(new TagItem("messaging.batch.message_count", MessagingBatchMessageCount, MessagingBatchMessageCountBytes)); + } + + if (MessagingMessageId is not null) + { + processor.Process(new TagItem("messaging.message_id", MessagingMessageId, MessagingMessageIdBytes)); + } + + base.EnumerateTags(ref processor, openTelemetrySemanticsEnabled); + } + + protected override void WriteAdditionalTags(System.Text.StringBuilder sb) + { + if (SpanKind is not null) + { + sb.Append("span.kind (tag):") + .Append(SpanKind) + .Append(','); + } + + if (InstrumentationName is not null) + { + sb.Append("component (tag):") + .Append(InstrumentationName) + .Append(','); + } + + if (MessagingSystem is not null) + { + sb.Append("messaging.system (tag):") + .Append(MessagingSystem) + .Append(','); + } + + if (MessagingOperation is not null) + { + sb.Append("messaging.operation (tag):") + .Append(MessagingOperation) + .Append(','); + } + + if (MessagingDestinationName is not null) + { + sb.Append("messaging.destination.name (tag):") + .Append(MessagingDestinationName) + .Append(','); + } + + if (NetworkDestinationName is not null) + { + sb.Append("network.destination.name (tag):") + .Append(NetworkDestinationName) + .Append(','); + } + + if (NetworkDestinationPort is not null) + { + sb.Append("network.destination.port (tag):") + .Append(NetworkDestinationPort) + .Append(','); + } + + if (MessagingBatchMessageCount is not null) + { + sb.Append("messaging.batch.message_count (tag):") + .Append(MessagingBatchMessageCount) + .Append(','); + } + + if (MessagingMessageId is not null) + { + sb.Append("messaging.message_id (tag):") + .Append(MessagingMessageId) + .Append(','); + } + + base.WriteAdditionalTags(sb); + } + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs new file mode 100644 index 000000000000..4d1324bc41d3 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs @@ -0,0 +1,83 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +using Datadog.Trace.Processors; +using Datadog.Trace.Tagging; +using System; + +namespace Datadog.Trace.Tagging +{ + partial class AzureEventGridV1Tags + { + // PeerServiceBytes = MessagePack.Serialize("peer.service"); + private static ReadOnlySpan PeerServiceBytes => [172, 112, 101, 101, 114, 46, 115, 101, 114, 118, 105, 99, 101]; + + // PeerServiceSourceBytes = MessagePack.Serialize("_dd.peer.service.source"); + private static ReadOnlySpan PeerServiceSourceBytes => [183, 95, 100, 100, 46, 112, 101, 101, 114, 46, 115, 101, 114, 118, 105, 99, 101, 46, 115, 111, 117, 114, 99, 101]; + + public override string? GetTag(string key) + { + return key switch + { + "peer.service" => PeerService, + "_dd.peer.service.source" => PeerServiceSource, + _ => base.GetTag(key), + }; + } + + public override void SetTag(string key, string? value) + { + switch(key) + { + case "peer.service": + PeerService = value; + break; + case "_dd.peer.service.source": + Logger.Value.Warning("Attempted to set readonly tag {TagName} on {TagType}. Ignoring.", key, nameof(AzureEventGridV1Tags)); + break; + default: + base.SetTag(key, value); + break; + } + } + + public override void EnumerateTags(ref TProcessor processor, bool openTelemetrySemanticsEnabled) + { + if (PeerService is not null) + { + processor.Process(new TagItem("peer.service", PeerService, PeerServiceBytes)); + } + + if (PeerServiceSource is not null) + { + processor.Process(new TagItem("_dd.peer.service.source", PeerServiceSource, PeerServiceSourceBytes)); + } + + base.EnumerateTags(ref processor, openTelemetrySemanticsEnabled); + } + + protected override void WriteAdditionalTags(System.Text.StringBuilder sb) + { + if (PeerService is not null) + { + sb.Append("peer.service (tag):") + .Append(PeerService) + .Append(','); + } + + if (PeerServiceSource is not null) + { + sb.Append("_dd.peer.service.source (tag):") + .Append(PeerServiceSource) + .Append(','); + } + + base.WriteAdditionalTags(sb); + } + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs index 074a939c1ce9..4f3392fc24bb 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class CiVisibilityMetricsTelemetryCollector { - private const int CountSharedLength = 340; + private const int CountSharedLength = 344; /// /// Creates the buffer for the values. @@ -276,6 +276,10 @@ private static AggregatedMetric[] GetCountSharedBuffer() new(new[] { "integration_name:azureeventhubs", "error_type:invoker" }), new(new[] { "integration_name:azureeventhubs", "error_type:execution" }), new(new[] { "integration_name:azureeventhubs", "error_type:missing_member" }), + new(new[] { "integration_name:azureeventgrid", "error_type:duck_typing" }), + new(new[] { "integration_name:azureeventgrid", "error_type:invoker" }), + new(new[] { "integration_name:azureeventgrid", "error_type:execution" }), + new(new[] { "integration_name:azureeventgrid", "error_type:missing_member" }), new(new[] { "integration_name:systemrandom", "error_type:duck_typing" }), new(new[] { "integration_name:systemrandom", "error_type:invoker" }), new(new[] { "integration_name:systemrandom", "error_type:execution" }), @@ -368,7 +372,7 @@ private static AggregatedMetric[] GetCountSharedBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountSharedEntryCounts { get; } - = new int[]{ 340, }; + = new int[]{ 344, }; public void RecordCountSharedIntegrationsError(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.InstrumentationError tag2, int increment = 1) { diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs index 5593f1cb4e54..779c9be4bf9b 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class MetricsTelemetryCollector { - private const int CountLength = 800; + private const int CountLength = 802; /// /// Creates the buffer for the values. @@ -89,6 +89,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:awskinesis" }), new(new[] { "integration_name:azureservicebus" }), new(new[] { "integration_name:azureeventhubs" }), + new(new[] { "integration_name:azureeventgrid" }), new(new[] { "integration_name:systemrandom" }), new(new[] { "integration_name:awsdynamodb" }), new(new[] { "integration_name:ibmmq" }), @@ -110,13 +111,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:protobuf" }), new(new[] { "integration_name:hangfire" }), new(new[] { "integration_name:serverlesscompat" }), - // spans_finished, index = 89 + // spans_finished, index = 90 new(null), - // spans_enqueued_for_serialization, index = 90 + // spans_enqueued_for_serialization, index = 91 new(new[] { "reason:p0_keep" }), new(new[] { "reason:single_span_sampling" }), new(new[] { "reason:default" }), - // spans_dropped, index = 93 + // spans_dropped, index = 94 new(new[] { "reason:p0_drop" }), new(new[] { "reason:overfull_buffer" }), new(new[] { "reason:trace_too_large" }), @@ -124,13 +125,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:api_error" }), new(new[] { "reason:trace_filter" }), new(new[] { "reason:buffer_locked" }), - // trace_segments_created, index = 100 + // trace_segments_created, index = 101 new(new[] { "new_continued:new" }), new(new[] { "new_continued:continued" }), - // trace_chunks_enqueued_for_serialization, index = 102 + // trace_chunks_enqueued_for_serialization, index = 103 new(new[] { "reason:p0_keep" }), new(new[] { "reason:default" }), - // trace_chunks_dropped, index = 104 + // trace_chunks_dropped, index = 105 new(new[] { "reason:p0_drop" }), new(new[] { "reason:overfull_buffer" }), new(new[] { "reason:trace_too_large" }), @@ -138,13 +139,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:api_error" }), new(new[] { "reason:trace_filter" }), new(new[] { "reason:buffer_locked" }), - // trace_chunks_sent, index = 111 + // trace_chunks_sent, index = 112 new(null), - // trace_segments_closed, index = 112 + // trace_segments_closed, index = 113 new(null), - // trace_api.requests, index = 113 + // trace_api.requests, index = 114 new(null), - // trace_api.responses, index = 114 + // trace_api.responses, index = 115 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -167,35 +168,35 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // trace_api.errors, index = 136 + // trace_api.errors, index = 137 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // trace_partial_flush.count, index = 139 + // trace_partial_flush.count, index = 140 new(new[] { "reason:large_trace" }), new(new[] { "reason:single_span_ingestion" }), - // context_header_style.injected, index = 141 + // context_header_style.injected, index = 142 new(new[] { "header_style:tracecontext" }), new(new[] { "header_style:datadog" }), new(new[] { "header_style:b3multi" }), new(new[] { "header_style:b3single" }), new(new[] { "header_style:baggage" }), - // context_header_style.extracted, index = 146 + // context_header_style.extracted, index = 147 new(new[] { "header_style:tracecontext" }), new(new[] { "header_style:datadog" }), new(new[] { "header_style:b3multi" }), new(new[] { "header_style:b3single" }), new(new[] { "header_style:baggage" }), - // context_header.truncated, index = 151 + // context_header.truncated, index = 152 new(new[] { "truncation_reason:baggage_item_count_exceeded" }), new(new[] { "truncation_reason:baggage_byte_count_exceeded" }), new(new[] { "truncation_reason:baggage_extract_item_exceeded" }), new(new[] { "truncation_reason:baggage_extract_byte_exceeded" }), - // context_header_style.malformed, index = 155 + // context_header_style.malformed, index = 156 new(new[] { "header_style:baggage" }), - // stats_api.requests, index = 156 + // stats_api.requests, index = 157 new(null), - // stats_api.responses, index = 157 + // stats_api.responses, index = 158 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -218,11 +219,11 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // stats_api.errors, index = 179 + // stats_api.errors, index = 180 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // stats_collapsed_spans, index = 182 + // stats_collapsed_spans, index = 183 new(null), new(new[] { "oversized:additional_metric_tags" }), new(new[] { "collapsed:whole_key" }), @@ -257,7 +258,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags", "oversized:additional_metric_tags" }), new(new[] { "collapsed:resource", "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags" }), new(new[] { "collapsed:resource", "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags", "oversized:additional_metric_tags" }), - // otel.env.hiding, index = 216 + // otel.env.hiding, index = 217 new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_log_level" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_metrics_exporter" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_propagators" }), @@ -348,7 +349,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler_arg" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:unknown" }), - // otel.env.invalid, index = 306 + // otel.env.invalid, index = 307 new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_log_level" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_metrics_exporter" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_propagators" }), @@ -439,30 +440,30 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler_arg" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:unknown" }), - // otel.metrics_export_attempts, index = 396 + // otel.metrics_export_attempts, index = 397 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_successes, index = 400 + // otel.metrics_export_successes, index = 401 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_partial_successes, index = 404 + // otel.metrics_export_partial_successes, index = 405 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_failures, index = 408 + // otel.metrics_export_failures, index = 409 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // telemetry_api.requests, index = 412 + // telemetry_api.requests, index = 413 new(new[] { "endpoint:agent" }), new(new[] { "endpoint:agentless" }), - // telemetry_api.responses, index = 414 + // telemetry_api.responses, index = 415 new(new[] { "endpoint:agent", "status_code:200" }), new(new[] { "endpoint:agent", "status_code:201" }), new(new[] { "endpoint:agent", "status_code:202" }), @@ -507,18 +508,18 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "endpoint:agentless", "status_code:503" }), new(new[] { "endpoint:agentless", "status_code:504" }), new(new[] { "endpoint:agentless", "status_code:5xx" }), - // telemetry_api.errors, index = 458 + // telemetry_api.errors, index = 459 new(new[] { "endpoint:agent", "type:timeout" }), new(new[] { "endpoint:agent", "type:network" }), new(new[] { "endpoint:agent", "type:status_code" }), new(new[] { "endpoint:agentless", "type:timeout" }), new(new[] { "endpoint:agentless", "type:network" }), new(new[] { "endpoint:agentless", "type:status_code" }), - // version_conflict_tracers_created, index = 464 + // version_conflict_tracers_created, index = 465 new(null), - // unsupported_custom_instrumentation_services, index = 465 + // unsupported_custom_instrumentation_services, index = 466 new(null), - // direct_log_logs, index = 466 + // direct_log_logs, index = 467 new(new[] { "integration_name:datadog" }), new(new[] { "integration_name:opentracing" }), new(new[] { "integration_name:version_conflict" }), @@ -583,6 +584,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:awskinesis" }), new(new[] { "integration_name:azureservicebus" }), new(new[] { "integration_name:azureeventhubs" }), + new(new[] { "integration_name:azureeventgrid" }), new(new[] { "integration_name:systemrandom" }), new(new[] { "integration_name:awsdynamodb" }), new(new[] { "integration_name:ibmmq" }), @@ -604,9 +606,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:protobuf" }), new(new[] { "integration_name:hangfire" }), new(new[] { "integration_name:serverlesscompat" }), - // direct_log_api.requests, index = 551 + // direct_log_api.requests, index = 553 new(null), - // direct_log_api.responses, index = 552 + // direct_log_api.responses, index = 554 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -629,11 +631,11 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // direct_log_api.errors, index = 574 + // direct_log_api.errors, index = 576 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // memory_pressure.transitions, index = 577 + // memory_pressure.transitions, index = 579 new(new[] { "state:enter", "trigger:none" }), new(new[] { "state:enter", "trigger:memory" }), new(new[] { "state:enter", "trigger:gc" }), @@ -642,10 +644,10 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "trigger:memory" }), new(new[] { "state:exit", "trigger:gc" }), new(new[] { "state:exit", "trigger:both" }), - // memory_pressure.disabled, index = 585 + // memory_pressure.disabled, index = 587 new(new[] { "reason:no_signals" }), new(new[] { "reason:error" }), - // memory_pressure.memory_usage_pct, index = 587 + // memory_pressure.memory_usage_pct, index = 589 new(new[] { "state:enter", "bucket:lt_70" }), new(new[] { "state:enter", "bucket:70_80" }), new(new[] { "state:enter", "bucket:80_85" }), @@ -656,7 +658,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "bucket:80_85" }), new(new[] { "state:exit", "bucket:85_90" }), new(new[] { "state:exit", "bucket:gte_90" }), - // memory_pressure.gc_activity, index = 597 + // memory_pressure.gc_activity, index = 599 new(new[] { "state:enter", "bucket:lt_1" }), new(new[] { "state:enter", "bucket:1_2" }), new(new[] { "state:enter", "bucket:2_5" }), @@ -665,12 +667,12 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "bucket:1_2" }), new(new[] { "state:exit", "bucket:2_5" }), new(new[] { "state:exit", "bucket:gte_5" }), - // memory_pressure.duration, index = 605 + // memory_pressure.duration, index = 607 new(new[] { "bucket:lt_1s" }), new(new[] { "bucket:1_5s" }), new(new[] { "bucket:5_30s" }), new(new[] { "bucket:gte_30s" }), - // events.skipped, index = 609 + // events.skipped, index = 611 new(new[] { "reason:rateLimitGlobal", "event_type:snapshot" }), new(new[] { "reason:rateLimitGlobal", "event_type:log" }), new(new[] { "reason:rateLimitGlobal", "event_type:metric" }), @@ -683,12 +685,12 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:evaluationTimeout", "event_type:log" }), new(new[] { "reason:evaluationTimeout", "event_type:metric" }), new(new[] { "reason:evaluationTimeout", "event_type:span" }), - // events.dropped, index = 621 + // events.dropped, index = 623 new(new[] { "reason:queueFull", "event_type:snapshot" }), new(new[] { "reason:queueFull", "event_type:log" }), new(new[] { "reason:payloadTooLarge", "event_type:snapshot" }), new(new[] { "reason:payloadTooLarge", "event_type:log" }), - // capture.incomplete, index = 625 + // capture.incomplete, index = 627 new(new[] { "event_type:snapshot", "reason:runtimeError" }), new(new[] { "event_type:snapshot", "reason:timeout" }), new(new[] { "event_type:snapshot", "reason:depth" }), @@ -705,13 +707,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "event_type:log", "reason:stringLength" }), new(new[] { "event_type:log", "reason:payloadTooLarge" }), new(new[] { "event_type:log", "reason:other" }), - // waf.init, index = 641 + // waf.init, index = 643 new(new[] { "waf_version", "event_rules_version", "success:true" }), new(new[] { "waf_version", "event_rules_version", "success:false" }), - // waf.updates, index = 643 + // waf.updates, index = 645 new(new[] { "waf_version", "event_rules_version", "success:true" }), new(new[] { "waf_version", "event_rules_version", "success:false" }), - // waf.requests, index = 645 + // waf.requests, index = 647 new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:true", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:true", "request_blocked:true", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), @@ -722,22 +724,22 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:true", "block_failure:false", "rate_limited:false", "input_truncated:true", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:true" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:true", "waf_error:true" }), - // waf.input_truncated, index = 655 + // waf.input_truncated, index = 657 new(new[] { "truncation_reason:string_too_long" }), new(new[] { "truncation_reason:list_or_map_too_large" }), new(new[] { "truncation_reason:object_too_deep" }), - // waf.error, index = 658 + // waf.error, index = 660 new(new[] { "waf_version", "event_rules_version", "waf_error:-127" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-3" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-2" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1" }), - // rasp.rule.eval, index = 662 + // rasp.rule.eval, index = 664 new(new[] { "waf_version", "event_rules_version", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.rule.match, index = 667 + // rasp.rule.match, index = 669 new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:sql_injection" }), @@ -753,13 +755,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.timeout, index = 682 + // rasp.timeout, index = 684 new(new[] { "waf_version", "event_rules_version", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.error, index = 687 + // rasp.error, index = 689 new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:sql_injection" }), @@ -780,7 +782,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.rule.skipped, index = 707 + // rasp.rule.skipped, index = 709 new(new[] { "reason:after-request", "rule_type:lfi" }), new(new[] { "reason:after-request", "rule_type:ssrf" }), new(new[] { "reason:after-request", "rule_type:sql_injection" }), @@ -791,23 +793,23 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:out-of-request", "rule_type:sql_injection" }), new(new[] { "reason:out-of-request", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "reason:out-of-request", "rule_type:command_injection", "rule_variant:exec" }), - // instrum.user_auth.missing_user_id, index = 717 + // instrum.user_auth.missing_user_id, index = 719 new(new[] { "framework:aspnetcore_identity", "event_type:login_success" }), new(new[] { "framework:aspnetcore_identity", "event_type:login_failure" }), new(new[] { "framework:aspnetcore_identity", "event_type:signup" }), new(new[] { "framework:unknown", "event_type:signup" }), - // instrum.user_auth.missing_user_login, index = 721 + // instrum.user_auth.missing_user_login, index = 723 new(new[] { "framework:aspnetcore_identity", "event_type:login_success" }), new(new[] { "framework:aspnetcore_identity", "event_type:login_failure" }), new(new[] { "framework:aspnetcore_identity", "event_type:signup" }), new(new[] { "framework:unknown", "event_type:signup" }), - // sdk.event, index = 725 + // sdk.event, index = 727 new(new[] { "event_type:login_success", "sdk_version:v1" }), new(new[] { "event_type:login_success", "sdk_version:v2" }), new(new[] { "event_type:login_failure", "sdk_version:v1" }), new(new[] { "event_type:login_failure", "sdk_version:v2" }), new(new[] { "event_type:custom", "sdk_version:v1" }), - // executed.source, index = 730 + // executed.source, index = 732 new(new[] { "source_type:http.request.body" }), new(new[] { "source_type:http.request.path" }), new(new[] { "source_type:http.request.parameter.name" }), @@ -822,9 +824,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "source_type:http.request.uri" }), new(new[] { "source_type:grpc.request.body" }), new(new[] { "source_type:sql.row.value" }), - // executed.propagation, index = 744 + // executed.propagation, index = 746 new(null), - // executed.sink, index = 745 + // executed.sink, index = 747 new(new[] { "vulnerability_type:none" }), new(new[] { "vulnerability_type:weak_cipher" }), new(new[] { "vulnerability_type:weak_hash" }), @@ -852,9 +854,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "vulnerability_type:directory_listing_leak" }), new(new[] { "vulnerability_type:session_timeout" }), new(new[] { "vulnerability_type:email_html_injection" }), - // request.tainted, index = 772 + // request.tainted, index = 774 new(null), - // suppressed.vulnerabilities, index = 773 + // suppressed.vulnerabilities, index = 775 new(new[] { "vulnerability_type:none" }), new(new[] { "vulnerability_type:weak_cipher" }), new(new[] { "vulnerability_type:weak_hash" }), @@ -890,7 +892,7 @@ private static AggregatedMetric[] GetCountBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountEntryCounts { get; } - = new int[]{ 4, 85, 1, 3, 7, 2, 2, 7, 1, 1, 1, 22, 3, 2, 5, 5, 4, 1, 1, 22, 3, 34, 90, 90, 4, 4, 4, 4, 2, 44, 6, 1, 1, 85, 1, 22, 3, 8, 2, 10, 8, 4, 12, 4, 16, 2, 2, 10, 3, 4, 5, 15, 5, 20, 10, 4, 4, 5, 14, 1, 27, 1, 27, }; + = new int[]{ 4, 86, 1, 3, 7, 2, 2, 7, 1, 1, 1, 22, 3, 2, 5, 5, 4, 1, 1, 22, 3, 34, 90, 90, 4, 4, 4, 4, 2, 44, 6, 1, 1, 86, 1, 22, 3, 8, 2, 10, 8, 4, 12, 4, 16, 2, 2, 10, 3, 4, 5, 15, 5, 20, 10, 4, 4, 5, 14, 1, 27, 1, 27, }; public void RecordCountLogCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.LogLevel tag, int increment = 1) { @@ -906,357 +908,357 @@ public void RecordCountSpanCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.In public void RecordCountSpanFinished(int increment = 1) { - Interlocked.Add(ref _buffer.Count[89], increment); + Interlocked.Add(ref _buffer.Count[90], increment); } public void RecordCountSpanEnqueuedForSerialization(Datadog.Trace.Telemetry.Metrics.MetricTags.SpanEnqueueReason tag, int increment = 1) { - var index = 90 + (int)tag; + var index = 91 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountSpanDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DropReason tag, int increment = 1) { - var index = 93 + (int)tag; + var index = 94 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceSegmentCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.TraceContinuation tag, int increment = 1) { - var index = 100 + (int)tag; + var index = 101 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkEnqueued(Datadog.Trace.Telemetry.Metrics.MetricTags.TraceChunkEnqueueReason tag, int increment = 1) { - var index = 102 + (int)tag; + var index = 103 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DropReason tag, int increment = 1) { - var index = 104 + (int)tag; + var index = 105 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkSent(int increment = 1) { - Interlocked.Add(ref _buffer.Count[111], increment); + Interlocked.Add(ref _buffer.Count[112], increment); } public void RecordCountTraceSegmentsClosed(int increment = 1) { - Interlocked.Add(ref _buffer.Count[112], increment); + Interlocked.Add(ref _buffer.Count[113], increment); } public void RecordCountTraceApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[113], increment); + Interlocked.Add(ref _buffer.Count[114], increment); } public void RecordCountTraceApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 114 + (int)tag; + var index = 115 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 136 + (int)tag; + var index = 137 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTracePartialFlush(Datadog.Trace.Telemetry.Metrics.MetricTags.PartialFlushReason tag, int increment = 1) { - var index = 139 + (int)tag; + var index = 140 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderStyleInjected(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderStyle tag, int increment = 1) { - var index = 141 + (int)tag; + var index = 142 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderStyleExtracted(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderStyle tag, int increment = 1) { - var index = 146 + (int)tag; + var index = 147 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderTruncated(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderTruncationReason tag, int increment = 1) { - var index = 151 + (int)tag; + var index = 152 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderMalformed(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderMalformed tag, int increment = 1) { - var index = 155 + (int)tag; + var index = 156 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[156], increment); + Interlocked.Add(ref _buffer.Count[157], increment); } public void RecordCountStatsApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 157 + (int)tag; + var index = 158 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 179 + (int)tag; + var index = 180 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsCollapsedSpans(Datadog.Trace.Telemetry.Metrics.MetricTags.CollapsedStatsFields tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OversizedStatsFields tag2, int increment = 1) { - var index = 182 + ((int)tag1 * 2) + (int)tag2; + var index = 183 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountOpenTelemetryConfigHiddenByDatadogConfig(Datadog.Trace.Telemetry.Metrics.MetricTags.DatadogConfiguration tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OpenTelemetryConfiguration tag2, int increment = 1) { - var index = 216 + ((int)tag1 * 10) + (int)tag2; + var index = 217 + ((int)tag1 * 10) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountOpenTelemetryConfigInvalid(Datadog.Trace.Telemetry.Metrics.MetricTags.DatadogConfiguration tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OpenTelemetryConfiguration tag2, int increment = 1) { - var index = 306 + ((int)tag1 * 10) + (int)tag2; + var index = 307 + ((int)tag1 * 10) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportAttempts(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 396 + ((int)tag1 * 2) + (int)tag2; + var index = 397 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportSuccesses(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 400 + ((int)tag1 * 2) + (int)tag2; + var index = 401 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportPartialSuccesses(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 404 + ((int)tag1 * 2) + (int)tag2; + var index = 405 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportFailures(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 408 + ((int)tag1 * 2) + (int)tag2; + var index = 409 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiRequests(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag, int increment = 1) { - var index = 412 + (int)tag; + var index = 413 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag2, int increment = 1) { - var index = 414 + ((int)tag1 * 22) + (int)tag2; + var index = 415 + ((int)tag1 * 22) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag2, int increment = 1) { - var index = 458 + ((int)tag1 * 3) + (int)tag2; + var index = 459 + ((int)tag1 * 3) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountVersionConflictTracerCreated(int increment = 1) { - Interlocked.Add(ref _buffer.Count[464], increment); + Interlocked.Add(ref _buffer.Count[465], increment); } public void RecordCountUnsupportedCustomInstrumentationServices(int increment = 1) { - Interlocked.Add(ref _buffer.Count[465], increment); + Interlocked.Add(ref _buffer.Count[466], increment); } public void RecordCountDirectLogLogs(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag, int increment = 1) { - var index = 466 + (int)tag; + var index = 467 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDirectLogApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[551], increment); + Interlocked.Add(ref _buffer.Count[553], increment); } public void RecordCountDirectLogApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 552 + (int)tag; + var index = 554 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDirectLogApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 574 + (int)tag; + var index = 576 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureTransitions(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureTrigger tag2, int increment = 1) { - var index = 577 + ((int)tag1 * 4) + (int)tag2; + var index = 579 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureDisabled(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureDisabledReason tag, int increment = 1) { - var index = 585 + (int)tag; + var index = 587 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureMemoryUsagePct(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureMemoryBucket tag2, int increment = 1) { - var index = 587 + ((int)tag1 * 5) + (int)tag2; + var index = 589 + ((int)tag1 * 5) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureGcActivity(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureGcBucket tag2, int increment = 1) { - var index = 597 + ((int)tag1 * 4) + (int)tag2; + var index = 599 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureDuration(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureDurationBucket tag, int increment = 1) { - var index = 605 + (int)tag; + var index = 607 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerEventsSkipped(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventsSkippedReason tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventType tag2, int increment = 1) { - var index = 609 + ((int)tag1 * 4) + (int)tag2; + var index = 611 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerEventsDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventsDroppedReason tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureEventType tag2, int increment = 1) { - var index = 621 + ((int)tag1 * 2) + (int)tag2; + var index = 623 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerCaptureIncomplete(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureEventType tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureIncompleteReason tag2, int increment = 1) { - var index = 625 + ((int)tag1 * 8) + (int)tag2; + var index = 627 + ((int)tag1 * 8) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafInit(Datadog.Trace.Telemetry.Metrics.MetricTags.WafStatus tag, int increment = 1) { - var index = 641 + (int)tag; + var index = 643 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafUpdates(Datadog.Trace.Telemetry.Metrics.MetricTags.WafStatus tag, int increment = 1) { - var index = 643 + (int)tag; + var index = 645 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafRequests(Datadog.Trace.Telemetry.Metrics.MetricTags.WafAnalysis tag, int increment = 1) { - var index = 645 + (int)tag; + var index = 647 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountInputTruncated(Datadog.Trace.Telemetry.Metrics.MetricTags.TruncationReason tag, int increment = 1) { - var index = 655 + (int)tag; + var index = 657 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafError(Datadog.Trace.Telemetry.Metrics.MetricTags.WafError tag, int increment = 1) { - var index = 658 + (int)tag; + var index = 660 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleEval(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleType tag, int increment = 1) { - var index = 662 + (int)tag; + var index = 664 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleMatch(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleTypeMatch tag, int increment = 1) { - var index = 667 + (int)tag; + var index = 669 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspTimeout(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleType tag, int increment = 1) { - var index = 682 + (int)tag; + var index = 684 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspError(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspError tag, int increment = 1) { - var index = 687 + (int)tag; + var index = 689 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleSkipped(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleTypeSkipped tag, int increment = 1) { - var index = 707 + (int)tag; + var index = 709 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMissingUserId(Datadog.Trace.Telemetry.Metrics.MetricTags.AuthenticationFrameworkWithEventType tag, int increment = 1) { - var index = 717 + (int)tag; + var index = 719 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMissingUserLogin(Datadog.Trace.Telemetry.Metrics.MetricTags.AuthenticationFrameworkWithEventType tag, int increment = 1) { - var index = 721 + (int)tag; + var index = 723 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountUserEventSdk(Datadog.Trace.Telemetry.Metrics.MetricTags.UserEventSdk tag, int increment = 1) { - var index = 725 + (int)tag; + var index = 727 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastExecutedSources(Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType tag, int increment = 1) { - var index = 730 + (int)tag; + var index = 732 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastExecutedPropagations(int increment = 1) { - Interlocked.Add(ref _buffer.Count[744], increment); + Interlocked.Add(ref _buffer.Count[746], increment); } public void RecordCountIastExecutedSinks(Datadog.Trace.Telemetry.Metrics.MetricTags.IastVulnerabilityType tag, int increment = 1) { - var index = 745 + (int)tag; + var index = 747 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastRequestTainted(int increment = 1) { - Interlocked.Add(ref _buffer.Count[772], increment); + Interlocked.Add(ref _buffer.Count[774], increment); } public void RecordCountIastSuppressedVulnerabilities(Datadog.Trace.Telemetry.Metrics.MetricTags.IastVulnerabilityType tag, int increment = 1) { - var index = 773 + (int)tag; + var index = 775 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } } \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs index 82355f89f551..0268d09801b7 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class MetricsTelemetryCollector { - private const int CountSharedLength = 340; + private const int CountSharedLength = 344; /// /// Creates the buffer for the values. @@ -276,6 +276,10 @@ private static AggregatedMetric[] GetCountSharedBuffer() new(new[] { "integration_name:azureeventhubs", "error_type:invoker" }), new(new[] { "integration_name:azureeventhubs", "error_type:execution" }), new(new[] { "integration_name:azureeventhubs", "error_type:missing_member" }), + new(new[] { "integration_name:azureeventgrid", "error_type:duck_typing" }), + new(new[] { "integration_name:azureeventgrid", "error_type:invoker" }), + new(new[] { "integration_name:azureeventgrid", "error_type:execution" }), + new(new[] { "integration_name:azureeventgrid", "error_type:missing_member" }), new(new[] { "integration_name:systemrandom", "error_type:duck_typing" }), new(new[] { "integration_name:systemrandom", "error_type:invoker" }), new(new[] { "integration_name:systemrandom", "error_type:execution" }), @@ -368,7 +372,7 @@ private static AggregatedMetric[] GetCountSharedBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountSharedEntryCounts { get; } - = new int[]{ 340, }; + = new int[]{ 344, }; public void RecordCountSharedIntegrationsError(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.InstrumentationError tag2, int increment = 1) { diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs index cfc3e86ece7b..79b784525c54 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs @@ -17,7 +17,7 @@ internal static partial class IntegrationIdExtensions /// The number of members in the enum. /// This is a non-distinct count of defined names. /// - public const int Length = 80; + public const int Length = 81; /// /// Returns the string representation of the value. @@ -106,6 +106,7 @@ public static string ToStringFast(this Datadog.Trace.Configuration.IntegrationId Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection => nameof(Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection), Datadog.Trace.Configuration.IntegrationId.Protobuf => nameof(Datadog.Trace.Configuration.IntegrationId.Protobuf), Datadog.Trace.Configuration.IntegrationId.AzureEventHubs => nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventHubs), + Datadog.Trace.Configuration.IntegrationId.AzureEventGrid => nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventGrid), Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict => nameof(Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict), Datadog.Trace.Configuration.IntegrationId.Hangfire => nameof(Datadog.Trace.Configuration.IntegrationId.Hangfire), Datadog.Trace.Configuration.IntegrationId.OpenFeature => nameof(Datadog.Trace.Configuration.IntegrationId.OpenFeature), @@ -199,6 +200,7 @@ public static Datadog.Trace.Configuration.IntegrationId[] GetValues() Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection, Datadog.Trace.Configuration.IntegrationId.Protobuf, Datadog.Trace.Configuration.IntegrationId.AzureEventHubs, + Datadog.Trace.Configuration.IntegrationId.AzureEventGrid, Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict, Datadog.Trace.Configuration.IntegrationId.Hangfire, Datadog.Trace.Configuration.IntegrationId.OpenFeature, @@ -292,6 +294,7 @@ public static string[] GetNames() nameof(Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection), nameof(Datadog.Trace.Configuration.IntegrationId.Protobuf), nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventHubs), + nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventGrid), nameof(Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict), nameof(Datadog.Trace.Configuration.IntegrationId.Hangfire), nameof(Datadog.Trace.Configuration.IntegrationId.OpenFeature), diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs index 20b20f78f193..4b700cb16a0b 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs @@ -250,6 +250,9 @@ public static string[] GetAllIntegrationEnabledKeys() => "DD_TRACE_AZUREEVENTHUBS_ENABLED", "DD_TRACE_AzureEventHubs_ENABLED", "DD_AzureEventHubs_ENABLED", "DD_TRACE_AZUREEVENTHUBS_ANALYTICS_ENABLED", "DD_TRACE_AzureEventHubs_ANALYTICS_ENABLED", "DD_AzureEventHubs_ANALYTICS_ENABLED", "DD_TRACE_AZUREEVENTHUBS_ANALYTICS_SAMPLE_RATE", "DD_TRACE_AzureEventHubs_ANALYTICS_SAMPLE_RATE", "DD_AzureEventHubs_ANALYTICS_SAMPLE_RATE", + "DD_TRACE_AZUREEVENTGRID_ENABLED", "DD_TRACE_AzureEventGrid_ENABLED", "DD_AzureEventGrid_ENABLED", + "DD_TRACE_AZUREEVENTGRID_ANALYTICS_ENABLED", "DD_TRACE_AzureEventGrid_ANALYTICS_ENABLED", "DD_AzureEventGrid_ANALYTICS_ENABLED", + "DD_TRACE_AZUREEVENTGRID_ANALYTICS_SAMPLE_RATE", "DD_TRACE_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ENABLED", "DD_TRACE_DatadogTraceVersionConflict_ENABLED", "DD_DatadogTraceVersionConflict_ENABLED", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_ENABLED", "DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_SAMPLE_RATE", "DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", "DD_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", @@ -348,6 +351,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ENABLED", ["DD_TRACE_EmailHtmlInjection_ENABLED", "DD_EmailHtmlInjection_ENABLED"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ENABLED", ["DD_TRACE_Protobuf_ENABLED", "DD_Protobuf_ENABLED"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ENABLED", ["DD_TRACE_AzureEventHubs_ENABLED", "DD_AzureEventHubs_ENABLED"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ENABLED", ["DD_TRACE_AzureEventGrid_ENABLED", "DD_AzureEventGrid_ENABLED"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ENABLED", ["DD_TRACE_DatadogTraceVersionConflict_ENABLED", "DD_DatadogTraceVersionConflict_ENABLED"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ENABLED", ["DD_TRACE_Hangfire_ENABLED", "DD_Hangfire_ENABLED"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ENABLED", ["DD_TRACE_OpenFeature_ENABLED", "DD_OpenFeature_ENABLED"]), @@ -440,6 +444,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ANALYTICS_ENABLED", ["DD_TRACE_EmailHtmlInjection_ANALYTICS_ENABLED", "DD_EmailHtmlInjection_ANALYTICS_ENABLED"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ANALYTICS_ENABLED", ["DD_TRACE_Protobuf_ANALYTICS_ENABLED", "DD_Protobuf_ANALYTICS_ENABLED"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ANALYTICS_ENABLED", ["DD_TRACE_AzureEventHubs_ANALYTICS_ENABLED", "DD_AzureEventHubs_ANALYTICS_ENABLED"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ANALYTICS_ENABLED", ["DD_TRACE_AzureEventGrid_ANALYTICS_ENABLED", "DD_AzureEventGrid_ANALYTICS_ENABLED"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_ENABLED", ["DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_DatadogTraceVersionConflict_ANALYTICS_ENABLED"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ANALYTICS_ENABLED", ["DD_TRACE_Hangfire_ANALYTICS_ENABLED", "DD_Hangfire_ANALYTICS_ENABLED"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ANALYTICS_ENABLED", ["DD_TRACE_OpenFeature_ANALYTICS_ENABLED", "DD_OpenFeature_ANALYTICS_ENABLED"]), @@ -532,6 +537,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_EmailHtmlInjection_ANALYTICS_SAMPLE_RATE", "DD_EmailHtmlInjection_ANALYTICS_SAMPLE_RATE"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_Protobuf_ANALYTICS_SAMPLE_RATE", "DD_Protobuf_ANALYTICS_SAMPLE_RATE"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_AzureEventHubs_ANALYTICS_SAMPLE_RATE", "DD_AzureEventHubs_ANALYTICS_SAMPLE_RATE"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_AzureEventGrid_ANALYTICS_SAMPLE_RATE"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", "DD_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_Hangfire_ANALYTICS_SAMPLE_RATE", "DD_Hangfire_ANALYTICS_SAMPLE_RATE"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_OpenFeature_ANALYTICS_SAMPLE_RATE", "DD_OpenFeature_ANALYTICS_SAMPLE_RATE"]), diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs new file mode 100644 index 000000000000..9fbb3989de91 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs @@ -0,0 +1,212 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +using Datadog.Trace.Processors; +using Datadog.Trace.Tagging; +using System; + +namespace Datadog.Trace.Tagging +{ + partial class AzureEventGridTags + { + // SpanKindBytes = MessagePack.Serialize("span.kind"); + private static ReadOnlySpan SpanKindBytes => [169, 115, 112, 97, 110, 46, 107, 105, 110, 100]; + + // InstrumentationNameBytes = MessagePack.Serialize("component"); + private static ReadOnlySpan InstrumentationNameBytes => [169, 99, 111, 109, 112, 111, 110, 101, 110, 116]; + + // MessagingSystemBytes = MessagePack.Serialize("messaging.system"); + private static ReadOnlySpan MessagingSystemBytes => [176, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 115, 121, 115, 116, 101, 109]; + + // MessagingOperationBytes = MessagePack.Serialize("messaging.operation"); + private static ReadOnlySpan MessagingOperationBytes => [179, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 111, 112, 101, 114, 97, 116, 105, 111, 110]; + + // MessagingDestinationNameBytes = MessagePack.Serialize("messaging.destination.name"); + private static ReadOnlySpan MessagingDestinationNameBytes => [186, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 110, 97, 109, 101]; + + // NetworkDestinationNameBytes = MessagePack.Serialize("network.destination.name"); + private static ReadOnlySpan NetworkDestinationNameBytes => [184, 110, 101, 116, 119, 111, 114, 107, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 110, 97, 109, 101]; + + // NetworkDestinationPortBytes = MessagePack.Serialize("network.destination.port"); + private static ReadOnlySpan NetworkDestinationPortBytes => [184, 110, 101, 116, 119, 111, 114, 107, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 112, 111, 114, 116]; + + // MessagingBatchMessageCountBytes = MessagePack.Serialize("messaging.batch.message_count"); + private static ReadOnlySpan MessagingBatchMessageCountBytes => [189, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 98, 97, 116, 99, 104, 46, 109, 101, 115, 115, 97, 103, 101, 95, 99, 111, 117, 110, 116]; + + // MessagingMessageIdBytes = MessagePack.Serialize("messaging.message_id"); + private static ReadOnlySpan MessagingMessageIdBytes => [180, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 109, 101, 115, 115, 97, 103, 101, 95, 105, 100]; + + public override string? GetTag(string key) + { + return key switch + { + "span.kind" => SpanKind, + "component" => InstrumentationName, + "messaging.system" => MessagingSystem, + "messaging.operation" => MessagingOperation, + "messaging.destination.name" => MessagingDestinationName, + "network.destination.name" => NetworkDestinationName, + "network.destination.port" => NetworkDestinationPort, + "messaging.batch.message_count" => MessagingBatchMessageCount, + "messaging.message_id" => MessagingMessageId, + _ => base.GetTag(key), + }; + } + + public override void SetTag(string key, string? value) + { + switch(key) + { + case "messaging.operation": + MessagingOperation = value; + break; + case "messaging.destination.name": + MessagingDestinationName = value; + break; + case "network.destination.name": + NetworkDestinationName = value; + break; + case "network.destination.port": + NetworkDestinationPort = value; + break; + case "messaging.batch.message_count": + MessagingBatchMessageCount = value; + break; + case "messaging.message_id": + MessagingMessageId = value; + break; + case "span.kind": + case "component": + case "messaging.system": + Logger.Value.Warning("Attempted to set readonly tag {TagName} on {TagType}. Ignoring.", key, nameof(AzureEventGridTags)); + break; + default: + base.SetTag(key, value); + break; + } + } + + public override void EnumerateTags(ref TProcessor processor, bool openTelemetrySemanticsEnabled) + { + if (SpanKind is not null) + { + processor.Process(new TagItem("span.kind", SpanKind, SpanKindBytes)); + } + + if (InstrumentationName is not null) + { + processor.Process(new TagItem("component", InstrumentationName, InstrumentationNameBytes)); + } + + if (MessagingSystem is not null) + { + processor.Process(new TagItem("messaging.system", MessagingSystem, MessagingSystemBytes)); + } + + if (MessagingOperation is not null) + { + processor.Process(new TagItem("messaging.operation", MessagingOperation, MessagingOperationBytes)); + } + + if (MessagingDestinationName is not null) + { + processor.Process(new TagItem("messaging.destination.name", MessagingDestinationName, MessagingDestinationNameBytes)); + } + + if (NetworkDestinationName is not null) + { + processor.Process(new TagItem("network.destination.name", NetworkDestinationName, NetworkDestinationNameBytes)); + } + + if (NetworkDestinationPort is not null) + { + processor.Process(new TagItem("network.destination.port", NetworkDestinationPort, NetworkDestinationPortBytes)); + } + + if (MessagingBatchMessageCount is not null) + { + processor.Process(new TagItem("messaging.batch.message_count", MessagingBatchMessageCount, MessagingBatchMessageCountBytes)); + } + + if (MessagingMessageId is not null) + { + processor.Process(new TagItem("messaging.message_id", MessagingMessageId, MessagingMessageIdBytes)); + } + + base.EnumerateTags(ref processor, openTelemetrySemanticsEnabled); + } + + protected override void WriteAdditionalTags(System.Text.StringBuilder sb) + { + if (SpanKind is not null) + { + sb.Append("span.kind (tag):") + .Append(SpanKind) + .Append(','); + } + + if (InstrumentationName is not null) + { + sb.Append("component (tag):") + .Append(InstrumentationName) + .Append(','); + } + + if (MessagingSystem is not null) + { + sb.Append("messaging.system (tag):") + .Append(MessagingSystem) + .Append(','); + } + + if (MessagingOperation is not null) + { + sb.Append("messaging.operation (tag):") + .Append(MessagingOperation) + .Append(','); + } + + if (MessagingDestinationName is not null) + { + sb.Append("messaging.destination.name (tag):") + .Append(MessagingDestinationName) + .Append(','); + } + + if (NetworkDestinationName is not null) + { + sb.Append("network.destination.name (tag):") + .Append(NetworkDestinationName) + .Append(','); + } + + if (NetworkDestinationPort is not null) + { + sb.Append("network.destination.port (tag):") + .Append(NetworkDestinationPort) + .Append(','); + } + + if (MessagingBatchMessageCount is not null) + { + sb.Append("messaging.batch.message_count (tag):") + .Append(MessagingBatchMessageCount) + .Append(','); + } + + if (MessagingMessageId is not null) + { + sb.Append("messaging.message_id (tag):") + .Append(MessagingMessageId) + .Append(','); + } + + base.WriteAdditionalTags(sb); + } + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs new file mode 100644 index 000000000000..4d1324bc41d3 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs @@ -0,0 +1,83 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +using Datadog.Trace.Processors; +using Datadog.Trace.Tagging; +using System; + +namespace Datadog.Trace.Tagging +{ + partial class AzureEventGridV1Tags + { + // PeerServiceBytes = MessagePack.Serialize("peer.service"); + private static ReadOnlySpan PeerServiceBytes => [172, 112, 101, 101, 114, 46, 115, 101, 114, 118, 105, 99, 101]; + + // PeerServiceSourceBytes = MessagePack.Serialize("_dd.peer.service.source"); + private static ReadOnlySpan PeerServiceSourceBytes => [183, 95, 100, 100, 46, 112, 101, 101, 114, 46, 115, 101, 114, 118, 105, 99, 101, 46, 115, 111, 117, 114, 99, 101]; + + public override string? GetTag(string key) + { + return key switch + { + "peer.service" => PeerService, + "_dd.peer.service.source" => PeerServiceSource, + _ => base.GetTag(key), + }; + } + + public override void SetTag(string key, string? value) + { + switch(key) + { + case "peer.service": + PeerService = value; + break; + case "_dd.peer.service.source": + Logger.Value.Warning("Attempted to set readonly tag {TagName} on {TagType}. Ignoring.", key, nameof(AzureEventGridV1Tags)); + break; + default: + base.SetTag(key, value); + break; + } + } + + public override void EnumerateTags(ref TProcessor processor, bool openTelemetrySemanticsEnabled) + { + if (PeerService is not null) + { + processor.Process(new TagItem("peer.service", PeerService, PeerServiceBytes)); + } + + if (PeerServiceSource is not null) + { + processor.Process(new TagItem("_dd.peer.service.source", PeerServiceSource, PeerServiceSourceBytes)); + } + + base.EnumerateTags(ref processor, openTelemetrySemanticsEnabled); + } + + protected override void WriteAdditionalTags(System.Text.StringBuilder sb) + { + if (PeerService is not null) + { + sb.Append("peer.service (tag):") + .Append(PeerService) + .Append(','); + } + + if (PeerServiceSource is not null) + { + sb.Append("_dd.peer.service.source (tag):") + .Append(PeerServiceSource) + .Append(','); + } + + base.WriteAdditionalTags(sb); + } + } +} diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs index 074a939c1ce9..4f3392fc24bb 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class CiVisibilityMetricsTelemetryCollector { - private const int CountSharedLength = 340; + private const int CountSharedLength = 344; /// /// Creates the buffer for the values. @@ -276,6 +276,10 @@ private static AggregatedMetric[] GetCountSharedBuffer() new(new[] { "integration_name:azureeventhubs", "error_type:invoker" }), new(new[] { "integration_name:azureeventhubs", "error_type:execution" }), new(new[] { "integration_name:azureeventhubs", "error_type:missing_member" }), + new(new[] { "integration_name:azureeventgrid", "error_type:duck_typing" }), + new(new[] { "integration_name:azureeventgrid", "error_type:invoker" }), + new(new[] { "integration_name:azureeventgrid", "error_type:execution" }), + new(new[] { "integration_name:azureeventgrid", "error_type:missing_member" }), new(new[] { "integration_name:systemrandom", "error_type:duck_typing" }), new(new[] { "integration_name:systemrandom", "error_type:invoker" }), new(new[] { "integration_name:systemrandom", "error_type:execution" }), @@ -368,7 +372,7 @@ private static AggregatedMetric[] GetCountSharedBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountSharedEntryCounts { get; } - = new int[]{ 340, }; + = new int[]{ 344, }; public void RecordCountSharedIntegrationsError(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.InstrumentationError tag2, int increment = 1) { diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs index 5593f1cb4e54..779c9be4bf9b 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class MetricsTelemetryCollector { - private const int CountLength = 800; + private const int CountLength = 802; /// /// Creates the buffer for the values. @@ -89,6 +89,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:awskinesis" }), new(new[] { "integration_name:azureservicebus" }), new(new[] { "integration_name:azureeventhubs" }), + new(new[] { "integration_name:azureeventgrid" }), new(new[] { "integration_name:systemrandom" }), new(new[] { "integration_name:awsdynamodb" }), new(new[] { "integration_name:ibmmq" }), @@ -110,13 +111,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:protobuf" }), new(new[] { "integration_name:hangfire" }), new(new[] { "integration_name:serverlesscompat" }), - // spans_finished, index = 89 + // spans_finished, index = 90 new(null), - // spans_enqueued_for_serialization, index = 90 + // spans_enqueued_for_serialization, index = 91 new(new[] { "reason:p0_keep" }), new(new[] { "reason:single_span_sampling" }), new(new[] { "reason:default" }), - // spans_dropped, index = 93 + // spans_dropped, index = 94 new(new[] { "reason:p0_drop" }), new(new[] { "reason:overfull_buffer" }), new(new[] { "reason:trace_too_large" }), @@ -124,13 +125,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:api_error" }), new(new[] { "reason:trace_filter" }), new(new[] { "reason:buffer_locked" }), - // trace_segments_created, index = 100 + // trace_segments_created, index = 101 new(new[] { "new_continued:new" }), new(new[] { "new_continued:continued" }), - // trace_chunks_enqueued_for_serialization, index = 102 + // trace_chunks_enqueued_for_serialization, index = 103 new(new[] { "reason:p0_keep" }), new(new[] { "reason:default" }), - // trace_chunks_dropped, index = 104 + // trace_chunks_dropped, index = 105 new(new[] { "reason:p0_drop" }), new(new[] { "reason:overfull_buffer" }), new(new[] { "reason:trace_too_large" }), @@ -138,13 +139,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:api_error" }), new(new[] { "reason:trace_filter" }), new(new[] { "reason:buffer_locked" }), - // trace_chunks_sent, index = 111 + // trace_chunks_sent, index = 112 new(null), - // trace_segments_closed, index = 112 + // trace_segments_closed, index = 113 new(null), - // trace_api.requests, index = 113 + // trace_api.requests, index = 114 new(null), - // trace_api.responses, index = 114 + // trace_api.responses, index = 115 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -167,35 +168,35 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // trace_api.errors, index = 136 + // trace_api.errors, index = 137 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // trace_partial_flush.count, index = 139 + // trace_partial_flush.count, index = 140 new(new[] { "reason:large_trace" }), new(new[] { "reason:single_span_ingestion" }), - // context_header_style.injected, index = 141 + // context_header_style.injected, index = 142 new(new[] { "header_style:tracecontext" }), new(new[] { "header_style:datadog" }), new(new[] { "header_style:b3multi" }), new(new[] { "header_style:b3single" }), new(new[] { "header_style:baggage" }), - // context_header_style.extracted, index = 146 + // context_header_style.extracted, index = 147 new(new[] { "header_style:tracecontext" }), new(new[] { "header_style:datadog" }), new(new[] { "header_style:b3multi" }), new(new[] { "header_style:b3single" }), new(new[] { "header_style:baggage" }), - // context_header.truncated, index = 151 + // context_header.truncated, index = 152 new(new[] { "truncation_reason:baggage_item_count_exceeded" }), new(new[] { "truncation_reason:baggage_byte_count_exceeded" }), new(new[] { "truncation_reason:baggage_extract_item_exceeded" }), new(new[] { "truncation_reason:baggage_extract_byte_exceeded" }), - // context_header_style.malformed, index = 155 + // context_header_style.malformed, index = 156 new(new[] { "header_style:baggage" }), - // stats_api.requests, index = 156 + // stats_api.requests, index = 157 new(null), - // stats_api.responses, index = 157 + // stats_api.responses, index = 158 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -218,11 +219,11 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // stats_api.errors, index = 179 + // stats_api.errors, index = 180 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // stats_collapsed_spans, index = 182 + // stats_collapsed_spans, index = 183 new(null), new(new[] { "oversized:additional_metric_tags" }), new(new[] { "collapsed:whole_key" }), @@ -257,7 +258,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags", "oversized:additional_metric_tags" }), new(new[] { "collapsed:resource", "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags" }), new(new[] { "collapsed:resource", "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags", "oversized:additional_metric_tags" }), - // otel.env.hiding, index = 216 + // otel.env.hiding, index = 217 new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_log_level" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_metrics_exporter" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_propagators" }), @@ -348,7 +349,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler_arg" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:unknown" }), - // otel.env.invalid, index = 306 + // otel.env.invalid, index = 307 new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_log_level" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_metrics_exporter" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_propagators" }), @@ -439,30 +440,30 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler_arg" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:unknown" }), - // otel.metrics_export_attempts, index = 396 + // otel.metrics_export_attempts, index = 397 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_successes, index = 400 + // otel.metrics_export_successes, index = 401 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_partial_successes, index = 404 + // otel.metrics_export_partial_successes, index = 405 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_failures, index = 408 + // otel.metrics_export_failures, index = 409 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // telemetry_api.requests, index = 412 + // telemetry_api.requests, index = 413 new(new[] { "endpoint:agent" }), new(new[] { "endpoint:agentless" }), - // telemetry_api.responses, index = 414 + // telemetry_api.responses, index = 415 new(new[] { "endpoint:agent", "status_code:200" }), new(new[] { "endpoint:agent", "status_code:201" }), new(new[] { "endpoint:agent", "status_code:202" }), @@ -507,18 +508,18 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "endpoint:agentless", "status_code:503" }), new(new[] { "endpoint:agentless", "status_code:504" }), new(new[] { "endpoint:agentless", "status_code:5xx" }), - // telemetry_api.errors, index = 458 + // telemetry_api.errors, index = 459 new(new[] { "endpoint:agent", "type:timeout" }), new(new[] { "endpoint:agent", "type:network" }), new(new[] { "endpoint:agent", "type:status_code" }), new(new[] { "endpoint:agentless", "type:timeout" }), new(new[] { "endpoint:agentless", "type:network" }), new(new[] { "endpoint:agentless", "type:status_code" }), - // version_conflict_tracers_created, index = 464 + // version_conflict_tracers_created, index = 465 new(null), - // unsupported_custom_instrumentation_services, index = 465 + // unsupported_custom_instrumentation_services, index = 466 new(null), - // direct_log_logs, index = 466 + // direct_log_logs, index = 467 new(new[] { "integration_name:datadog" }), new(new[] { "integration_name:opentracing" }), new(new[] { "integration_name:version_conflict" }), @@ -583,6 +584,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:awskinesis" }), new(new[] { "integration_name:azureservicebus" }), new(new[] { "integration_name:azureeventhubs" }), + new(new[] { "integration_name:azureeventgrid" }), new(new[] { "integration_name:systemrandom" }), new(new[] { "integration_name:awsdynamodb" }), new(new[] { "integration_name:ibmmq" }), @@ -604,9 +606,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:protobuf" }), new(new[] { "integration_name:hangfire" }), new(new[] { "integration_name:serverlesscompat" }), - // direct_log_api.requests, index = 551 + // direct_log_api.requests, index = 553 new(null), - // direct_log_api.responses, index = 552 + // direct_log_api.responses, index = 554 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -629,11 +631,11 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // direct_log_api.errors, index = 574 + // direct_log_api.errors, index = 576 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // memory_pressure.transitions, index = 577 + // memory_pressure.transitions, index = 579 new(new[] { "state:enter", "trigger:none" }), new(new[] { "state:enter", "trigger:memory" }), new(new[] { "state:enter", "trigger:gc" }), @@ -642,10 +644,10 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "trigger:memory" }), new(new[] { "state:exit", "trigger:gc" }), new(new[] { "state:exit", "trigger:both" }), - // memory_pressure.disabled, index = 585 + // memory_pressure.disabled, index = 587 new(new[] { "reason:no_signals" }), new(new[] { "reason:error" }), - // memory_pressure.memory_usage_pct, index = 587 + // memory_pressure.memory_usage_pct, index = 589 new(new[] { "state:enter", "bucket:lt_70" }), new(new[] { "state:enter", "bucket:70_80" }), new(new[] { "state:enter", "bucket:80_85" }), @@ -656,7 +658,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "bucket:80_85" }), new(new[] { "state:exit", "bucket:85_90" }), new(new[] { "state:exit", "bucket:gte_90" }), - // memory_pressure.gc_activity, index = 597 + // memory_pressure.gc_activity, index = 599 new(new[] { "state:enter", "bucket:lt_1" }), new(new[] { "state:enter", "bucket:1_2" }), new(new[] { "state:enter", "bucket:2_5" }), @@ -665,12 +667,12 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "bucket:1_2" }), new(new[] { "state:exit", "bucket:2_5" }), new(new[] { "state:exit", "bucket:gte_5" }), - // memory_pressure.duration, index = 605 + // memory_pressure.duration, index = 607 new(new[] { "bucket:lt_1s" }), new(new[] { "bucket:1_5s" }), new(new[] { "bucket:5_30s" }), new(new[] { "bucket:gte_30s" }), - // events.skipped, index = 609 + // events.skipped, index = 611 new(new[] { "reason:rateLimitGlobal", "event_type:snapshot" }), new(new[] { "reason:rateLimitGlobal", "event_type:log" }), new(new[] { "reason:rateLimitGlobal", "event_type:metric" }), @@ -683,12 +685,12 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:evaluationTimeout", "event_type:log" }), new(new[] { "reason:evaluationTimeout", "event_type:metric" }), new(new[] { "reason:evaluationTimeout", "event_type:span" }), - // events.dropped, index = 621 + // events.dropped, index = 623 new(new[] { "reason:queueFull", "event_type:snapshot" }), new(new[] { "reason:queueFull", "event_type:log" }), new(new[] { "reason:payloadTooLarge", "event_type:snapshot" }), new(new[] { "reason:payloadTooLarge", "event_type:log" }), - // capture.incomplete, index = 625 + // capture.incomplete, index = 627 new(new[] { "event_type:snapshot", "reason:runtimeError" }), new(new[] { "event_type:snapshot", "reason:timeout" }), new(new[] { "event_type:snapshot", "reason:depth" }), @@ -705,13 +707,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "event_type:log", "reason:stringLength" }), new(new[] { "event_type:log", "reason:payloadTooLarge" }), new(new[] { "event_type:log", "reason:other" }), - // waf.init, index = 641 + // waf.init, index = 643 new(new[] { "waf_version", "event_rules_version", "success:true" }), new(new[] { "waf_version", "event_rules_version", "success:false" }), - // waf.updates, index = 643 + // waf.updates, index = 645 new(new[] { "waf_version", "event_rules_version", "success:true" }), new(new[] { "waf_version", "event_rules_version", "success:false" }), - // waf.requests, index = 645 + // waf.requests, index = 647 new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:true", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:true", "request_blocked:true", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), @@ -722,22 +724,22 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:true", "block_failure:false", "rate_limited:false", "input_truncated:true", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:true" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:true", "waf_error:true" }), - // waf.input_truncated, index = 655 + // waf.input_truncated, index = 657 new(new[] { "truncation_reason:string_too_long" }), new(new[] { "truncation_reason:list_or_map_too_large" }), new(new[] { "truncation_reason:object_too_deep" }), - // waf.error, index = 658 + // waf.error, index = 660 new(new[] { "waf_version", "event_rules_version", "waf_error:-127" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-3" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-2" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1" }), - // rasp.rule.eval, index = 662 + // rasp.rule.eval, index = 664 new(new[] { "waf_version", "event_rules_version", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.rule.match, index = 667 + // rasp.rule.match, index = 669 new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:sql_injection" }), @@ -753,13 +755,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.timeout, index = 682 + // rasp.timeout, index = 684 new(new[] { "waf_version", "event_rules_version", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.error, index = 687 + // rasp.error, index = 689 new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:sql_injection" }), @@ -780,7 +782,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.rule.skipped, index = 707 + // rasp.rule.skipped, index = 709 new(new[] { "reason:after-request", "rule_type:lfi" }), new(new[] { "reason:after-request", "rule_type:ssrf" }), new(new[] { "reason:after-request", "rule_type:sql_injection" }), @@ -791,23 +793,23 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:out-of-request", "rule_type:sql_injection" }), new(new[] { "reason:out-of-request", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "reason:out-of-request", "rule_type:command_injection", "rule_variant:exec" }), - // instrum.user_auth.missing_user_id, index = 717 + // instrum.user_auth.missing_user_id, index = 719 new(new[] { "framework:aspnetcore_identity", "event_type:login_success" }), new(new[] { "framework:aspnetcore_identity", "event_type:login_failure" }), new(new[] { "framework:aspnetcore_identity", "event_type:signup" }), new(new[] { "framework:unknown", "event_type:signup" }), - // instrum.user_auth.missing_user_login, index = 721 + // instrum.user_auth.missing_user_login, index = 723 new(new[] { "framework:aspnetcore_identity", "event_type:login_success" }), new(new[] { "framework:aspnetcore_identity", "event_type:login_failure" }), new(new[] { "framework:aspnetcore_identity", "event_type:signup" }), new(new[] { "framework:unknown", "event_type:signup" }), - // sdk.event, index = 725 + // sdk.event, index = 727 new(new[] { "event_type:login_success", "sdk_version:v1" }), new(new[] { "event_type:login_success", "sdk_version:v2" }), new(new[] { "event_type:login_failure", "sdk_version:v1" }), new(new[] { "event_type:login_failure", "sdk_version:v2" }), new(new[] { "event_type:custom", "sdk_version:v1" }), - // executed.source, index = 730 + // executed.source, index = 732 new(new[] { "source_type:http.request.body" }), new(new[] { "source_type:http.request.path" }), new(new[] { "source_type:http.request.parameter.name" }), @@ -822,9 +824,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "source_type:http.request.uri" }), new(new[] { "source_type:grpc.request.body" }), new(new[] { "source_type:sql.row.value" }), - // executed.propagation, index = 744 + // executed.propagation, index = 746 new(null), - // executed.sink, index = 745 + // executed.sink, index = 747 new(new[] { "vulnerability_type:none" }), new(new[] { "vulnerability_type:weak_cipher" }), new(new[] { "vulnerability_type:weak_hash" }), @@ -852,9 +854,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "vulnerability_type:directory_listing_leak" }), new(new[] { "vulnerability_type:session_timeout" }), new(new[] { "vulnerability_type:email_html_injection" }), - // request.tainted, index = 772 + // request.tainted, index = 774 new(null), - // suppressed.vulnerabilities, index = 773 + // suppressed.vulnerabilities, index = 775 new(new[] { "vulnerability_type:none" }), new(new[] { "vulnerability_type:weak_cipher" }), new(new[] { "vulnerability_type:weak_hash" }), @@ -890,7 +892,7 @@ private static AggregatedMetric[] GetCountBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountEntryCounts { get; } - = new int[]{ 4, 85, 1, 3, 7, 2, 2, 7, 1, 1, 1, 22, 3, 2, 5, 5, 4, 1, 1, 22, 3, 34, 90, 90, 4, 4, 4, 4, 2, 44, 6, 1, 1, 85, 1, 22, 3, 8, 2, 10, 8, 4, 12, 4, 16, 2, 2, 10, 3, 4, 5, 15, 5, 20, 10, 4, 4, 5, 14, 1, 27, 1, 27, }; + = new int[]{ 4, 86, 1, 3, 7, 2, 2, 7, 1, 1, 1, 22, 3, 2, 5, 5, 4, 1, 1, 22, 3, 34, 90, 90, 4, 4, 4, 4, 2, 44, 6, 1, 1, 86, 1, 22, 3, 8, 2, 10, 8, 4, 12, 4, 16, 2, 2, 10, 3, 4, 5, 15, 5, 20, 10, 4, 4, 5, 14, 1, 27, 1, 27, }; public void RecordCountLogCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.LogLevel tag, int increment = 1) { @@ -906,357 +908,357 @@ public void RecordCountSpanCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.In public void RecordCountSpanFinished(int increment = 1) { - Interlocked.Add(ref _buffer.Count[89], increment); + Interlocked.Add(ref _buffer.Count[90], increment); } public void RecordCountSpanEnqueuedForSerialization(Datadog.Trace.Telemetry.Metrics.MetricTags.SpanEnqueueReason tag, int increment = 1) { - var index = 90 + (int)tag; + var index = 91 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountSpanDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DropReason tag, int increment = 1) { - var index = 93 + (int)tag; + var index = 94 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceSegmentCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.TraceContinuation tag, int increment = 1) { - var index = 100 + (int)tag; + var index = 101 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkEnqueued(Datadog.Trace.Telemetry.Metrics.MetricTags.TraceChunkEnqueueReason tag, int increment = 1) { - var index = 102 + (int)tag; + var index = 103 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DropReason tag, int increment = 1) { - var index = 104 + (int)tag; + var index = 105 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkSent(int increment = 1) { - Interlocked.Add(ref _buffer.Count[111], increment); + Interlocked.Add(ref _buffer.Count[112], increment); } public void RecordCountTraceSegmentsClosed(int increment = 1) { - Interlocked.Add(ref _buffer.Count[112], increment); + Interlocked.Add(ref _buffer.Count[113], increment); } public void RecordCountTraceApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[113], increment); + Interlocked.Add(ref _buffer.Count[114], increment); } public void RecordCountTraceApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 114 + (int)tag; + var index = 115 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 136 + (int)tag; + var index = 137 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTracePartialFlush(Datadog.Trace.Telemetry.Metrics.MetricTags.PartialFlushReason tag, int increment = 1) { - var index = 139 + (int)tag; + var index = 140 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderStyleInjected(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderStyle tag, int increment = 1) { - var index = 141 + (int)tag; + var index = 142 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderStyleExtracted(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderStyle tag, int increment = 1) { - var index = 146 + (int)tag; + var index = 147 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderTruncated(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderTruncationReason tag, int increment = 1) { - var index = 151 + (int)tag; + var index = 152 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderMalformed(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderMalformed tag, int increment = 1) { - var index = 155 + (int)tag; + var index = 156 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[156], increment); + Interlocked.Add(ref _buffer.Count[157], increment); } public void RecordCountStatsApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 157 + (int)tag; + var index = 158 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 179 + (int)tag; + var index = 180 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsCollapsedSpans(Datadog.Trace.Telemetry.Metrics.MetricTags.CollapsedStatsFields tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OversizedStatsFields tag2, int increment = 1) { - var index = 182 + ((int)tag1 * 2) + (int)tag2; + var index = 183 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountOpenTelemetryConfigHiddenByDatadogConfig(Datadog.Trace.Telemetry.Metrics.MetricTags.DatadogConfiguration tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OpenTelemetryConfiguration tag2, int increment = 1) { - var index = 216 + ((int)tag1 * 10) + (int)tag2; + var index = 217 + ((int)tag1 * 10) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountOpenTelemetryConfigInvalid(Datadog.Trace.Telemetry.Metrics.MetricTags.DatadogConfiguration tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OpenTelemetryConfiguration tag2, int increment = 1) { - var index = 306 + ((int)tag1 * 10) + (int)tag2; + var index = 307 + ((int)tag1 * 10) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportAttempts(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 396 + ((int)tag1 * 2) + (int)tag2; + var index = 397 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportSuccesses(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 400 + ((int)tag1 * 2) + (int)tag2; + var index = 401 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportPartialSuccesses(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 404 + ((int)tag1 * 2) + (int)tag2; + var index = 405 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportFailures(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 408 + ((int)tag1 * 2) + (int)tag2; + var index = 409 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiRequests(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag, int increment = 1) { - var index = 412 + (int)tag; + var index = 413 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag2, int increment = 1) { - var index = 414 + ((int)tag1 * 22) + (int)tag2; + var index = 415 + ((int)tag1 * 22) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag2, int increment = 1) { - var index = 458 + ((int)tag1 * 3) + (int)tag2; + var index = 459 + ((int)tag1 * 3) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountVersionConflictTracerCreated(int increment = 1) { - Interlocked.Add(ref _buffer.Count[464], increment); + Interlocked.Add(ref _buffer.Count[465], increment); } public void RecordCountUnsupportedCustomInstrumentationServices(int increment = 1) { - Interlocked.Add(ref _buffer.Count[465], increment); + Interlocked.Add(ref _buffer.Count[466], increment); } public void RecordCountDirectLogLogs(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag, int increment = 1) { - var index = 466 + (int)tag; + var index = 467 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDirectLogApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[551], increment); + Interlocked.Add(ref _buffer.Count[553], increment); } public void RecordCountDirectLogApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 552 + (int)tag; + var index = 554 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDirectLogApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 574 + (int)tag; + var index = 576 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureTransitions(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureTrigger tag2, int increment = 1) { - var index = 577 + ((int)tag1 * 4) + (int)tag2; + var index = 579 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureDisabled(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureDisabledReason tag, int increment = 1) { - var index = 585 + (int)tag; + var index = 587 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureMemoryUsagePct(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureMemoryBucket tag2, int increment = 1) { - var index = 587 + ((int)tag1 * 5) + (int)tag2; + var index = 589 + ((int)tag1 * 5) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureGcActivity(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureGcBucket tag2, int increment = 1) { - var index = 597 + ((int)tag1 * 4) + (int)tag2; + var index = 599 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureDuration(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureDurationBucket tag, int increment = 1) { - var index = 605 + (int)tag; + var index = 607 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerEventsSkipped(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventsSkippedReason tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventType tag2, int increment = 1) { - var index = 609 + ((int)tag1 * 4) + (int)tag2; + var index = 611 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerEventsDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventsDroppedReason tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureEventType tag2, int increment = 1) { - var index = 621 + ((int)tag1 * 2) + (int)tag2; + var index = 623 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerCaptureIncomplete(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureEventType tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureIncompleteReason tag2, int increment = 1) { - var index = 625 + ((int)tag1 * 8) + (int)tag2; + var index = 627 + ((int)tag1 * 8) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafInit(Datadog.Trace.Telemetry.Metrics.MetricTags.WafStatus tag, int increment = 1) { - var index = 641 + (int)tag; + var index = 643 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafUpdates(Datadog.Trace.Telemetry.Metrics.MetricTags.WafStatus tag, int increment = 1) { - var index = 643 + (int)tag; + var index = 645 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafRequests(Datadog.Trace.Telemetry.Metrics.MetricTags.WafAnalysis tag, int increment = 1) { - var index = 645 + (int)tag; + var index = 647 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountInputTruncated(Datadog.Trace.Telemetry.Metrics.MetricTags.TruncationReason tag, int increment = 1) { - var index = 655 + (int)tag; + var index = 657 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafError(Datadog.Trace.Telemetry.Metrics.MetricTags.WafError tag, int increment = 1) { - var index = 658 + (int)tag; + var index = 660 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleEval(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleType tag, int increment = 1) { - var index = 662 + (int)tag; + var index = 664 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleMatch(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleTypeMatch tag, int increment = 1) { - var index = 667 + (int)tag; + var index = 669 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspTimeout(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleType tag, int increment = 1) { - var index = 682 + (int)tag; + var index = 684 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspError(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspError tag, int increment = 1) { - var index = 687 + (int)tag; + var index = 689 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleSkipped(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleTypeSkipped tag, int increment = 1) { - var index = 707 + (int)tag; + var index = 709 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMissingUserId(Datadog.Trace.Telemetry.Metrics.MetricTags.AuthenticationFrameworkWithEventType tag, int increment = 1) { - var index = 717 + (int)tag; + var index = 719 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMissingUserLogin(Datadog.Trace.Telemetry.Metrics.MetricTags.AuthenticationFrameworkWithEventType tag, int increment = 1) { - var index = 721 + (int)tag; + var index = 723 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountUserEventSdk(Datadog.Trace.Telemetry.Metrics.MetricTags.UserEventSdk tag, int increment = 1) { - var index = 725 + (int)tag; + var index = 727 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastExecutedSources(Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType tag, int increment = 1) { - var index = 730 + (int)tag; + var index = 732 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastExecutedPropagations(int increment = 1) { - Interlocked.Add(ref _buffer.Count[744], increment); + Interlocked.Add(ref _buffer.Count[746], increment); } public void RecordCountIastExecutedSinks(Datadog.Trace.Telemetry.Metrics.MetricTags.IastVulnerabilityType tag, int increment = 1) { - var index = 745 + (int)tag; + var index = 747 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastRequestTainted(int increment = 1) { - Interlocked.Add(ref _buffer.Count[772], increment); + Interlocked.Add(ref _buffer.Count[774], increment); } public void RecordCountIastSuppressedVulnerabilities(Datadog.Trace.Telemetry.Metrics.MetricTags.IastVulnerabilityType tag, int increment = 1) { - var index = 773 + (int)tag; + var index = 775 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } } \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs index 82355f89f551..0268d09801b7 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class MetricsTelemetryCollector { - private const int CountSharedLength = 340; + private const int CountSharedLength = 344; /// /// Creates the buffer for the values. @@ -276,6 +276,10 @@ private static AggregatedMetric[] GetCountSharedBuffer() new(new[] { "integration_name:azureeventhubs", "error_type:invoker" }), new(new[] { "integration_name:azureeventhubs", "error_type:execution" }), new(new[] { "integration_name:azureeventhubs", "error_type:missing_member" }), + new(new[] { "integration_name:azureeventgrid", "error_type:duck_typing" }), + new(new[] { "integration_name:azureeventgrid", "error_type:invoker" }), + new(new[] { "integration_name:azureeventgrid", "error_type:execution" }), + new(new[] { "integration_name:azureeventgrid", "error_type:missing_member" }), new(new[] { "integration_name:systemrandom", "error_type:duck_typing" }), new(new[] { "integration_name:systemrandom", "error_type:invoker" }), new(new[] { "integration_name:systemrandom", "error_type:execution" }), @@ -368,7 +372,7 @@ private static AggregatedMetric[] GetCountSharedBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountSharedEntryCounts { get; } - = new int[]{ 340, }; + = new int[]{ 344, }; public void RecordCountSharedIntegrationsError(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.InstrumentationError tag2, int increment = 1) { diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs index cfc3e86ece7b..79b784525c54 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs @@ -17,7 +17,7 @@ internal static partial class IntegrationIdExtensions /// The number of members in the enum. /// This is a non-distinct count of defined names. /// - public const int Length = 80; + public const int Length = 81; /// /// Returns the string representation of the value. @@ -106,6 +106,7 @@ public static string ToStringFast(this Datadog.Trace.Configuration.IntegrationId Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection => nameof(Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection), Datadog.Trace.Configuration.IntegrationId.Protobuf => nameof(Datadog.Trace.Configuration.IntegrationId.Protobuf), Datadog.Trace.Configuration.IntegrationId.AzureEventHubs => nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventHubs), + Datadog.Trace.Configuration.IntegrationId.AzureEventGrid => nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventGrid), Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict => nameof(Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict), Datadog.Trace.Configuration.IntegrationId.Hangfire => nameof(Datadog.Trace.Configuration.IntegrationId.Hangfire), Datadog.Trace.Configuration.IntegrationId.OpenFeature => nameof(Datadog.Trace.Configuration.IntegrationId.OpenFeature), @@ -199,6 +200,7 @@ public static Datadog.Trace.Configuration.IntegrationId[] GetValues() Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection, Datadog.Trace.Configuration.IntegrationId.Protobuf, Datadog.Trace.Configuration.IntegrationId.AzureEventHubs, + Datadog.Trace.Configuration.IntegrationId.AzureEventGrid, Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict, Datadog.Trace.Configuration.IntegrationId.Hangfire, Datadog.Trace.Configuration.IntegrationId.OpenFeature, @@ -292,6 +294,7 @@ public static string[] GetNames() nameof(Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection), nameof(Datadog.Trace.Configuration.IntegrationId.Protobuf), nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventHubs), + nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventGrid), nameof(Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict), nameof(Datadog.Trace.Configuration.IntegrationId.Hangfire), nameof(Datadog.Trace.Configuration.IntegrationId.OpenFeature), diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs index 20b20f78f193..4b700cb16a0b 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs @@ -250,6 +250,9 @@ public static string[] GetAllIntegrationEnabledKeys() => "DD_TRACE_AZUREEVENTHUBS_ENABLED", "DD_TRACE_AzureEventHubs_ENABLED", "DD_AzureEventHubs_ENABLED", "DD_TRACE_AZUREEVENTHUBS_ANALYTICS_ENABLED", "DD_TRACE_AzureEventHubs_ANALYTICS_ENABLED", "DD_AzureEventHubs_ANALYTICS_ENABLED", "DD_TRACE_AZUREEVENTHUBS_ANALYTICS_SAMPLE_RATE", "DD_TRACE_AzureEventHubs_ANALYTICS_SAMPLE_RATE", "DD_AzureEventHubs_ANALYTICS_SAMPLE_RATE", + "DD_TRACE_AZUREEVENTGRID_ENABLED", "DD_TRACE_AzureEventGrid_ENABLED", "DD_AzureEventGrid_ENABLED", + "DD_TRACE_AZUREEVENTGRID_ANALYTICS_ENABLED", "DD_TRACE_AzureEventGrid_ANALYTICS_ENABLED", "DD_AzureEventGrid_ANALYTICS_ENABLED", + "DD_TRACE_AZUREEVENTGRID_ANALYTICS_SAMPLE_RATE", "DD_TRACE_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ENABLED", "DD_TRACE_DatadogTraceVersionConflict_ENABLED", "DD_DatadogTraceVersionConflict_ENABLED", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_ENABLED", "DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_SAMPLE_RATE", "DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", "DD_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", @@ -348,6 +351,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ENABLED", ["DD_TRACE_EmailHtmlInjection_ENABLED", "DD_EmailHtmlInjection_ENABLED"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ENABLED", ["DD_TRACE_Protobuf_ENABLED", "DD_Protobuf_ENABLED"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ENABLED", ["DD_TRACE_AzureEventHubs_ENABLED", "DD_AzureEventHubs_ENABLED"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ENABLED", ["DD_TRACE_AzureEventGrid_ENABLED", "DD_AzureEventGrid_ENABLED"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ENABLED", ["DD_TRACE_DatadogTraceVersionConflict_ENABLED", "DD_DatadogTraceVersionConflict_ENABLED"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ENABLED", ["DD_TRACE_Hangfire_ENABLED", "DD_Hangfire_ENABLED"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ENABLED", ["DD_TRACE_OpenFeature_ENABLED", "DD_OpenFeature_ENABLED"]), @@ -440,6 +444,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ANALYTICS_ENABLED", ["DD_TRACE_EmailHtmlInjection_ANALYTICS_ENABLED", "DD_EmailHtmlInjection_ANALYTICS_ENABLED"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ANALYTICS_ENABLED", ["DD_TRACE_Protobuf_ANALYTICS_ENABLED", "DD_Protobuf_ANALYTICS_ENABLED"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ANALYTICS_ENABLED", ["DD_TRACE_AzureEventHubs_ANALYTICS_ENABLED", "DD_AzureEventHubs_ANALYTICS_ENABLED"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ANALYTICS_ENABLED", ["DD_TRACE_AzureEventGrid_ANALYTICS_ENABLED", "DD_AzureEventGrid_ANALYTICS_ENABLED"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_ENABLED", ["DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_DatadogTraceVersionConflict_ANALYTICS_ENABLED"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ANALYTICS_ENABLED", ["DD_TRACE_Hangfire_ANALYTICS_ENABLED", "DD_Hangfire_ANALYTICS_ENABLED"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ANALYTICS_ENABLED", ["DD_TRACE_OpenFeature_ANALYTICS_ENABLED", "DD_OpenFeature_ANALYTICS_ENABLED"]), @@ -532,6 +537,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_EmailHtmlInjection_ANALYTICS_SAMPLE_RATE", "DD_EmailHtmlInjection_ANALYTICS_SAMPLE_RATE"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_Protobuf_ANALYTICS_SAMPLE_RATE", "DD_Protobuf_ANALYTICS_SAMPLE_RATE"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_AzureEventHubs_ANALYTICS_SAMPLE_RATE", "DD_AzureEventHubs_ANALYTICS_SAMPLE_RATE"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_AzureEventGrid_ANALYTICS_SAMPLE_RATE"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", "DD_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_Hangfire_ANALYTICS_SAMPLE_RATE", "DD_Hangfire_ANALYTICS_SAMPLE_RATE"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_OpenFeature_ANALYTICS_SAMPLE_RATE", "DD_OpenFeature_ANALYTICS_SAMPLE_RATE"]), diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs new file mode 100644 index 000000000000..9fbb3989de91 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs @@ -0,0 +1,212 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +using Datadog.Trace.Processors; +using Datadog.Trace.Tagging; +using System; + +namespace Datadog.Trace.Tagging +{ + partial class AzureEventGridTags + { + // SpanKindBytes = MessagePack.Serialize("span.kind"); + private static ReadOnlySpan SpanKindBytes => [169, 115, 112, 97, 110, 46, 107, 105, 110, 100]; + + // InstrumentationNameBytes = MessagePack.Serialize("component"); + private static ReadOnlySpan InstrumentationNameBytes => [169, 99, 111, 109, 112, 111, 110, 101, 110, 116]; + + // MessagingSystemBytes = MessagePack.Serialize("messaging.system"); + private static ReadOnlySpan MessagingSystemBytes => [176, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 115, 121, 115, 116, 101, 109]; + + // MessagingOperationBytes = MessagePack.Serialize("messaging.operation"); + private static ReadOnlySpan MessagingOperationBytes => [179, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 111, 112, 101, 114, 97, 116, 105, 111, 110]; + + // MessagingDestinationNameBytes = MessagePack.Serialize("messaging.destination.name"); + private static ReadOnlySpan MessagingDestinationNameBytes => [186, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 110, 97, 109, 101]; + + // NetworkDestinationNameBytes = MessagePack.Serialize("network.destination.name"); + private static ReadOnlySpan NetworkDestinationNameBytes => [184, 110, 101, 116, 119, 111, 114, 107, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 110, 97, 109, 101]; + + // NetworkDestinationPortBytes = MessagePack.Serialize("network.destination.port"); + private static ReadOnlySpan NetworkDestinationPortBytes => [184, 110, 101, 116, 119, 111, 114, 107, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 112, 111, 114, 116]; + + // MessagingBatchMessageCountBytes = MessagePack.Serialize("messaging.batch.message_count"); + private static ReadOnlySpan MessagingBatchMessageCountBytes => [189, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 98, 97, 116, 99, 104, 46, 109, 101, 115, 115, 97, 103, 101, 95, 99, 111, 117, 110, 116]; + + // MessagingMessageIdBytes = MessagePack.Serialize("messaging.message_id"); + private static ReadOnlySpan MessagingMessageIdBytes => [180, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 109, 101, 115, 115, 97, 103, 101, 95, 105, 100]; + + public override string? GetTag(string key) + { + return key switch + { + "span.kind" => SpanKind, + "component" => InstrumentationName, + "messaging.system" => MessagingSystem, + "messaging.operation" => MessagingOperation, + "messaging.destination.name" => MessagingDestinationName, + "network.destination.name" => NetworkDestinationName, + "network.destination.port" => NetworkDestinationPort, + "messaging.batch.message_count" => MessagingBatchMessageCount, + "messaging.message_id" => MessagingMessageId, + _ => base.GetTag(key), + }; + } + + public override void SetTag(string key, string? value) + { + switch(key) + { + case "messaging.operation": + MessagingOperation = value; + break; + case "messaging.destination.name": + MessagingDestinationName = value; + break; + case "network.destination.name": + NetworkDestinationName = value; + break; + case "network.destination.port": + NetworkDestinationPort = value; + break; + case "messaging.batch.message_count": + MessagingBatchMessageCount = value; + break; + case "messaging.message_id": + MessagingMessageId = value; + break; + case "span.kind": + case "component": + case "messaging.system": + Logger.Value.Warning("Attempted to set readonly tag {TagName} on {TagType}. Ignoring.", key, nameof(AzureEventGridTags)); + break; + default: + base.SetTag(key, value); + break; + } + } + + public override void EnumerateTags(ref TProcessor processor, bool openTelemetrySemanticsEnabled) + { + if (SpanKind is not null) + { + processor.Process(new TagItem("span.kind", SpanKind, SpanKindBytes)); + } + + if (InstrumentationName is not null) + { + processor.Process(new TagItem("component", InstrumentationName, InstrumentationNameBytes)); + } + + if (MessagingSystem is not null) + { + processor.Process(new TagItem("messaging.system", MessagingSystem, MessagingSystemBytes)); + } + + if (MessagingOperation is not null) + { + processor.Process(new TagItem("messaging.operation", MessagingOperation, MessagingOperationBytes)); + } + + if (MessagingDestinationName is not null) + { + processor.Process(new TagItem("messaging.destination.name", MessagingDestinationName, MessagingDestinationNameBytes)); + } + + if (NetworkDestinationName is not null) + { + processor.Process(new TagItem("network.destination.name", NetworkDestinationName, NetworkDestinationNameBytes)); + } + + if (NetworkDestinationPort is not null) + { + processor.Process(new TagItem("network.destination.port", NetworkDestinationPort, NetworkDestinationPortBytes)); + } + + if (MessagingBatchMessageCount is not null) + { + processor.Process(new TagItem("messaging.batch.message_count", MessagingBatchMessageCount, MessagingBatchMessageCountBytes)); + } + + if (MessagingMessageId is not null) + { + processor.Process(new TagItem("messaging.message_id", MessagingMessageId, MessagingMessageIdBytes)); + } + + base.EnumerateTags(ref processor, openTelemetrySemanticsEnabled); + } + + protected override void WriteAdditionalTags(System.Text.StringBuilder sb) + { + if (SpanKind is not null) + { + sb.Append("span.kind (tag):") + .Append(SpanKind) + .Append(','); + } + + if (InstrumentationName is not null) + { + sb.Append("component (tag):") + .Append(InstrumentationName) + .Append(','); + } + + if (MessagingSystem is not null) + { + sb.Append("messaging.system (tag):") + .Append(MessagingSystem) + .Append(','); + } + + if (MessagingOperation is not null) + { + sb.Append("messaging.operation (tag):") + .Append(MessagingOperation) + .Append(','); + } + + if (MessagingDestinationName is not null) + { + sb.Append("messaging.destination.name (tag):") + .Append(MessagingDestinationName) + .Append(','); + } + + if (NetworkDestinationName is not null) + { + sb.Append("network.destination.name (tag):") + .Append(NetworkDestinationName) + .Append(','); + } + + if (NetworkDestinationPort is not null) + { + sb.Append("network.destination.port (tag):") + .Append(NetworkDestinationPort) + .Append(','); + } + + if (MessagingBatchMessageCount is not null) + { + sb.Append("messaging.batch.message_count (tag):") + .Append(MessagingBatchMessageCount) + .Append(','); + } + + if (MessagingMessageId is not null) + { + sb.Append("messaging.message_id (tag):") + .Append(MessagingMessageId) + .Append(','); + } + + base.WriteAdditionalTags(sb); + } + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs new file mode 100644 index 000000000000..4d1324bc41d3 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs @@ -0,0 +1,83 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +using Datadog.Trace.Processors; +using Datadog.Trace.Tagging; +using System; + +namespace Datadog.Trace.Tagging +{ + partial class AzureEventGridV1Tags + { + // PeerServiceBytes = MessagePack.Serialize("peer.service"); + private static ReadOnlySpan PeerServiceBytes => [172, 112, 101, 101, 114, 46, 115, 101, 114, 118, 105, 99, 101]; + + // PeerServiceSourceBytes = MessagePack.Serialize("_dd.peer.service.source"); + private static ReadOnlySpan PeerServiceSourceBytes => [183, 95, 100, 100, 46, 112, 101, 101, 114, 46, 115, 101, 114, 118, 105, 99, 101, 46, 115, 111, 117, 114, 99, 101]; + + public override string? GetTag(string key) + { + return key switch + { + "peer.service" => PeerService, + "_dd.peer.service.source" => PeerServiceSource, + _ => base.GetTag(key), + }; + } + + public override void SetTag(string key, string? value) + { + switch(key) + { + case "peer.service": + PeerService = value; + break; + case "_dd.peer.service.source": + Logger.Value.Warning("Attempted to set readonly tag {TagName} on {TagType}. Ignoring.", key, nameof(AzureEventGridV1Tags)); + break; + default: + base.SetTag(key, value); + break; + } + } + + public override void EnumerateTags(ref TProcessor processor, bool openTelemetrySemanticsEnabled) + { + if (PeerService is not null) + { + processor.Process(new TagItem("peer.service", PeerService, PeerServiceBytes)); + } + + if (PeerServiceSource is not null) + { + processor.Process(new TagItem("_dd.peer.service.source", PeerServiceSource, PeerServiceSourceBytes)); + } + + base.EnumerateTags(ref processor, openTelemetrySemanticsEnabled); + } + + protected override void WriteAdditionalTags(System.Text.StringBuilder sb) + { + if (PeerService is not null) + { + sb.Append("peer.service (tag):") + .Append(PeerService) + .Append(','); + } + + if (PeerServiceSource is not null) + { + sb.Append("_dd.peer.service.source (tag):") + .Append(PeerServiceSource) + .Append(','); + } + + base.WriteAdditionalTags(sb); + } + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs index 074a939c1ce9..4f3392fc24bb 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class CiVisibilityMetricsTelemetryCollector { - private const int CountSharedLength = 340; + private const int CountSharedLength = 344; /// /// Creates the buffer for the values. @@ -276,6 +276,10 @@ private static AggregatedMetric[] GetCountSharedBuffer() new(new[] { "integration_name:azureeventhubs", "error_type:invoker" }), new(new[] { "integration_name:azureeventhubs", "error_type:execution" }), new(new[] { "integration_name:azureeventhubs", "error_type:missing_member" }), + new(new[] { "integration_name:azureeventgrid", "error_type:duck_typing" }), + new(new[] { "integration_name:azureeventgrid", "error_type:invoker" }), + new(new[] { "integration_name:azureeventgrid", "error_type:execution" }), + new(new[] { "integration_name:azureeventgrid", "error_type:missing_member" }), new(new[] { "integration_name:systemrandom", "error_type:duck_typing" }), new(new[] { "integration_name:systemrandom", "error_type:invoker" }), new(new[] { "integration_name:systemrandom", "error_type:execution" }), @@ -368,7 +372,7 @@ private static AggregatedMetric[] GetCountSharedBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountSharedEntryCounts { get; } - = new int[]{ 340, }; + = new int[]{ 344, }; public void RecordCountSharedIntegrationsError(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.InstrumentationError tag2, int increment = 1) { diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs index 5593f1cb4e54..779c9be4bf9b 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class MetricsTelemetryCollector { - private const int CountLength = 800; + private const int CountLength = 802; /// /// Creates the buffer for the values. @@ -89,6 +89,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:awskinesis" }), new(new[] { "integration_name:azureservicebus" }), new(new[] { "integration_name:azureeventhubs" }), + new(new[] { "integration_name:azureeventgrid" }), new(new[] { "integration_name:systemrandom" }), new(new[] { "integration_name:awsdynamodb" }), new(new[] { "integration_name:ibmmq" }), @@ -110,13 +111,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:protobuf" }), new(new[] { "integration_name:hangfire" }), new(new[] { "integration_name:serverlesscompat" }), - // spans_finished, index = 89 + // spans_finished, index = 90 new(null), - // spans_enqueued_for_serialization, index = 90 + // spans_enqueued_for_serialization, index = 91 new(new[] { "reason:p0_keep" }), new(new[] { "reason:single_span_sampling" }), new(new[] { "reason:default" }), - // spans_dropped, index = 93 + // spans_dropped, index = 94 new(new[] { "reason:p0_drop" }), new(new[] { "reason:overfull_buffer" }), new(new[] { "reason:trace_too_large" }), @@ -124,13 +125,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:api_error" }), new(new[] { "reason:trace_filter" }), new(new[] { "reason:buffer_locked" }), - // trace_segments_created, index = 100 + // trace_segments_created, index = 101 new(new[] { "new_continued:new" }), new(new[] { "new_continued:continued" }), - // trace_chunks_enqueued_for_serialization, index = 102 + // trace_chunks_enqueued_for_serialization, index = 103 new(new[] { "reason:p0_keep" }), new(new[] { "reason:default" }), - // trace_chunks_dropped, index = 104 + // trace_chunks_dropped, index = 105 new(new[] { "reason:p0_drop" }), new(new[] { "reason:overfull_buffer" }), new(new[] { "reason:trace_too_large" }), @@ -138,13 +139,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:api_error" }), new(new[] { "reason:trace_filter" }), new(new[] { "reason:buffer_locked" }), - // trace_chunks_sent, index = 111 + // trace_chunks_sent, index = 112 new(null), - // trace_segments_closed, index = 112 + // trace_segments_closed, index = 113 new(null), - // trace_api.requests, index = 113 + // trace_api.requests, index = 114 new(null), - // trace_api.responses, index = 114 + // trace_api.responses, index = 115 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -167,35 +168,35 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // trace_api.errors, index = 136 + // trace_api.errors, index = 137 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // trace_partial_flush.count, index = 139 + // trace_partial_flush.count, index = 140 new(new[] { "reason:large_trace" }), new(new[] { "reason:single_span_ingestion" }), - // context_header_style.injected, index = 141 + // context_header_style.injected, index = 142 new(new[] { "header_style:tracecontext" }), new(new[] { "header_style:datadog" }), new(new[] { "header_style:b3multi" }), new(new[] { "header_style:b3single" }), new(new[] { "header_style:baggage" }), - // context_header_style.extracted, index = 146 + // context_header_style.extracted, index = 147 new(new[] { "header_style:tracecontext" }), new(new[] { "header_style:datadog" }), new(new[] { "header_style:b3multi" }), new(new[] { "header_style:b3single" }), new(new[] { "header_style:baggage" }), - // context_header.truncated, index = 151 + // context_header.truncated, index = 152 new(new[] { "truncation_reason:baggage_item_count_exceeded" }), new(new[] { "truncation_reason:baggage_byte_count_exceeded" }), new(new[] { "truncation_reason:baggage_extract_item_exceeded" }), new(new[] { "truncation_reason:baggage_extract_byte_exceeded" }), - // context_header_style.malformed, index = 155 + // context_header_style.malformed, index = 156 new(new[] { "header_style:baggage" }), - // stats_api.requests, index = 156 + // stats_api.requests, index = 157 new(null), - // stats_api.responses, index = 157 + // stats_api.responses, index = 158 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -218,11 +219,11 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // stats_api.errors, index = 179 + // stats_api.errors, index = 180 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // stats_collapsed_spans, index = 182 + // stats_collapsed_spans, index = 183 new(null), new(new[] { "oversized:additional_metric_tags" }), new(new[] { "collapsed:whole_key" }), @@ -257,7 +258,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags", "oversized:additional_metric_tags" }), new(new[] { "collapsed:resource", "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags" }), new(new[] { "collapsed:resource", "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags", "oversized:additional_metric_tags" }), - // otel.env.hiding, index = 216 + // otel.env.hiding, index = 217 new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_log_level" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_metrics_exporter" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_propagators" }), @@ -348,7 +349,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler_arg" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:unknown" }), - // otel.env.invalid, index = 306 + // otel.env.invalid, index = 307 new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_log_level" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_metrics_exporter" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_propagators" }), @@ -439,30 +440,30 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler_arg" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:unknown" }), - // otel.metrics_export_attempts, index = 396 + // otel.metrics_export_attempts, index = 397 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_successes, index = 400 + // otel.metrics_export_successes, index = 401 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_partial_successes, index = 404 + // otel.metrics_export_partial_successes, index = 405 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_failures, index = 408 + // otel.metrics_export_failures, index = 409 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // telemetry_api.requests, index = 412 + // telemetry_api.requests, index = 413 new(new[] { "endpoint:agent" }), new(new[] { "endpoint:agentless" }), - // telemetry_api.responses, index = 414 + // telemetry_api.responses, index = 415 new(new[] { "endpoint:agent", "status_code:200" }), new(new[] { "endpoint:agent", "status_code:201" }), new(new[] { "endpoint:agent", "status_code:202" }), @@ -507,18 +508,18 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "endpoint:agentless", "status_code:503" }), new(new[] { "endpoint:agentless", "status_code:504" }), new(new[] { "endpoint:agentless", "status_code:5xx" }), - // telemetry_api.errors, index = 458 + // telemetry_api.errors, index = 459 new(new[] { "endpoint:agent", "type:timeout" }), new(new[] { "endpoint:agent", "type:network" }), new(new[] { "endpoint:agent", "type:status_code" }), new(new[] { "endpoint:agentless", "type:timeout" }), new(new[] { "endpoint:agentless", "type:network" }), new(new[] { "endpoint:agentless", "type:status_code" }), - // version_conflict_tracers_created, index = 464 + // version_conflict_tracers_created, index = 465 new(null), - // unsupported_custom_instrumentation_services, index = 465 + // unsupported_custom_instrumentation_services, index = 466 new(null), - // direct_log_logs, index = 466 + // direct_log_logs, index = 467 new(new[] { "integration_name:datadog" }), new(new[] { "integration_name:opentracing" }), new(new[] { "integration_name:version_conflict" }), @@ -583,6 +584,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:awskinesis" }), new(new[] { "integration_name:azureservicebus" }), new(new[] { "integration_name:azureeventhubs" }), + new(new[] { "integration_name:azureeventgrid" }), new(new[] { "integration_name:systemrandom" }), new(new[] { "integration_name:awsdynamodb" }), new(new[] { "integration_name:ibmmq" }), @@ -604,9 +606,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:protobuf" }), new(new[] { "integration_name:hangfire" }), new(new[] { "integration_name:serverlesscompat" }), - // direct_log_api.requests, index = 551 + // direct_log_api.requests, index = 553 new(null), - // direct_log_api.responses, index = 552 + // direct_log_api.responses, index = 554 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -629,11 +631,11 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // direct_log_api.errors, index = 574 + // direct_log_api.errors, index = 576 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // memory_pressure.transitions, index = 577 + // memory_pressure.transitions, index = 579 new(new[] { "state:enter", "trigger:none" }), new(new[] { "state:enter", "trigger:memory" }), new(new[] { "state:enter", "trigger:gc" }), @@ -642,10 +644,10 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "trigger:memory" }), new(new[] { "state:exit", "trigger:gc" }), new(new[] { "state:exit", "trigger:both" }), - // memory_pressure.disabled, index = 585 + // memory_pressure.disabled, index = 587 new(new[] { "reason:no_signals" }), new(new[] { "reason:error" }), - // memory_pressure.memory_usage_pct, index = 587 + // memory_pressure.memory_usage_pct, index = 589 new(new[] { "state:enter", "bucket:lt_70" }), new(new[] { "state:enter", "bucket:70_80" }), new(new[] { "state:enter", "bucket:80_85" }), @@ -656,7 +658,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "bucket:80_85" }), new(new[] { "state:exit", "bucket:85_90" }), new(new[] { "state:exit", "bucket:gte_90" }), - // memory_pressure.gc_activity, index = 597 + // memory_pressure.gc_activity, index = 599 new(new[] { "state:enter", "bucket:lt_1" }), new(new[] { "state:enter", "bucket:1_2" }), new(new[] { "state:enter", "bucket:2_5" }), @@ -665,12 +667,12 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "bucket:1_2" }), new(new[] { "state:exit", "bucket:2_5" }), new(new[] { "state:exit", "bucket:gte_5" }), - // memory_pressure.duration, index = 605 + // memory_pressure.duration, index = 607 new(new[] { "bucket:lt_1s" }), new(new[] { "bucket:1_5s" }), new(new[] { "bucket:5_30s" }), new(new[] { "bucket:gte_30s" }), - // events.skipped, index = 609 + // events.skipped, index = 611 new(new[] { "reason:rateLimitGlobal", "event_type:snapshot" }), new(new[] { "reason:rateLimitGlobal", "event_type:log" }), new(new[] { "reason:rateLimitGlobal", "event_type:metric" }), @@ -683,12 +685,12 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:evaluationTimeout", "event_type:log" }), new(new[] { "reason:evaluationTimeout", "event_type:metric" }), new(new[] { "reason:evaluationTimeout", "event_type:span" }), - // events.dropped, index = 621 + // events.dropped, index = 623 new(new[] { "reason:queueFull", "event_type:snapshot" }), new(new[] { "reason:queueFull", "event_type:log" }), new(new[] { "reason:payloadTooLarge", "event_type:snapshot" }), new(new[] { "reason:payloadTooLarge", "event_type:log" }), - // capture.incomplete, index = 625 + // capture.incomplete, index = 627 new(new[] { "event_type:snapshot", "reason:runtimeError" }), new(new[] { "event_type:snapshot", "reason:timeout" }), new(new[] { "event_type:snapshot", "reason:depth" }), @@ -705,13 +707,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "event_type:log", "reason:stringLength" }), new(new[] { "event_type:log", "reason:payloadTooLarge" }), new(new[] { "event_type:log", "reason:other" }), - // waf.init, index = 641 + // waf.init, index = 643 new(new[] { "waf_version", "event_rules_version", "success:true" }), new(new[] { "waf_version", "event_rules_version", "success:false" }), - // waf.updates, index = 643 + // waf.updates, index = 645 new(new[] { "waf_version", "event_rules_version", "success:true" }), new(new[] { "waf_version", "event_rules_version", "success:false" }), - // waf.requests, index = 645 + // waf.requests, index = 647 new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:true", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:true", "request_blocked:true", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), @@ -722,22 +724,22 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:true", "block_failure:false", "rate_limited:false", "input_truncated:true", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:true" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:true", "waf_error:true" }), - // waf.input_truncated, index = 655 + // waf.input_truncated, index = 657 new(new[] { "truncation_reason:string_too_long" }), new(new[] { "truncation_reason:list_or_map_too_large" }), new(new[] { "truncation_reason:object_too_deep" }), - // waf.error, index = 658 + // waf.error, index = 660 new(new[] { "waf_version", "event_rules_version", "waf_error:-127" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-3" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-2" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1" }), - // rasp.rule.eval, index = 662 + // rasp.rule.eval, index = 664 new(new[] { "waf_version", "event_rules_version", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.rule.match, index = 667 + // rasp.rule.match, index = 669 new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:sql_injection" }), @@ -753,13 +755,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.timeout, index = 682 + // rasp.timeout, index = 684 new(new[] { "waf_version", "event_rules_version", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.error, index = 687 + // rasp.error, index = 689 new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:sql_injection" }), @@ -780,7 +782,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.rule.skipped, index = 707 + // rasp.rule.skipped, index = 709 new(new[] { "reason:after-request", "rule_type:lfi" }), new(new[] { "reason:after-request", "rule_type:ssrf" }), new(new[] { "reason:after-request", "rule_type:sql_injection" }), @@ -791,23 +793,23 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:out-of-request", "rule_type:sql_injection" }), new(new[] { "reason:out-of-request", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "reason:out-of-request", "rule_type:command_injection", "rule_variant:exec" }), - // instrum.user_auth.missing_user_id, index = 717 + // instrum.user_auth.missing_user_id, index = 719 new(new[] { "framework:aspnetcore_identity", "event_type:login_success" }), new(new[] { "framework:aspnetcore_identity", "event_type:login_failure" }), new(new[] { "framework:aspnetcore_identity", "event_type:signup" }), new(new[] { "framework:unknown", "event_type:signup" }), - // instrum.user_auth.missing_user_login, index = 721 + // instrum.user_auth.missing_user_login, index = 723 new(new[] { "framework:aspnetcore_identity", "event_type:login_success" }), new(new[] { "framework:aspnetcore_identity", "event_type:login_failure" }), new(new[] { "framework:aspnetcore_identity", "event_type:signup" }), new(new[] { "framework:unknown", "event_type:signup" }), - // sdk.event, index = 725 + // sdk.event, index = 727 new(new[] { "event_type:login_success", "sdk_version:v1" }), new(new[] { "event_type:login_success", "sdk_version:v2" }), new(new[] { "event_type:login_failure", "sdk_version:v1" }), new(new[] { "event_type:login_failure", "sdk_version:v2" }), new(new[] { "event_type:custom", "sdk_version:v1" }), - // executed.source, index = 730 + // executed.source, index = 732 new(new[] { "source_type:http.request.body" }), new(new[] { "source_type:http.request.path" }), new(new[] { "source_type:http.request.parameter.name" }), @@ -822,9 +824,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "source_type:http.request.uri" }), new(new[] { "source_type:grpc.request.body" }), new(new[] { "source_type:sql.row.value" }), - // executed.propagation, index = 744 + // executed.propagation, index = 746 new(null), - // executed.sink, index = 745 + // executed.sink, index = 747 new(new[] { "vulnerability_type:none" }), new(new[] { "vulnerability_type:weak_cipher" }), new(new[] { "vulnerability_type:weak_hash" }), @@ -852,9 +854,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "vulnerability_type:directory_listing_leak" }), new(new[] { "vulnerability_type:session_timeout" }), new(new[] { "vulnerability_type:email_html_injection" }), - // request.tainted, index = 772 + // request.tainted, index = 774 new(null), - // suppressed.vulnerabilities, index = 773 + // suppressed.vulnerabilities, index = 775 new(new[] { "vulnerability_type:none" }), new(new[] { "vulnerability_type:weak_cipher" }), new(new[] { "vulnerability_type:weak_hash" }), @@ -890,7 +892,7 @@ private static AggregatedMetric[] GetCountBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountEntryCounts { get; } - = new int[]{ 4, 85, 1, 3, 7, 2, 2, 7, 1, 1, 1, 22, 3, 2, 5, 5, 4, 1, 1, 22, 3, 34, 90, 90, 4, 4, 4, 4, 2, 44, 6, 1, 1, 85, 1, 22, 3, 8, 2, 10, 8, 4, 12, 4, 16, 2, 2, 10, 3, 4, 5, 15, 5, 20, 10, 4, 4, 5, 14, 1, 27, 1, 27, }; + = new int[]{ 4, 86, 1, 3, 7, 2, 2, 7, 1, 1, 1, 22, 3, 2, 5, 5, 4, 1, 1, 22, 3, 34, 90, 90, 4, 4, 4, 4, 2, 44, 6, 1, 1, 86, 1, 22, 3, 8, 2, 10, 8, 4, 12, 4, 16, 2, 2, 10, 3, 4, 5, 15, 5, 20, 10, 4, 4, 5, 14, 1, 27, 1, 27, }; public void RecordCountLogCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.LogLevel tag, int increment = 1) { @@ -906,357 +908,357 @@ public void RecordCountSpanCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.In public void RecordCountSpanFinished(int increment = 1) { - Interlocked.Add(ref _buffer.Count[89], increment); + Interlocked.Add(ref _buffer.Count[90], increment); } public void RecordCountSpanEnqueuedForSerialization(Datadog.Trace.Telemetry.Metrics.MetricTags.SpanEnqueueReason tag, int increment = 1) { - var index = 90 + (int)tag; + var index = 91 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountSpanDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DropReason tag, int increment = 1) { - var index = 93 + (int)tag; + var index = 94 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceSegmentCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.TraceContinuation tag, int increment = 1) { - var index = 100 + (int)tag; + var index = 101 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkEnqueued(Datadog.Trace.Telemetry.Metrics.MetricTags.TraceChunkEnqueueReason tag, int increment = 1) { - var index = 102 + (int)tag; + var index = 103 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DropReason tag, int increment = 1) { - var index = 104 + (int)tag; + var index = 105 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkSent(int increment = 1) { - Interlocked.Add(ref _buffer.Count[111], increment); + Interlocked.Add(ref _buffer.Count[112], increment); } public void RecordCountTraceSegmentsClosed(int increment = 1) { - Interlocked.Add(ref _buffer.Count[112], increment); + Interlocked.Add(ref _buffer.Count[113], increment); } public void RecordCountTraceApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[113], increment); + Interlocked.Add(ref _buffer.Count[114], increment); } public void RecordCountTraceApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 114 + (int)tag; + var index = 115 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 136 + (int)tag; + var index = 137 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTracePartialFlush(Datadog.Trace.Telemetry.Metrics.MetricTags.PartialFlushReason tag, int increment = 1) { - var index = 139 + (int)tag; + var index = 140 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderStyleInjected(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderStyle tag, int increment = 1) { - var index = 141 + (int)tag; + var index = 142 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderStyleExtracted(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderStyle tag, int increment = 1) { - var index = 146 + (int)tag; + var index = 147 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderTruncated(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderTruncationReason tag, int increment = 1) { - var index = 151 + (int)tag; + var index = 152 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderMalformed(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderMalformed tag, int increment = 1) { - var index = 155 + (int)tag; + var index = 156 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[156], increment); + Interlocked.Add(ref _buffer.Count[157], increment); } public void RecordCountStatsApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 157 + (int)tag; + var index = 158 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 179 + (int)tag; + var index = 180 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsCollapsedSpans(Datadog.Trace.Telemetry.Metrics.MetricTags.CollapsedStatsFields tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OversizedStatsFields tag2, int increment = 1) { - var index = 182 + ((int)tag1 * 2) + (int)tag2; + var index = 183 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountOpenTelemetryConfigHiddenByDatadogConfig(Datadog.Trace.Telemetry.Metrics.MetricTags.DatadogConfiguration tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OpenTelemetryConfiguration tag2, int increment = 1) { - var index = 216 + ((int)tag1 * 10) + (int)tag2; + var index = 217 + ((int)tag1 * 10) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountOpenTelemetryConfigInvalid(Datadog.Trace.Telemetry.Metrics.MetricTags.DatadogConfiguration tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OpenTelemetryConfiguration tag2, int increment = 1) { - var index = 306 + ((int)tag1 * 10) + (int)tag2; + var index = 307 + ((int)tag1 * 10) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportAttempts(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 396 + ((int)tag1 * 2) + (int)tag2; + var index = 397 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportSuccesses(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 400 + ((int)tag1 * 2) + (int)tag2; + var index = 401 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportPartialSuccesses(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 404 + ((int)tag1 * 2) + (int)tag2; + var index = 405 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportFailures(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 408 + ((int)tag1 * 2) + (int)tag2; + var index = 409 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiRequests(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag, int increment = 1) { - var index = 412 + (int)tag; + var index = 413 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag2, int increment = 1) { - var index = 414 + ((int)tag1 * 22) + (int)tag2; + var index = 415 + ((int)tag1 * 22) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag2, int increment = 1) { - var index = 458 + ((int)tag1 * 3) + (int)tag2; + var index = 459 + ((int)tag1 * 3) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountVersionConflictTracerCreated(int increment = 1) { - Interlocked.Add(ref _buffer.Count[464], increment); + Interlocked.Add(ref _buffer.Count[465], increment); } public void RecordCountUnsupportedCustomInstrumentationServices(int increment = 1) { - Interlocked.Add(ref _buffer.Count[465], increment); + Interlocked.Add(ref _buffer.Count[466], increment); } public void RecordCountDirectLogLogs(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag, int increment = 1) { - var index = 466 + (int)tag; + var index = 467 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDirectLogApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[551], increment); + Interlocked.Add(ref _buffer.Count[553], increment); } public void RecordCountDirectLogApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 552 + (int)tag; + var index = 554 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDirectLogApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 574 + (int)tag; + var index = 576 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureTransitions(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureTrigger tag2, int increment = 1) { - var index = 577 + ((int)tag1 * 4) + (int)tag2; + var index = 579 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureDisabled(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureDisabledReason tag, int increment = 1) { - var index = 585 + (int)tag; + var index = 587 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureMemoryUsagePct(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureMemoryBucket tag2, int increment = 1) { - var index = 587 + ((int)tag1 * 5) + (int)tag2; + var index = 589 + ((int)tag1 * 5) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureGcActivity(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureGcBucket tag2, int increment = 1) { - var index = 597 + ((int)tag1 * 4) + (int)tag2; + var index = 599 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureDuration(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureDurationBucket tag, int increment = 1) { - var index = 605 + (int)tag; + var index = 607 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerEventsSkipped(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventsSkippedReason tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventType tag2, int increment = 1) { - var index = 609 + ((int)tag1 * 4) + (int)tag2; + var index = 611 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerEventsDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventsDroppedReason tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureEventType tag2, int increment = 1) { - var index = 621 + ((int)tag1 * 2) + (int)tag2; + var index = 623 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerCaptureIncomplete(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureEventType tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureIncompleteReason tag2, int increment = 1) { - var index = 625 + ((int)tag1 * 8) + (int)tag2; + var index = 627 + ((int)tag1 * 8) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafInit(Datadog.Trace.Telemetry.Metrics.MetricTags.WafStatus tag, int increment = 1) { - var index = 641 + (int)tag; + var index = 643 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafUpdates(Datadog.Trace.Telemetry.Metrics.MetricTags.WafStatus tag, int increment = 1) { - var index = 643 + (int)tag; + var index = 645 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafRequests(Datadog.Trace.Telemetry.Metrics.MetricTags.WafAnalysis tag, int increment = 1) { - var index = 645 + (int)tag; + var index = 647 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountInputTruncated(Datadog.Trace.Telemetry.Metrics.MetricTags.TruncationReason tag, int increment = 1) { - var index = 655 + (int)tag; + var index = 657 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafError(Datadog.Trace.Telemetry.Metrics.MetricTags.WafError tag, int increment = 1) { - var index = 658 + (int)tag; + var index = 660 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleEval(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleType tag, int increment = 1) { - var index = 662 + (int)tag; + var index = 664 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleMatch(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleTypeMatch tag, int increment = 1) { - var index = 667 + (int)tag; + var index = 669 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspTimeout(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleType tag, int increment = 1) { - var index = 682 + (int)tag; + var index = 684 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspError(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspError tag, int increment = 1) { - var index = 687 + (int)tag; + var index = 689 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleSkipped(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleTypeSkipped tag, int increment = 1) { - var index = 707 + (int)tag; + var index = 709 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMissingUserId(Datadog.Trace.Telemetry.Metrics.MetricTags.AuthenticationFrameworkWithEventType tag, int increment = 1) { - var index = 717 + (int)tag; + var index = 719 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMissingUserLogin(Datadog.Trace.Telemetry.Metrics.MetricTags.AuthenticationFrameworkWithEventType tag, int increment = 1) { - var index = 721 + (int)tag; + var index = 723 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountUserEventSdk(Datadog.Trace.Telemetry.Metrics.MetricTags.UserEventSdk tag, int increment = 1) { - var index = 725 + (int)tag; + var index = 727 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastExecutedSources(Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType tag, int increment = 1) { - var index = 730 + (int)tag; + var index = 732 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastExecutedPropagations(int increment = 1) { - Interlocked.Add(ref _buffer.Count[744], increment); + Interlocked.Add(ref _buffer.Count[746], increment); } public void RecordCountIastExecutedSinks(Datadog.Trace.Telemetry.Metrics.MetricTags.IastVulnerabilityType tag, int increment = 1) { - var index = 745 + (int)tag; + var index = 747 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastRequestTainted(int increment = 1) { - Interlocked.Add(ref _buffer.Count[772], increment); + Interlocked.Add(ref _buffer.Count[774], increment); } public void RecordCountIastSuppressedVulnerabilities(Datadog.Trace.Telemetry.Metrics.MetricTags.IastVulnerabilityType tag, int increment = 1) { - var index = 773 + (int)tag; + var index = 775 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } } \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs index 82355f89f551..0268d09801b7 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class MetricsTelemetryCollector { - private const int CountSharedLength = 340; + private const int CountSharedLength = 344; /// /// Creates the buffer for the values. @@ -276,6 +276,10 @@ private static AggregatedMetric[] GetCountSharedBuffer() new(new[] { "integration_name:azureeventhubs", "error_type:invoker" }), new(new[] { "integration_name:azureeventhubs", "error_type:execution" }), new(new[] { "integration_name:azureeventhubs", "error_type:missing_member" }), + new(new[] { "integration_name:azureeventgrid", "error_type:duck_typing" }), + new(new[] { "integration_name:azureeventgrid", "error_type:invoker" }), + new(new[] { "integration_name:azureeventgrid", "error_type:execution" }), + new(new[] { "integration_name:azureeventgrid", "error_type:missing_member" }), new(new[] { "integration_name:systemrandom", "error_type:duck_typing" }), new(new[] { "integration_name:systemrandom", "error_type:invoker" }), new(new[] { "integration_name:systemrandom", "error_type:execution" }), @@ -368,7 +372,7 @@ private static AggregatedMetric[] GetCountSharedBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountSharedEntryCounts { get; } - = new int[]{ 340, }; + = new int[]{ 344, }; public void RecordCountSharedIntegrationsError(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.InstrumentationError tag2, int increment = 1) { diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs index cfc3e86ece7b..79b784525c54 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationIdExtensions_EnumExtensions.g.cs @@ -17,7 +17,7 @@ internal static partial class IntegrationIdExtensions /// The number of members in the enum. /// This is a non-distinct count of defined names. /// - public const int Length = 80; + public const int Length = 81; /// /// Returns the string representation of the value. @@ -106,6 +106,7 @@ public static string ToStringFast(this Datadog.Trace.Configuration.IntegrationId Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection => nameof(Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection), Datadog.Trace.Configuration.IntegrationId.Protobuf => nameof(Datadog.Trace.Configuration.IntegrationId.Protobuf), Datadog.Trace.Configuration.IntegrationId.AzureEventHubs => nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventHubs), + Datadog.Trace.Configuration.IntegrationId.AzureEventGrid => nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventGrid), Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict => nameof(Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict), Datadog.Trace.Configuration.IntegrationId.Hangfire => nameof(Datadog.Trace.Configuration.IntegrationId.Hangfire), Datadog.Trace.Configuration.IntegrationId.OpenFeature => nameof(Datadog.Trace.Configuration.IntegrationId.OpenFeature), @@ -199,6 +200,7 @@ public static Datadog.Trace.Configuration.IntegrationId[] GetValues() Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection, Datadog.Trace.Configuration.IntegrationId.Protobuf, Datadog.Trace.Configuration.IntegrationId.AzureEventHubs, + Datadog.Trace.Configuration.IntegrationId.AzureEventGrid, Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict, Datadog.Trace.Configuration.IntegrationId.Hangfire, Datadog.Trace.Configuration.IntegrationId.OpenFeature, @@ -292,6 +294,7 @@ public static string[] GetNames() nameof(Datadog.Trace.Configuration.IntegrationId.EmailHtmlInjection), nameof(Datadog.Trace.Configuration.IntegrationId.Protobuf), nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventHubs), + nameof(Datadog.Trace.Configuration.IntegrationId.AzureEventGrid), nameof(Datadog.Trace.Configuration.IntegrationId.DatadogTraceVersionConflict), nameof(Datadog.Trace.Configuration.IntegrationId.Hangfire), nameof(Datadog.Trace.Configuration.IntegrationId.OpenFeature), diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs index 20b20f78f193..4b700cb16a0b 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/EnumExtensionsGenerator/IntegrationNameToKeys.g.cs @@ -250,6 +250,9 @@ public static string[] GetAllIntegrationEnabledKeys() => "DD_TRACE_AZUREEVENTHUBS_ENABLED", "DD_TRACE_AzureEventHubs_ENABLED", "DD_AzureEventHubs_ENABLED", "DD_TRACE_AZUREEVENTHUBS_ANALYTICS_ENABLED", "DD_TRACE_AzureEventHubs_ANALYTICS_ENABLED", "DD_AzureEventHubs_ANALYTICS_ENABLED", "DD_TRACE_AZUREEVENTHUBS_ANALYTICS_SAMPLE_RATE", "DD_TRACE_AzureEventHubs_ANALYTICS_SAMPLE_RATE", "DD_AzureEventHubs_ANALYTICS_SAMPLE_RATE", + "DD_TRACE_AZUREEVENTGRID_ENABLED", "DD_TRACE_AzureEventGrid_ENABLED", "DD_AzureEventGrid_ENABLED", + "DD_TRACE_AZUREEVENTGRID_ANALYTICS_ENABLED", "DD_TRACE_AzureEventGrid_ANALYTICS_ENABLED", "DD_AzureEventGrid_ANALYTICS_ENABLED", + "DD_TRACE_AZUREEVENTGRID_ANALYTICS_SAMPLE_RATE", "DD_TRACE_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ENABLED", "DD_TRACE_DatadogTraceVersionConflict_ENABLED", "DD_DatadogTraceVersionConflict_ENABLED", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_ENABLED", "DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_SAMPLE_RATE", "DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", "DD_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", @@ -348,6 +351,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ENABLED", ["DD_TRACE_EmailHtmlInjection_ENABLED", "DD_EmailHtmlInjection_ENABLED"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ENABLED", ["DD_TRACE_Protobuf_ENABLED", "DD_Protobuf_ENABLED"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ENABLED", ["DD_TRACE_AzureEventHubs_ENABLED", "DD_AzureEventHubs_ENABLED"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ENABLED", ["DD_TRACE_AzureEventGrid_ENABLED", "DD_AzureEventGrid_ENABLED"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ENABLED", ["DD_TRACE_DatadogTraceVersionConflict_ENABLED", "DD_DatadogTraceVersionConflict_ENABLED"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ENABLED", ["DD_TRACE_Hangfire_ENABLED", "DD_Hangfire_ENABLED"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ENABLED", ["DD_TRACE_OpenFeature_ENABLED", "DD_OpenFeature_ENABLED"]), @@ -440,6 +444,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ANALYTICS_ENABLED", ["DD_TRACE_EmailHtmlInjection_ANALYTICS_ENABLED", "DD_EmailHtmlInjection_ANALYTICS_ENABLED"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ANALYTICS_ENABLED", ["DD_TRACE_Protobuf_ANALYTICS_ENABLED", "DD_Protobuf_ANALYTICS_ENABLED"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ANALYTICS_ENABLED", ["DD_TRACE_AzureEventHubs_ANALYTICS_ENABLED", "DD_AzureEventHubs_ANALYTICS_ENABLED"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ANALYTICS_ENABLED", ["DD_TRACE_AzureEventGrid_ANALYTICS_ENABLED", "DD_AzureEventGrid_ANALYTICS_ENABLED"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_ENABLED", ["DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_ENABLED", "DD_DatadogTraceVersionConflict_ANALYTICS_ENABLED"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ANALYTICS_ENABLED", ["DD_TRACE_Hangfire_ANALYTICS_ENABLED", "DD_Hangfire_ANALYTICS_ENABLED"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ANALYTICS_ENABLED", ["DD_TRACE_OpenFeature_ANALYTICS_ENABLED", "DD_OpenFeature_ANALYTICS_ENABLED"]), @@ -532,6 +537,7 @@ public static System.Collections.Generic.KeyValuePair GetInteg "EmailHtmlInjection" => new("DD_TRACE_EMAILHTMLINJECTION_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_EmailHtmlInjection_ANALYTICS_SAMPLE_RATE", "DD_EmailHtmlInjection_ANALYTICS_SAMPLE_RATE"]), "Protobuf" => new("DD_TRACE_PROTOBUF_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_Protobuf_ANALYTICS_SAMPLE_RATE", "DD_Protobuf_ANALYTICS_SAMPLE_RATE"]), "AzureEventHubs" => new("DD_TRACE_AZUREEVENTHUBS_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_AzureEventHubs_ANALYTICS_SAMPLE_RATE", "DD_AzureEventHubs_ANALYTICS_SAMPLE_RATE"]), + "AzureEventGrid" => new("DD_TRACE_AZUREEVENTGRID_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_AzureEventGrid_ANALYTICS_SAMPLE_RATE", "DD_AzureEventGrid_ANALYTICS_SAMPLE_RATE"]), "DatadogTraceVersionConflict" => new("DD_TRACE_DATADOGTRACEVERSIONCONFLICT_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE", "DD_DatadogTraceVersionConflict_ANALYTICS_SAMPLE_RATE"]), "Hangfire" => new("DD_TRACE_HANGFIRE_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_Hangfire_ANALYTICS_SAMPLE_RATE", "DD_Hangfire_ANALYTICS_SAMPLE_RATE"]), "OpenFeature" => new("DD_TRACE_OPENFEATURE_ANALYTICS_SAMPLE_RATE", ["DD_TRACE_OpenFeature_ANALYTICS_SAMPLE_RATE", "DD_OpenFeature_ANALYTICS_SAMPLE_RATE"]), diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs new file mode 100644 index 000000000000..9fbb3989de91 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridTags.g.cs @@ -0,0 +1,212 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +using Datadog.Trace.Processors; +using Datadog.Trace.Tagging; +using System; + +namespace Datadog.Trace.Tagging +{ + partial class AzureEventGridTags + { + // SpanKindBytes = MessagePack.Serialize("span.kind"); + private static ReadOnlySpan SpanKindBytes => [169, 115, 112, 97, 110, 46, 107, 105, 110, 100]; + + // InstrumentationNameBytes = MessagePack.Serialize("component"); + private static ReadOnlySpan InstrumentationNameBytes => [169, 99, 111, 109, 112, 111, 110, 101, 110, 116]; + + // MessagingSystemBytes = MessagePack.Serialize("messaging.system"); + private static ReadOnlySpan MessagingSystemBytes => [176, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 115, 121, 115, 116, 101, 109]; + + // MessagingOperationBytes = MessagePack.Serialize("messaging.operation"); + private static ReadOnlySpan MessagingOperationBytes => [179, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 111, 112, 101, 114, 97, 116, 105, 111, 110]; + + // MessagingDestinationNameBytes = MessagePack.Serialize("messaging.destination.name"); + private static ReadOnlySpan MessagingDestinationNameBytes => [186, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 110, 97, 109, 101]; + + // NetworkDestinationNameBytes = MessagePack.Serialize("network.destination.name"); + private static ReadOnlySpan NetworkDestinationNameBytes => [184, 110, 101, 116, 119, 111, 114, 107, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 110, 97, 109, 101]; + + // NetworkDestinationPortBytes = MessagePack.Serialize("network.destination.port"); + private static ReadOnlySpan NetworkDestinationPortBytes => [184, 110, 101, 116, 119, 111, 114, 107, 46, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 46, 112, 111, 114, 116]; + + // MessagingBatchMessageCountBytes = MessagePack.Serialize("messaging.batch.message_count"); + private static ReadOnlySpan MessagingBatchMessageCountBytes => [189, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 98, 97, 116, 99, 104, 46, 109, 101, 115, 115, 97, 103, 101, 95, 99, 111, 117, 110, 116]; + + // MessagingMessageIdBytes = MessagePack.Serialize("messaging.message_id"); + private static ReadOnlySpan MessagingMessageIdBytes => [180, 109, 101, 115, 115, 97, 103, 105, 110, 103, 46, 109, 101, 115, 115, 97, 103, 101, 95, 105, 100]; + + public override string? GetTag(string key) + { + return key switch + { + "span.kind" => SpanKind, + "component" => InstrumentationName, + "messaging.system" => MessagingSystem, + "messaging.operation" => MessagingOperation, + "messaging.destination.name" => MessagingDestinationName, + "network.destination.name" => NetworkDestinationName, + "network.destination.port" => NetworkDestinationPort, + "messaging.batch.message_count" => MessagingBatchMessageCount, + "messaging.message_id" => MessagingMessageId, + _ => base.GetTag(key), + }; + } + + public override void SetTag(string key, string? value) + { + switch(key) + { + case "messaging.operation": + MessagingOperation = value; + break; + case "messaging.destination.name": + MessagingDestinationName = value; + break; + case "network.destination.name": + NetworkDestinationName = value; + break; + case "network.destination.port": + NetworkDestinationPort = value; + break; + case "messaging.batch.message_count": + MessagingBatchMessageCount = value; + break; + case "messaging.message_id": + MessagingMessageId = value; + break; + case "span.kind": + case "component": + case "messaging.system": + Logger.Value.Warning("Attempted to set readonly tag {TagName} on {TagType}. Ignoring.", key, nameof(AzureEventGridTags)); + break; + default: + base.SetTag(key, value); + break; + } + } + + public override void EnumerateTags(ref TProcessor processor, bool openTelemetrySemanticsEnabled) + { + if (SpanKind is not null) + { + processor.Process(new TagItem("span.kind", SpanKind, SpanKindBytes)); + } + + if (InstrumentationName is not null) + { + processor.Process(new TagItem("component", InstrumentationName, InstrumentationNameBytes)); + } + + if (MessagingSystem is not null) + { + processor.Process(new TagItem("messaging.system", MessagingSystem, MessagingSystemBytes)); + } + + if (MessagingOperation is not null) + { + processor.Process(new TagItem("messaging.operation", MessagingOperation, MessagingOperationBytes)); + } + + if (MessagingDestinationName is not null) + { + processor.Process(new TagItem("messaging.destination.name", MessagingDestinationName, MessagingDestinationNameBytes)); + } + + if (NetworkDestinationName is not null) + { + processor.Process(new TagItem("network.destination.name", NetworkDestinationName, NetworkDestinationNameBytes)); + } + + if (NetworkDestinationPort is not null) + { + processor.Process(new TagItem("network.destination.port", NetworkDestinationPort, NetworkDestinationPortBytes)); + } + + if (MessagingBatchMessageCount is not null) + { + processor.Process(new TagItem("messaging.batch.message_count", MessagingBatchMessageCount, MessagingBatchMessageCountBytes)); + } + + if (MessagingMessageId is not null) + { + processor.Process(new TagItem("messaging.message_id", MessagingMessageId, MessagingMessageIdBytes)); + } + + base.EnumerateTags(ref processor, openTelemetrySemanticsEnabled); + } + + protected override void WriteAdditionalTags(System.Text.StringBuilder sb) + { + if (SpanKind is not null) + { + sb.Append("span.kind (tag):") + .Append(SpanKind) + .Append(','); + } + + if (InstrumentationName is not null) + { + sb.Append("component (tag):") + .Append(InstrumentationName) + .Append(','); + } + + if (MessagingSystem is not null) + { + sb.Append("messaging.system (tag):") + .Append(MessagingSystem) + .Append(','); + } + + if (MessagingOperation is not null) + { + sb.Append("messaging.operation (tag):") + .Append(MessagingOperation) + .Append(','); + } + + if (MessagingDestinationName is not null) + { + sb.Append("messaging.destination.name (tag):") + .Append(MessagingDestinationName) + .Append(','); + } + + if (NetworkDestinationName is not null) + { + sb.Append("network.destination.name (tag):") + .Append(NetworkDestinationName) + .Append(','); + } + + if (NetworkDestinationPort is not null) + { + sb.Append("network.destination.port (tag):") + .Append(NetworkDestinationPort) + .Append(','); + } + + if (MessagingBatchMessageCount is not null) + { + sb.Append("messaging.batch.message_count (tag):") + .Append(MessagingBatchMessageCount) + .Append(','); + } + + if (MessagingMessageId is not null) + { + sb.Append("messaging.message_id (tag):") + .Append(MessagingMessageId) + .Append(','); + } + + base.WriteAdditionalTags(sb); + } + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs new file mode 100644 index 000000000000..4d1324bc41d3 --- /dev/null +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TagListGenerator/AzureEventGridV1Tags.g.cs @@ -0,0 +1,83 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +// + +#nullable enable + +using Datadog.Trace.Processors; +using Datadog.Trace.Tagging; +using System; + +namespace Datadog.Trace.Tagging +{ + partial class AzureEventGridV1Tags + { + // PeerServiceBytes = MessagePack.Serialize("peer.service"); + private static ReadOnlySpan PeerServiceBytes => [172, 112, 101, 101, 114, 46, 115, 101, 114, 118, 105, 99, 101]; + + // PeerServiceSourceBytes = MessagePack.Serialize("_dd.peer.service.source"); + private static ReadOnlySpan PeerServiceSourceBytes => [183, 95, 100, 100, 46, 112, 101, 101, 114, 46, 115, 101, 114, 118, 105, 99, 101, 46, 115, 111, 117, 114, 99, 101]; + + public override string? GetTag(string key) + { + return key switch + { + "peer.service" => PeerService, + "_dd.peer.service.source" => PeerServiceSource, + _ => base.GetTag(key), + }; + } + + public override void SetTag(string key, string? value) + { + switch(key) + { + case "peer.service": + PeerService = value; + break; + case "_dd.peer.service.source": + Logger.Value.Warning("Attempted to set readonly tag {TagName} on {TagType}. Ignoring.", key, nameof(AzureEventGridV1Tags)); + break; + default: + base.SetTag(key, value); + break; + } + } + + public override void EnumerateTags(ref TProcessor processor, bool openTelemetrySemanticsEnabled) + { + if (PeerService is not null) + { + processor.Process(new TagItem("peer.service", PeerService, PeerServiceBytes)); + } + + if (PeerServiceSource is not null) + { + processor.Process(new TagItem("_dd.peer.service.source", PeerServiceSource, PeerServiceSourceBytes)); + } + + base.EnumerateTags(ref processor, openTelemetrySemanticsEnabled); + } + + protected override void WriteAdditionalTags(System.Text.StringBuilder sb) + { + if (PeerService is not null) + { + sb.Append("peer.service (tag):") + .Append(PeerService) + .Append(','); + } + + if (PeerServiceSource is not null) + { + sb.Append("_dd.peer.service.source (tag):") + .Append(PeerServiceSource) + .Append(','); + } + + base.WriteAdditionalTags(sb); + } + } +} diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs index 074a939c1ce9..4f3392fc24bb 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class CiVisibilityMetricsTelemetryCollector { - private const int CountSharedLength = 340; + private const int CountSharedLength = 344; /// /// Creates the buffer for the values. @@ -276,6 +276,10 @@ private static AggregatedMetric[] GetCountSharedBuffer() new(new[] { "integration_name:azureeventhubs", "error_type:invoker" }), new(new[] { "integration_name:azureeventhubs", "error_type:execution" }), new(new[] { "integration_name:azureeventhubs", "error_type:missing_member" }), + new(new[] { "integration_name:azureeventgrid", "error_type:duck_typing" }), + new(new[] { "integration_name:azureeventgrid", "error_type:invoker" }), + new(new[] { "integration_name:azureeventgrid", "error_type:execution" }), + new(new[] { "integration_name:azureeventgrid", "error_type:missing_member" }), new(new[] { "integration_name:systemrandom", "error_type:duck_typing" }), new(new[] { "integration_name:systemrandom", "error_type:invoker" }), new(new[] { "integration_name:systemrandom", "error_type:execution" }), @@ -368,7 +372,7 @@ private static AggregatedMetric[] GetCountSharedBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountSharedEntryCounts { get; } - = new int[]{ 340, }; + = new int[]{ 344, }; public void RecordCountSharedIntegrationsError(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.InstrumentationError tag2, int increment = 1) { diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs index 5593f1cb4e54..779c9be4bf9b 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_Count.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class MetricsTelemetryCollector { - private const int CountLength = 800; + private const int CountLength = 802; /// /// Creates the buffer for the values. @@ -89,6 +89,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:awskinesis" }), new(new[] { "integration_name:azureservicebus" }), new(new[] { "integration_name:azureeventhubs" }), + new(new[] { "integration_name:azureeventgrid" }), new(new[] { "integration_name:systemrandom" }), new(new[] { "integration_name:awsdynamodb" }), new(new[] { "integration_name:ibmmq" }), @@ -110,13 +111,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:protobuf" }), new(new[] { "integration_name:hangfire" }), new(new[] { "integration_name:serverlesscompat" }), - // spans_finished, index = 89 + // spans_finished, index = 90 new(null), - // spans_enqueued_for_serialization, index = 90 + // spans_enqueued_for_serialization, index = 91 new(new[] { "reason:p0_keep" }), new(new[] { "reason:single_span_sampling" }), new(new[] { "reason:default" }), - // spans_dropped, index = 93 + // spans_dropped, index = 94 new(new[] { "reason:p0_drop" }), new(new[] { "reason:overfull_buffer" }), new(new[] { "reason:trace_too_large" }), @@ -124,13 +125,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:api_error" }), new(new[] { "reason:trace_filter" }), new(new[] { "reason:buffer_locked" }), - // trace_segments_created, index = 100 + // trace_segments_created, index = 101 new(new[] { "new_continued:new" }), new(new[] { "new_continued:continued" }), - // trace_chunks_enqueued_for_serialization, index = 102 + // trace_chunks_enqueued_for_serialization, index = 103 new(new[] { "reason:p0_keep" }), new(new[] { "reason:default" }), - // trace_chunks_dropped, index = 104 + // trace_chunks_dropped, index = 105 new(new[] { "reason:p0_drop" }), new(new[] { "reason:overfull_buffer" }), new(new[] { "reason:trace_too_large" }), @@ -138,13 +139,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:api_error" }), new(new[] { "reason:trace_filter" }), new(new[] { "reason:buffer_locked" }), - // trace_chunks_sent, index = 111 + // trace_chunks_sent, index = 112 new(null), - // trace_segments_closed, index = 112 + // trace_segments_closed, index = 113 new(null), - // trace_api.requests, index = 113 + // trace_api.requests, index = 114 new(null), - // trace_api.responses, index = 114 + // trace_api.responses, index = 115 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -167,35 +168,35 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // trace_api.errors, index = 136 + // trace_api.errors, index = 137 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // trace_partial_flush.count, index = 139 + // trace_partial_flush.count, index = 140 new(new[] { "reason:large_trace" }), new(new[] { "reason:single_span_ingestion" }), - // context_header_style.injected, index = 141 + // context_header_style.injected, index = 142 new(new[] { "header_style:tracecontext" }), new(new[] { "header_style:datadog" }), new(new[] { "header_style:b3multi" }), new(new[] { "header_style:b3single" }), new(new[] { "header_style:baggage" }), - // context_header_style.extracted, index = 146 + // context_header_style.extracted, index = 147 new(new[] { "header_style:tracecontext" }), new(new[] { "header_style:datadog" }), new(new[] { "header_style:b3multi" }), new(new[] { "header_style:b3single" }), new(new[] { "header_style:baggage" }), - // context_header.truncated, index = 151 + // context_header.truncated, index = 152 new(new[] { "truncation_reason:baggage_item_count_exceeded" }), new(new[] { "truncation_reason:baggage_byte_count_exceeded" }), new(new[] { "truncation_reason:baggage_extract_item_exceeded" }), new(new[] { "truncation_reason:baggage_extract_byte_exceeded" }), - // context_header_style.malformed, index = 155 + // context_header_style.malformed, index = 156 new(new[] { "header_style:baggage" }), - // stats_api.requests, index = 156 + // stats_api.requests, index = 157 new(null), - // stats_api.responses, index = 157 + // stats_api.responses, index = 158 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -218,11 +219,11 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // stats_api.errors, index = 179 + // stats_api.errors, index = 180 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // stats_collapsed_spans, index = 182 + // stats_collapsed_spans, index = 183 new(null), new(new[] { "oversized:additional_metric_tags" }), new(new[] { "collapsed:whole_key" }), @@ -257,7 +258,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags", "oversized:additional_metric_tags" }), new(new[] { "collapsed:resource", "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags" }), new(new[] { "collapsed:resource", "collapsed:http_endpoint", "collapsed:peer_tags", "collapsed:additional_metric_tags", "oversized:additional_metric_tags" }), - // otel.env.hiding, index = 216 + // otel.env.hiding, index = 217 new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_log_level" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_metrics_exporter" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_propagators" }), @@ -348,7 +349,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler_arg" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:unknown" }), - // otel.env.invalid, index = 306 + // otel.env.invalid, index = 307 new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_log_level" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_metrics_exporter" }), new(new[] { "config_datadog:dd_trace_debug", "config_opentelemetry:otel_propagators" }), @@ -439,30 +440,30 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:otel_traces_sampler_arg" }), new(new[] { "config_datadog:unknown", "config_opentelemetry:unknown" }), - // otel.metrics_export_attempts, index = 396 + // otel.metrics_export_attempts, index = 397 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_successes, index = 400 + // otel.metrics_export_successes, index = 401 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_partial_successes, index = 404 + // otel.metrics_export_partial_successes, index = 405 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // otel.metrics_export_failures, index = 408 + // otel.metrics_export_failures, index = 409 new(new[] { "protocol:grpc", "encoding:protobuf" }), new(new[] { "protocol:grpc", "encoding:json" }), new(new[] { "protocol:http", "encoding:protobuf" }), new(new[] { "protocol:http", "encoding:json" }), - // telemetry_api.requests, index = 412 + // telemetry_api.requests, index = 413 new(new[] { "endpoint:agent" }), new(new[] { "endpoint:agentless" }), - // telemetry_api.responses, index = 414 + // telemetry_api.responses, index = 415 new(new[] { "endpoint:agent", "status_code:200" }), new(new[] { "endpoint:agent", "status_code:201" }), new(new[] { "endpoint:agent", "status_code:202" }), @@ -507,18 +508,18 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "endpoint:agentless", "status_code:503" }), new(new[] { "endpoint:agentless", "status_code:504" }), new(new[] { "endpoint:agentless", "status_code:5xx" }), - // telemetry_api.errors, index = 458 + // telemetry_api.errors, index = 459 new(new[] { "endpoint:agent", "type:timeout" }), new(new[] { "endpoint:agent", "type:network" }), new(new[] { "endpoint:agent", "type:status_code" }), new(new[] { "endpoint:agentless", "type:timeout" }), new(new[] { "endpoint:agentless", "type:network" }), new(new[] { "endpoint:agentless", "type:status_code" }), - // version_conflict_tracers_created, index = 464 + // version_conflict_tracers_created, index = 465 new(null), - // unsupported_custom_instrumentation_services, index = 465 + // unsupported_custom_instrumentation_services, index = 466 new(null), - // direct_log_logs, index = 466 + // direct_log_logs, index = 467 new(new[] { "integration_name:datadog" }), new(new[] { "integration_name:opentracing" }), new(new[] { "integration_name:version_conflict" }), @@ -583,6 +584,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:awskinesis" }), new(new[] { "integration_name:azureservicebus" }), new(new[] { "integration_name:azureeventhubs" }), + new(new[] { "integration_name:azureeventgrid" }), new(new[] { "integration_name:systemrandom" }), new(new[] { "integration_name:awsdynamodb" }), new(new[] { "integration_name:ibmmq" }), @@ -604,9 +606,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "integration_name:protobuf" }), new(new[] { "integration_name:hangfire" }), new(new[] { "integration_name:serverlesscompat" }), - // direct_log_api.requests, index = 551 + // direct_log_api.requests, index = 553 new(null), - // direct_log_api.responses, index = 552 + // direct_log_api.responses, index = 554 new(new[] { "status_code:200" }), new(new[] { "status_code:201" }), new(new[] { "status_code:202" }), @@ -629,11 +631,11 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "status_code:503" }), new(new[] { "status_code:504" }), new(new[] { "status_code:5xx" }), - // direct_log_api.errors, index = 574 + // direct_log_api.errors, index = 576 new(new[] { "type:timeout" }), new(new[] { "type:network" }), new(new[] { "type:status_code" }), - // memory_pressure.transitions, index = 577 + // memory_pressure.transitions, index = 579 new(new[] { "state:enter", "trigger:none" }), new(new[] { "state:enter", "trigger:memory" }), new(new[] { "state:enter", "trigger:gc" }), @@ -642,10 +644,10 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "trigger:memory" }), new(new[] { "state:exit", "trigger:gc" }), new(new[] { "state:exit", "trigger:both" }), - // memory_pressure.disabled, index = 585 + // memory_pressure.disabled, index = 587 new(new[] { "reason:no_signals" }), new(new[] { "reason:error" }), - // memory_pressure.memory_usage_pct, index = 587 + // memory_pressure.memory_usage_pct, index = 589 new(new[] { "state:enter", "bucket:lt_70" }), new(new[] { "state:enter", "bucket:70_80" }), new(new[] { "state:enter", "bucket:80_85" }), @@ -656,7 +658,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "bucket:80_85" }), new(new[] { "state:exit", "bucket:85_90" }), new(new[] { "state:exit", "bucket:gte_90" }), - // memory_pressure.gc_activity, index = 597 + // memory_pressure.gc_activity, index = 599 new(new[] { "state:enter", "bucket:lt_1" }), new(new[] { "state:enter", "bucket:1_2" }), new(new[] { "state:enter", "bucket:2_5" }), @@ -665,12 +667,12 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "state:exit", "bucket:1_2" }), new(new[] { "state:exit", "bucket:2_5" }), new(new[] { "state:exit", "bucket:gte_5" }), - // memory_pressure.duration, index = 605 + // memory_pressure.duration, index = 607 new(new[] { "bucket:lt_1s" }), new(new[] { "bucket:1_5s" }), new(new[] { "bucket:5_30s" }), new(new[] { "bucket:gte_30s" }), - // events.skipped, index = 609 + // events.skipped, index = 611 new(new[] { "reason:rateLimitGlobal", "event_type:snapshot" }), new(new[] { "reason:rateLimitGlobal", "event_type:log" }), new(new[] { "reason:rateLimitGlobal", "event_type:metric" }), @@ -683,12 +685,12 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:evaluationTimeout", "event_type:log" }), new(new[] { "reason:evaluationTimeout", "event_type:metric" }), new(new[] { "reason:evaluationTimeout", "event_type:span" }), - // events.dropped, index = 621 + // events.dropped, index = 623 new(new[] { "reason:queueFull", "event_type:snapshot" }), new(new[] { "reason:queueFull", "event_type:log" }), new(new[] { "reason:payloadTooLarge", "event_type:snapshot" }), new(new[] { "reason:payloadTooLarge", "event_type:log" }), - // capture.incomplete, index = 625 + // capture.incomplete, index = 627 new(new[] { "event_type:snapshot", "reason:runtimeError" }), new(new[] { "event_type:snapshot", "reason:timeout" }), new(new[] { "event_type:snapshot", "reason:depth" }), @@ -705,13 +707,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "event_type:log", "reason:stringLength" }), new(new[] { "event_type:log", "reason:payloadTooLarge" }), new(new[] { "event_type:log", "reason:other" }), - // waf.init, index = 641 + // waf.init, index = 643 new(new[] { "waf_version", "event_rules_version", "success:true" }), new(new[] { "waf_version", "event_rules_version", "success:false" }), - // waf.updates, index = 643 + // waf.updates, index = 645 new(new[] { "waf_version", "event_rules_version", "success:true" }), new(new[] { "waf_version", "event_rules_version", "success:false" }), - // waf.requests, index = 645 + // waf.requests, index = 647 new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:true", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:true", "request_blocked:true", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:false" }), @@ -722,22 +724,22 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:true", "block_failure:false", "rate_limited:false", "input_truncated:true", "waf_error:false" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:false", "waf_error:true" }), new(new[] { "waf_version", "event_rules_version", "rule_triggered:false", "request_blocked:false", "waf_timeout:false", "block_failure:false", "rate_limited:false", "input_truncated:true", "waf_error:true" }), - // waf.input_truncated, index = 655 + // waf.input_truncated, index = 657 new(new[] { "truncation_reason:string_too_long" }), new(new[] { "truncation_reason:list_or_map_too_large" }), new(new[] { "truncation_reason:object_too_deep" }), - // waf.error, index = 658 + // waf.error, index = 660 new(new[] { "waf_version", "event_rules_version", "waf_error:-127" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-3" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-2" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1" }), - // rasp.rule.eval, index = 662 + // rasp.rule.eval, index = 664 new(new[] { "waf_version", "event_rules_version", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.rule.match, index = 667 + // rasp.rule.match, index = 669 new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "block:success", "rule_type:sql_injection" }), @@ -753,13 +755,13 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "block:irrelevant", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.timeout, index = 682 + // rasp.timeout, index = 684 new(new[] { "waf_version", "event_rules_version", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.error, index = 687 + // rasp.error, index = 689 new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:lfi" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:ssrf" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-127", "rule_type:sql_injection" }), @@ -780,7 +782,7 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:sql_injection" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "waf_version", "event_rules_version", "waf_error:-1", "rule_type:command_injection", "rule_variant:exec" }), - // rasp.rule.skipped, index = 707 + // rasp.rule.skipped, index = 709 new(new[] { "reason:after-request", "rule_type:lfi" }), new(new[] { "reason:after-request", "rule_type:ssrf" }), new(new[] { "reason:after-request", "rule_type:sql_injection" }), @@ -791,23 +793,23 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "reason:out-of-request", "rule_type:sql_injection" }), new(new[] { "reason:out-of-request", "rule_type:command_injection", "rule_variant:shell" }), new(new[] { "reason:out-of-request", "rule_type:command_injection", "rule_variant:exec" }), - // instrum.user_auth.missing_user_id, index = 717 + // instrum.user_auth.missing_user_id, index = 719 new(new[] { "framework:aspnetcore_identity", "event_type:login_success" }), new(new[] { "framework:aspnetcore_identity", "event_type:login_failure" }), new(new[] { "framework:aspnetcore_identity", "event_type:signup" }), new(new[] { "framework:unknown", "event_type:signup" }), - // instrum.user_auth.missing_user_login, index = 721 + // instrum.user_auth.missing_user_login, index = 723 new(new[] { "framework:aspnetcore_identity", "event_type:login_success" }), new(new[] { "framework:aspnetcore_identity", "event_type:login_failure" }), new(new[] { "framework:aspnetcore_identity", "event_type:signup" }), new(new[] { "framework:unknown", "event_type:signup" }), - // sdk.event, index = 725 + // sdk.event, index = 727 new(new[] { "event_type:login_success", "sdk_version:v1" }), new(new[] { "event_type:login_success", "sdk_version:v2" }), new(new[] { "event_type:login_failure", "sdk_version:v1" }), new(new[] { "event_type:login_failure", "sdk_version:v2" }), new(new[] { "event_type:custom", "sdk_version:v1" }), - // executed.source, index = 730 + // executed.source, index = 732 new(new[] { "source_type:http.request.body" }), new(new[] { "source_type:http.request.path" }), new(new[] { "source_type:http.request.parameter.name" }), @@ -822,9 +824,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "source_type:http.request.uri" }), new(new[] { "source_type:grpc.request.body" }), new(new[] { "source_type:sql.row.value" }), - // executed.propagation, index = 744 + // executed.propagation, index = 746 new(null), - // executed.sink, index = 745 + // executed.sink, index = 747 new(new[] { "vulnerability_type:none" }), new(new[] { "vulnerability_type:weak_cipher" }), new(new[] { "vulnerability_type:weak_hash" }), @@ -852,9 +854,9 @@ private static AggregatedMetric[] GetCountBuffer() new(new[] { "vulnerability_type:directory_listing_leak" }), new(new[] { "vulnerability_type:session_timeout" }), new(new[] { "vulnerability_type:email_html_injection" }), - // request.tainted, index = 772 + // request.tainted, index = 774 new(null), - // suppressed.vulnerabilities, index = 773 + // suppressed.vulnerabilities, index = 775 new(new[] { "vulnerability_type:none" }), new(new[] { "vulnerability_type:weak_cipher" }), new(new[] { "vulnerability_type:weak_hash" }), @@ -890,7 +892,7 @@ private static AggregatedMetric[] GetCountBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountEntryCounts { get; } - = new int[]{ 4, 85, 1, 3, 7, 2, 2, 7, 1, 1, 1, 22, 3, 2, 5, 5, 4, 1, 1, 22, 3, 34, 90, 90, 4, 4, 4, 4, 2, 44, 6, 1, 1, 85, 1, 22, 3, 8, 2, 10, 8, 4, 12, 4, 16, 2, 2, 10, 3, 4, 5, 15, 5, 20, 10, 4, 4, 5, 14, 1, 27, 1, 27, }; + = new int[]{ 4, 86, 1, 3, 7, 2, 2, 7, 1, 1, 1, 22, 3, 2, 5, 5, 4, 1, 1, 22, 3, 34, 90, 90, 4, 4, 4, 4, 2, 44, 6, 1, 1, 86, 1, 22, 3, 8, 2, 10, 8, 4, 12, 4, 16, 2, 2, 10, 3, 4, 5, 15, 5, 20, 10, 4, 4, 5, 14, 1, 27, 1, 27, }; public void RecordCountLogCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.LogLevel tag, int increment = 1) { @@ -906,357 +908,357 @@ public void RecordCountSpanCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.In public void RecordCountSpanFinished(int increment = 1) { - Interlocked.Add(ref _buffer.Count[89], increment); + Interlocked.Add(ref _buffer.Count[90], increment); } public void RecordCountSpanEnqueuedForSerialization(Datadog.Trace.Telemetry.Metrics.MetricTags.SpanEnqueueReason tag, int increment = 1) { - var index = 90 + (int)tag; + var index = 91 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountSpanDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DropReason tag, int increment = 1) { - var index = 93 + (int)tag; + var index = 94 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceSegmentCreated(Datadog.Trace.Telemetry.Metrics.MetricTags.TraceContinuation tag, int increment = 1) { - var index = 100 + (int)tag; + var index = 101 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkEnqueued(Datadog.Trace.Telemetry.Metrics.MetricTags.TraceChunkEnqueueReason tag, int increment = 1) { - var index = 102 + (int)tag; + var index = 103 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DropReason tag, int increment = 1) { - var index = 104 + (int)tag; + var index = 105 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceChunkSent(int increment = 1) { - Interlocked.Add(ref _buffer.Count[111], increment); + Interlocked.Add(ref _buffer.Count[112], increment); } public void RecordCountTraceSegmentsClosed(int increment = 1) { - Interlocked.Add(ref _buffer.Count[112], increment); + Interlocked.Add(ref _buffer.Count[113], increment); } public void RecordCountTraceApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[113], increment); + Interlocked.Add(ref _buffer.Count[114], increment); } public void RecordCountTraceApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 114 + (int)tag; + var index = 115 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTraceApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 136 + (int)tag; + var index = 137 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTracePartialFlush(Datadog.Trace.Telemetry.Metrics.MetricTags.PartialFlushReason tag, int increment = 1) { - var index = 139 + (int)tag; + var index = 140 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderStyleInjected(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderStyle tag, int increment = 1) { - var index = 141 + (int)tag; + var index = 142 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderStyleExtracted(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderStyle tag, int increment = 1) { - var index = 146 + (int)tag; + var index = 147 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderTruncated(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderTruncationReason tag, int increment = 1) { - var index = 151 + (int)tag; + var index = 152 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountContextHeaderMalformed(Datadog.Trace.Telemetry.Metrics.MetricTags.ContextHeaderMalformed tag, int increment = 1) { - var index = 155 + (int)tag; + var index = 156 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[156], increment); + Interlocked.Add(ref _buffer.Count[157], increment); } public void RecordCountStatsApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 157 + (int)tag; + var index = 158 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 179 + (int)tag; + var index = 180 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountStatsCollapsedSpans(Datadog.Trace.Telemetry.Metrics.MetricTags.CollapsedStatsFields tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OversizedStatsFields tag2, int increment = 1) { - var index = 182 + ((int)tag1 * 2) + (int)tag2; + var index = 183 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountOpenTelemetryConfigHiddenByDatadogConfig(Datadog.Trace.Telemetry.Metrics.MetricTags.DatadogConfiguration tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OpenTelemetryConfiguration tag2, int increment = 1) { - var index = 216 + ((int)tag1 * 10) + (int)tag2; + var index = 217 + ((int)tag1 * 10) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountOpenTelemetryConfigInvalid(Datadog.Trace.Telemetry.Metrics.MetricTags.DatadogConfiguration tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.OpenTelemetryConfiguration tag2, int increment = 1) { - var index = 306 + ((int)tag1 * 10) + (int)tag2; + var index = 307 + ((int)tag1 * 10) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportAttempts(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 396 + ((int)tag1 * 2) + (int)tag2; + var index = 397 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportSuccesses(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 400 + ((int)tag1 * 2) + (int)tag2; + var index = 401 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportPartialSuccesses(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 404 + ((int)tag1 * 2) + (int)tag2; + var index = 405 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMetricsExportFailures(Datadog.Trace.Telemetry.Metrics.MetricTags.Protocol tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.MetricEncoding tag2, int increment = 1) { - var index = 408 + ((int)tag1 * 2) + (int)tag2; + var index = 409 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiRequests(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag, int increment = 1) { - var index = 412 + (int)tag; + var index = 413 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag2, int increment = 1) { - var index = 414 + ((int)tag1 * 22) + (int)tag2; + var index = 415 + ((int)tag1 * 22) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountTelemetryApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.TelemetryEndpoint tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag2, int increment = 1) { - var index = 458 + ((int)tag1 * 3) + (int)tag2; + var index = 459 + ((int)tag1 * 3) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountVersionConflictTracerCreated(int increment = 1) { - Interlocked.Add(ref _buffer.Count[464], increment); + Interlocked.Add(ref _buffer.Count[465], increment); } public void RecordCountUnsupportedCustomInstrumentationServices(int increment = 1) { - Interlocked.Add(ref _buffer.Count[465], increment); + Interlocked.Add(ref _buffer.Count[466], increment); } public void RecordCountDirectLogLogs(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag, int increment = 1) { - var index = 466 + (int)tag; + var index = 467 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDirectLogApiRequests(int increment = 1) { - Interlocked.Add(ref _buffer.Count[551], increment); + Interlocked.Add(ref _buffer.Count[553], increment); } public void RecordCountDirectLogApiResponses(Datadog.Trace.Telemetry.Metrics.MetricTags.StatusCode tag, int increment = 1) { - var index = 552 + (int)tag; + var index = 554 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDirectLogApiErrors(Datadog.Trace.Telemetry.Metrics.MetricTags.ApiError tag, int increment = 1) { - var index = 574 + (int)tag; + var index = 576 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureTransitions(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureTrigger tag2, int increment = 1) { - var index = 577 + ((int)tag1 * 4) + (int)tag2; + var index = 579 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureDisabled(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureDisabledReason tag, int increment = 1) { - var index = 585 + (int)tag; + var index = 587 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureMemoryUsagePct(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureMemoryBucket tag2, int increment = 1) { - var index = 587 + ((int)tag1 * 5) + (int)tag2; + var index = 589 + ((int)tag1 * 5) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureGcActivity(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureState tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureGcBucket tag2, int increment = 1) { - var index = 597 + ((int)tag1 * 4) + (int)tag2; + var index = 599 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerMemoryPressureDuration(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerMemoryPressureDurationBucket tag, int increment = 1) { - var index = 605 + (int)tag; + var index = 607 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerEventsSkipped(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventsSkippedReason tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventType tag2, int increment = 1) { - var index = 609 + ((int)tag1 * 4) + (int)tag2; + var index = 611 + ((int)tag1 * 4) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerEventsDropped(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerEventsDroppedReason tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureEventType tag2, int increment = 1) { - var index = 621 + ((int)tag1 * 2) + (int)tag2; + var index = 623 + ((int)tag1 * 2) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountDebuggerCaptureIncomplete(Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureEventType tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.DebuggerCaptureIncompleteReason tag2, int increment = 1) { - var index = 625 + ((int)tag1 * 8) + (int)tag2; + var index = 627 + ((int)tag1 * 8) + (int)tag2; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafInit(Datadog.Trace.Telemetry.Metrics.MetricTags.WafStatus tag, int increment = 1) { - var index = 641 + (int)tag; + var index = 643 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafUpdates(Datadog.Trace.Telemetry.Metrics.MetricTags.WafStatus tag, int increment = 1) { - var index = 643 + (int)tag; + var index = 645 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafRequests(Datadog.Trace.Telemetry.Metrics.MetricTags.WafAnalysis tag, int increment = 1) { - var index = 645 + (int)tag; + var index = 647 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountInputTruncated(Datadog.Trace.Telemetry.Metrics.MetricTags.TruncationReason tag, int increment = 1) { - var index = 655 + (int)tag; + var index = 657 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountWafError(Datadog.Trace.Telemetry.Metrics.MetricTags.WafError tag, int increment = 1) { - var index = 658 + (int)tag; + var index = 660 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleEval(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleType tag, int increment = 1) { - var index = 662 + (int)tag; + var index = 664 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleMatch(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleTypeMatch tag, int increment = 1) { - var index = 667 + (int)tag; + var index = 669 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspTimeout(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleType tag, int increment = 1) { - var index = 682 + (int)tag; + var index = 684 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspError(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspError tag, int increment = 1) { - var index = 687 + (int)tag; + var index = 689 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountRaspRuleSkipped(Datadog.Trace.Telemetry.Metrics.MetricTags.RaspRuleTypeSkipped tag, int increment = 1) { - var index = 707 + (int)tag; + var index = 709 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMissingUserId(Datadog.Trace.Telemetry.Metrics.MetricTags.AuthenticationFrameworkWithEventType tag, int increment = 1) { - var index = 717 + (int)tag; + var index = 719 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountMissingUserLogin(Datadog.Trace.Telemetry.Metrics.MetricTags.AuthenticationFrameworkWithEventType tag, int increment = 1) { - var index = 721 + (int)tag; + var index = 723 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountUserEventSdk(Datadog.Trace.Telemetry.Metrics.MetricTags.UserEventSdk tag, int increment = 1) { - var index = 725 + (int)tag; + var index = 727 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastExecutedSources(Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType tag, int increment = 1) { - var index = 730 + (int)tag; + var index = 732 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastExecutedPropagations(int increment = 1) { - Interlocked.Add(ref _buffer.Count[744], increment); + Interlocked.Add(ref _buffer.Count[746], increment); } public void RecordCountIastExecutedSinks(Datadog.Trace.Telemetry.Metrics.MetricTags.IastVulnerabilityType tag, int increment = 1) { - var index = 745 + (int)tag; + var index = 747 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } public void RecordCountIastRequestTainted(int increment = 1) { - Interlocked.Add(ref _buffer.Count[772], increment); + Interlocked.Add(ref _buffer.Count[774], increment); } public void RecordCountIastSuppressedVulnerabilities(Datadog.Trace.Telemetry.Metrics.MetricTags.IastVulnerabilityType tag, int increment = 1) { - var index = 773 + (int)tag; + var index = 775 + (int)tag; Interlocked.Add(ref _buffer.Count[index], increment); } } \ No newline at end of file diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs index 82355f89f551..0268d09801b7 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/MetricsTelemetryCollector_CountShared.g.cs @@ -11,7 +11,7 @@ namespace Datadog.Trace.Telemetry; internal sealed partial class MetricsTelemetryCollector { - private const int CountSharedLength = 340; + private const int CountSharedLength = 344; /// /// Creates the buffer for the values. @@ -276,6 +276,10 @@ private static AggregatedMetric[] GetCountSharedBuffer() new(new[] { "integration_name:azureeventhubs", "error_type:invoker" }), new(new[] { "integration_name:azureeventhubs", "error_type:execution" }), new(new[] { "integration_name:azureeventhubs", "error_type:missing_member" }), + new(new[] { "integration_name:azureeventgrid", "error_type:duck_typing" }), + new(new[] { "integration_name:azureeventgrid", "error_type:invoker" }), + new(new[] { "integration_name:azureeventgrid", "error_type:execution" }), + new(new[] { "integration_name:azureeventgrid", "error_type:missing_member" }), new(new[] { "integration_name:systemrandom", "error_type:duck_typing" }), new(new[] { "integration_name:systemrandom", "error_type:invoker" }), new(new[] { "integration_name:systemrandom", "error_type:execution" }), @@ -368,7 +372,7 @@ private static AggregatedMetric[] GetCountSharedBuffer() /// It is equal to the cardinality of the tag combinations (or 1 if there are no tags) /// private static int[] CountSharedEntryCounts { get; } - = new int[]{ 340, }; + = new int[]{ 344, }; public void RecordCountSharedIntegrationsError(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.InstrumentationError tag2, int increment = 1) { diff --git a/tracer/src/Datadog.Trace/Tagging/AzureEventGridTags.cs b/tracer/src/Datadog.Trace/Tagging/AzureEventGridTags.cs new file mode 100644 index 000000000000..9bb7eb5f2a09 --- /dev/null +++ b/tracer/src/Datadog.Trace/Tagging/AzureEventGridTags.cs @@ -0,0 +1,100 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// +#nullable enable + +using Datadog.Trace.SourceGenerators; + +#pragma warning disable SA1402 // File must contain single type +namespace Datadog.Trace.Tagging +{ + internal partial class AzureEventGridTags : InstrumentationTags + { + public AzureEventGridTags() + : this(SpanKinds.Producer) + { + } + + public AzureEventGridTags(string spanKind) + { + SpanKind = spanKind; + } + + [Tag(Trace.Tags.SpanKind)] + public override string SpanKind { get; } + + [Tag(Trace.Tags.InstrumentationName)] + public string InstrumentationName => "AzureEventGrid"; + + [Tag(Trace.Tags.MessagingSystem)] + public string MessagingSystem => "eventgrid"; + + [Tag(Trace.Tags.MessagingOperation)] + public string? MessagingOperation { get; set; } + + [Tag(Trace.Tags.MessagingDestinationName)] + public string? MessagingDestinationName { get; set; } + + [Tag(Trace.Tags.NetworkDestinationName)] + public string? NetworkDestinationName { get; set; } + + [Tag(Trace.Tags.NetworkDestinationPort)] + public string? NetworkDestinationPort { get; set; } + + [Tag(Trace.Tags.MessagingBatchMessageCount)] + public string? MessagingBatchMessageCount { get; set; } + + [Tag(Trace.Tags.MessagingMessageId)] + public string? MessagingMessageId { get; set; } + } + + internal sealed partial class AzureEventGridV1Tags : AzureEventGridTags + { + private string? _peerServiceOverride; + + public AzureEventGridV1Tags() + : base() + { + } + + public AzureEventGridV1Tags(string spanKind) + : base(spanKind) + { + } + + [Tag(Trace.Tags.PeerService)] + public string? PeerService + { + get + { + if (SpanKind == SpanKinds.Consumer) + { + return null; + } + + return _peerServiceOverride ?? MessagingDestinationName; + } + private set => _peerServiceOverride = value; + } + + [Tag(Trace.Tags.PeerServiceSource)] + public string? PeerServiceSource + { + get + { + if (SpanKind == SpanKinds.Consumer) + { + return null; + } + + return _peerServiceOverride is not null + ? "peer.service" + : MessagingDestinationName is not null + ? Trace.Tags.MessagingDestinationName + : null; + } + } + } +} +#pragma warning restore SA1402 // File must contain single type diff --git a/tracer/src/Datadog.Trace/Telemetry/Metrics/IntegrationIdExtensions.cs b/tracer/src/Datadog.Trace/Telemetry/Metrics/IntegrationIdExtensions.cs index 3e2d7e976cab..7556da7e9690 100644 --- a/tracer/src/Datadog.Trace/Telemetry/Metrics/IntegrationIdExtensions.cs +++ b/tracer/src/Datadog.Trace/Telemetry/Metrics/IntegrationIdExtensions.cs @@ -70,6 +70,7 @@ public static MetricTags.IntegrationName GetMetricTag(this IntegrationId integra IntegrationId.AwsKinesis => MetricTags.IntegrationName.AwsKinesis, IntegrationId.AzureServiceBus => MetricTags.IntegrationName.AzureServiceBus, IntegrationId.AzureEventHubs => MetricTags.IntegrationName.AzureEventHubs, + IntegrationId.AzureEventGrid => MetricTags.IntegrationName.AzureEventGrid, IntegrationId.SystemRandom => MetricTags.IntegrationName.SystemRandom, IntegrationId.AwsDynamoDb => MetricTags.IntegrationName.AwsDynamoDb, IntegrationId.IbmMq => MetricTags.IntegrationName.IbmMq, diff --git a/tracer/src/Datadog.Trace/Telemetry/Metrics/MetricTags.cs b/tracer/src/Datadog.Trace/Telemetry/Metrics/MetricTags.cs index 46186eb401f3..7b9a2dcece00 100644 --- a/tracer/src/Datadog.Trace/Telemetry/Metrics/MetricTags.cs +++ b/tracer/src/Datadog.Trace/Telemetry/Metrics/MetricTags.cs @@ -366,6 +366,7 @@ internal enum IntegrationName [Description("integration_name:awskinesis")]AwsKinesis, [Description("integration_name:azureservicebus")]AzureServiceBus, [Description("integration_name:azureeventhubs")]AzureEventHubs, + [Description("integration_name:azureeventgrid")] AzureEventGrid, [Description("integration_name:systemrandom")] SystemRandom, [Description("integration_name:awsdynamodb")]AwsDynamoDb, [Description("integration_name:ibmmq")]IbmMq, diff --git a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataAPI.cs b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataAPI.cs index 8fc91b14ce55..d5435c907177 100644 --- a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataAPI.cs +++ b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataAPI.cs @@ -153,6 +153,20 @@ public static Result IsAzureEventHubsInbound(this MockSpan span, string metadata _ => span.IsAzureEventHubsInboundV0(excludeTags), }; + public static Result IsAzureEventGridOutbound(this MockSpan span, string metadataSchemaVersion, ISet excludeTags = null) => + metadataSchemaVersion switch + { + "v1" => span.IsAzureEventGridOutboundV1(excludeTags), + _ => span.IsAzureEventGridOutboundV0(excludeTags), + }; + + public static Result IsAzureEventGridInbound(this MockSpan span, string metadataSchemaVersion, ISet excludeTags = null) => + metadataSchemaVersion switch + { + "v1" => span.IsAzureEventGridInboundV1(excludeTags), + _ => span.IsAzureEventGridInboundV0(excludeTags), + }; + public static Result IsCosmosDb(this MockSpan span, string metadataSchemaVersion) => metadataSchemaVersion switch { diff --git a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs index 5a56a8efc8b5..77a977edf11f 100644 --- a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs +++ b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs @@ -622,6 +622,40 @@ public static Result IsAzureEventHubsInboundV0(this MockSpan span, ISet .IsOptional("_dd.svc_src") .Matches("span.kind", "consumer")); + public static Result IsAzureEventGridOutboundV0(this MockSpan span, ISet excludeTags = null) => Result.FromSpan(span, excludeTags) + .Properties(s => s + .Matches(Name, "azure_eventgrid.send") + .Matches(Type, "queue")) + .Tags(s => s + .IfPresentMatches("messaging.system", "eventgrid") + .Matches("messaging.operation", "send") + .IsOptional("messaging.batch.message_count") + .IsOptional("messaging.message_id") + .IsPresent("network.destination.name") + .IsOptional("network.destination.port") + .IsOptional("net.peer.name") + .IsOptional("peer.address") + .Matches("component", "AzureEventGrid") + .IsOptional("_dd.base_service") + .IsOptional("_dd.tags.process") + .IsOptional("_dd.svc_src") + .Matches("span.kind", "producer")); + + public static Result IsAzureEventGridInboundV0(this MockSpan span, ISet excludeTags = null) => Result.FromSpan(span, excludeTags) + .Properties(s => s + .Matches(Name, "azure_eventgrid.receive") + .Matches(Type, "queue")) + .Tags(s => s + .IfPresentMatches("messaging.system", "eventgrid") + .Matches("messaging.operation", "receive") + .IsOptional("messaging.batch.message_count") + .IsOptional("messaging.message_id") + .Matches("component", "AzureEventGrid") + .IsOptional("_dd.base_service") + .IsOptional("_dd.tags.process") + .IsOptional("_dd.svc_src") + .Matches("span.kind", "consumer")); + public static Result IsCosmosDbV0(this MockSpan span) => Result.FromSpan(span) .Properties(s => s .Matches(Name, "cosmosdb.query") diff --git a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs index b212fc6a6536..1baf77c545ab 100644 --- a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs +++ b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs @@ -406,6 +406,43 @@ public static Result IsAzureEventHubsInboundV1(this MockSpan span, ISet .IsOptional("_dd.svc_src") .Matches("span.kind", "consumer")); + public static Result IsAzureEventGridOutboundV1(this MockSpan span, ISet excludeTags = null) => Result.FromSpan(span, excludeTags) + .Properties(s => s + .Matches(Name, "azure_eventgrid.send") + .Matches(Type, "queue")) + .Tags(s => s + .IfPresentMatches("messaging.system", "eventgrid") + .Matches("messaging.operation", "send") + .IsOptional("messaging.batch.message_count") + .IsOptional("messaging.message_id") + .IsPresent("network.destination.name") + .IsOptional("network.destination.port") + .IsOptional("net.peer.name") + .IsOptional("peer.address") + .IsOptional("peer.service") + .IsOptional("peer.service.remapped_from") + .IsOptional("_dd.peer.service.source") + .Matches("component", "AzureEventGrid") + .IsOptional("_dd.base_service") + .IsOptional("_dd.tags.process") + .IsOptional("_dd.svc_src") + .Matches("span.kind", "producer")); + + public static Result IsAzureEventGridInboundV1(this MockSpan span, ISet excludeTags = null) => Result.FromSpan(span, excludeTags) + .Properties(s => s + .Matches(Name, "azure_eventgrid.receive") + .Matches(Type, "queue")) + .Tags(s => s + .IfPresentMatches("messaging.system", "eventgrid") + .Matches("messaging.operation", "receive") + .IsOptional("messaging.batch.message_count") + .IsOptional("messaging.message_id") + .Matches("component", "AzureEventGrid") + .IsOptional("_dd.base_service") + .IsOptional("_dd.tags.process") + .IsOptional("_dd.svc_src") + .Matches("span.kind", "consumer")); + public static Result IsCosmosDbV1(this MockSpan span) => Result.FromSpan(span) .Properties(s => s .Matches(Name, "cosmosdb.query") diff --git a/tracer/test/Datadog.Trace.Tests/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridObservingEnumerableTests.cs b/tracer/test/Datadog.Trace.Tests/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridObservingEnumerableTests.cs new file mode 100644 index 000000000000..2fcbdd6d3641 --- /dev/null +++ b/tracer/test/Datadog.Trace.Tests/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridObservingEnumerableTests.cs @@ -0,0 +1,251 @@ +// +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. +// + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Datadog.Trace.ClrProfiler.AutoInstrumentation.Azure.EventGrid; +using FluentAssertions; +using Xunit; + +namespace Datadog.Trace.Tests.ClrProfiler.AutoInstrumentation.Azure.EventGrid; + +public class EventGridObservingEnumerableTests +{ + [Fact] + public void WrapDoesNotEnumerateSource() + { + var enumerationCount = 0; + var observer = new RecordingObserver(); + IEnumerable source = CreateEvents(); + + var wrapped = EventGridObservingEnumerable.Wrap(source, observer); + + wrapped.Should().NotBeSameAs(source); + enumerationCount.Should().Be(0); + observer.Items.Should().BeEmpty(); + observer.Completions.Should().BeEmpty(); + + IEnumerable CreateEvents() + { + enumerationCount++; + yield return 1; + } + } + + [Fact] + public void FullEnumerationYieldsOriginalItemsAndReportsCompletion() + { + var firstEvent = new TestEvent(1); + var secondEvent = new TestEvent(2); + IEnumerable source = new[] { firstEvent, secondEvent }; + var observer = new RecordingObserver(); + + var wrapped = EventGridObservingEnumerable.Wrap(source, observer); + + var result = wrapped.ToArray(); + + result.Should().HaveCount(2); + result[0].Should().BeSameAs(firstEvent); + result[1].Should().BeSameAs(secondEvent); + observer.Items.Should().HaveCount(2); + observer.Items[0].Should().BeSameAs(firstEvent); + observer.Items[1].Should().BeSameAs(secondEvent); + observer.Completions.Should().ContainSingle(); + observer.Completions[0].Count.Should().Be(2); + observer.Completions[0].FirstItem.Should().BeSameAs(firstEvent); + } + + [Fact] + public void EachEnumerationDelegatesToSource() + { + var enumerationCount = 0; + var observer = new RecordingObserver(); + IEnumerable source = CreateEvents(); + var wrapped = EventGridObservingEnumerable.Wrap(source, observer); + + var firstPass = wrapped.ToArray(); + var secondPass = wrapped.ToArray(); + + enumerationCount.Should().Be(2); + firstPass.Select(item => item.Id).Should().Equal(1, 2); + secondPass.Select(item => item.Id).Should().Equal(1, 2); + firstPass[0].Should().NotBeSameAs(secondPass[0]); + firstPass[1].Should().NotBeSameAs(secondPass[1]); + observer.Completions.Select(completion => completion.Count).Should().Equal(2, 2); + + IEnumerable CreateEvents() + { + enumerationCount++; + yield return new TestEvent(1); + yield return new TestEvent(2); + } + } + + [Fact] + public void PreservesOneShotEnumerableBehavior() + { + var observer = new RecordingObserver(); + IEnumerable source = new OneShotEnumerable([1, 2, 3]); + var wrapped = EventGridObservingEnumerable.Wrap(source, observer); + + var firstResult = wrapped.ToArray(); + Action secondEnumeration = () => wrapped.ToArray(); + + firstResult.Should().Equal(1, 2, 3); + secondEnumeration.Should().Throw(); + observer.Items.Should().Equal(1, 2, 3); + observer.Completions.Select(completion => completion.Count).Should().Equal(3); + } + + [Fact] + public void PartialEnumerationDisposesSourceWithoutReportingCompletion() + { + var disposeCount = 0; + var observer = new RecordingObserver(); + IEnumerable source = CreateEvents(); + var wrapped = EventGridObservingEnumerable.Wrap(source, observer); + + using (var enumerator = wrapped.GetEnumerator()) + { + enumerator.MoveNext().Should().BeTrue(); + enumerator.Current.Should().Be(1); + } + + disposeCount.Should().Be(1); + observer.Items.Should().Equal(1); + observer.Completions.Should().BeEmpty(); + + IEnumerable CreateEvents() + { + try + { + yield return 1; + yield return 2; + yield return 3; + } + finally + { + disposeCount++; + } + } + } + + [Fact] + public void SourceExceptionPropagatesWithoutReportingCompletion() + { + var enumerationCount = 0; + var expectedException = new InvalidOperationException("Expected test exception"); + var observer = new RecordingObserver(); + IEnumerable source = CreateEvents(); + var wrapped = EventGridObservingEnumerable.Wrap(source, observer); + + Action enumerate = () => wrapped.ToArray(); + + enumerate.Should().Throw().Which.Should().BeSameAs(expectedException); + enumerationCount.Should().Be(1); + observer.Items.Should().Equal(1); + observer.Completions.Should().BeEmpty(); + + IEnumerable CreateEvents() + { + enumerationCount++; + yield return 1; + throw expectedException; + } + } + + [Fact] + public void ObserverFailuresDoNotAffectEnumeration() + { + IEnumerable source = new[] { 1, 2, 3 }; + var wrapped = EventGridObservingEnumerable.Wrap(source, new ThrowingObserver()); + + var result = wrapped.ToArray(); + + result.Should().Equal(1, 2, 3); + } + + [Fact] + public void EmptyEnumerationReportsZeroItems() + { + IEnumerable source = []; + var observer = new RecordingObserver(); + var wrapped = EventGridObservingEnumerable.Wrap(source, observer); + + var result = wrapped.ToArray(); + + result.Should().BeEmpty(); + observer.Items.Should().BeEmpty(); + observer.Completions.Should().ContainSingle(); + observer.Completions[0].Count.Should().Be(0); + observer.Completions[0].FirstItem.Should().BeNull(); + } + + [Fact] + public void ReturnsOriginalInputWhenWrappingIsUnsupported() + { + var observer = new RecordingObserver(); + IEnumerable? nullSource = null; + var concreteSource = new List { 1, 2, 3 }; + + var wrappedNull = EventGridObservingEnumerable.Wrap(nullSource, observer); + var wrappedConcrete = EventGridObservingEnumerable.Wrap(concreteSource, observer); + + wrappedNull.Should().BeNull(); + wrappedConcrete.Should().BeSameAs(concreteSource); + observer.Items.Should().BeEmpty(); + observer.Completions.Should().BeEmpty(); + } + + private sealed record TestEvent(int Id); + + private sealed class RecordingObserver : EventGridObservingEnumerable.IObserver + { + public List Items { get; } = []; + + public List Completions { get; } = []; + + public void OnItem(object? item) => Items.Add(item); + + public void OnEnumerationCompleted(int count, object? firstItem) => Completions.Add(new Completion(count, firstItem)); + } + + private sealed record Completion(int Count, object? FirstItem); + + private sealed class ThrowingObserver : EventGridObservingEnumerable.IObserver + { + public void OnItem(object? item) => throw new InvalidOperationException("Expected observer exception"); + + public void OnEnumerationCompleted(int count, object? firstItem) => throw new InvalidOperationException("Expected observer exception"); + } + + private sealed class OneShotEnumerable : IEnumerable + { + private readonly IEnumerable _items; + private bool _enumerated; + + public OneShotEnumerable(IEnumerable items) + { + _items = items; + } + + public IEnumerator GetEnumerator() + { + if (_enumerated) + { + throw new InvalidOperationException("The enumerable can only be enumerated once."); + } + + _enumerated = true; + return _items.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + } +} diff --git a/tracer/test/Datadog.Trace.Tests/Tagging/InstrumentationTagsTests.cs b/tracer/test/Datadog.Trace.Tests/Tagging/InstrumentationTagsTests.cs index b35c02bfa58b..9024c8f8b01d 100644 --- a/tracer/test/Datadog.Trace.Tests/Tagging/InstrumentationTagsTests.cs +++ b/tracer/test/Datadog.Trace.Tests/Tagging/InstrumentationTagsTests.cs @@ -591,6 +591,29 @@ public void AzureServiceBusV1Tags_PeerService_CustomTakesPrecedence() tags.GetTag(Tags.PeerServiceRemappedFrom).Should().BeNull(); } + [Fact] + public void AzureEventGridV1Tags_PeerServiceSource_NotSetWithoutDestination() + { + var tags = new AzureEventGridV1Tags(SpanKinds.Producer); + + tags.PeerService.Should().BeNull(); + tags.PeerServiceSource.Should().BeNull(); + } + + [Theory] + [InlineData(SpanKinds.Consumer, null, null)] + [InlineData(SpanKinds.Producer, "destination", Trace.Tags.MessagingDestinationName)] + public void AzureEventGridV1Tags_PeerService_DependsOnSpanKind(string spanKind, string expectedPeerService, string expectedPeerServiceSource) + { + var tags = new AzureEventGridV1Tags(spanKind) + { + MessagingDestinationName = "destination", + }; + + tags.PeerService.Should().Be(expectedPeerService); + tags.PeerServiceSource.Should().Be(expectedPeerServiceSource); + } + [Fact] public void RedisV1Tags_PeerService_PopulatesFromOutHost() {