diff --git a/docs/span_attribute_schema/v0.md b/docs/span_attribute_schema/v0.md index 6f499ba1081c..bd9c017245da 100644 --- a/docs/span_attribute_schema/v0.md +++ b/docs/span_attribute_schema/v0.md @@ -642,6 +642,44 @@ peer.address | No server.address | Yes span.kind | `consumer` +## AzureEventGridOutbound +### Span properties +Name | Required | +---------|----------------| +Name | `azure_eventgrid.send` +Type | `queue` +### Tags +Name | Required | +---------|----------------| +_dd.base_service | No +component | `AzureEventGrid` +messaging.batch.message_count | No +messaging.message_id | No +messaging.operation | `send` +messaging.system | Optional: `eventgrid` +net.peer.name | No +network.destination.name | Yes +network.destination.port | No +peer.address | No +span.kind | `producer` + +## AzureEventGridInbound +### Span properties +Name | Required | +---------|----------------| +Name | `azure_eventgrid.receive` +Type | `queue` +### Tags +Name | Required | +---------|----------------| +_dd.base_service | No +component | `AzureEventGrid` +messaging.batch.message_count | No +messaging.message_id | No +messaging.operation | `receive` +messaging.system | Optional: `eventgrid` +span.kind | `consumer` + ## CosmosDb ### Span properties Name | Required | diff --git a/docs/span_attribute_schema/v1.md b/docs/span_attribute_schema/v1.md index 047f873d988a..ae1c945156c6 100644 --- a/docs/span_attribute_schema/v1.md +++ b/docs/span_attribute_schema/v1.md @@ -401,6 +401,47 @@ peer.address | No server.address | Yes span.kind | `consumer` +## AzureEventGridOutbound +### Span properties +Name | Required | +---------|----------------| +Name | `azure_eventgrid.send` +Type | `queue` +### Tags +Name | Required | +---------|----------------| +_dd.base_service | No +_dd.peer.service.source | No +component | `AzureEventGrid` +messaging.batch.message_count | No +messaging.message_id | No +messaging.operation | `send` +messaging.system | Optional: `eventgrid` +net.peer.name | No +network.destination.name | Yes +network.destination.port | No +peer.address | No +peer.service | No +peer.service.remapped_from | No +span.kind | `producer` + +## AzureEventGridInbound +### Span properties +Name | Required | +---------|----------------| +Name | `azure_eventgrid.receive` +Type | `queue` +### Tags +Name | Required | +---------|----------------| +_dd.base_service | No +component | `AzureEventGrid` +messaging.batch.message_count | No +messaging.message_id | No +messaging.operation | `receive` +messaging.system | Optional: `eventgrid` +span.kind | `consumer` + ## CosmosDb ### Span properties Name | Required | diff --git a/tracer/build/supported_versions.json b/tracer/build/supported_versions.json index e341208329bb..4485e2d54467 100644 --- a/tracer/build/supported_versions.json +++ b/tracer/build/supported_versions.json @@ -408,6 +408,40 @@ } ] }, + { + "integrationName": "AzureEventGrid", + "assemblyName": "Azure.Messaging.EventGrid", + "minAssemblyVersionInclusive": "4.0.0", + "maxAssemblyVersionInclusive": "5.65535.65535", + "packages": [ + { + "name": "Azure.Messaging.EventGrid", + "minVersionAvailableInclusive": "4.0.0", + "minVersionSupportedInclusive": "4.0.0", + "minVersionTestedInclusive": "4.0.0", + "maxVersionSupportedInclusive": "5.0.0", + "maxVersionAvailableInclusive": "5.0.0", + "maxVersionTestedInclusive": "5.0.0" + } + ] + }, + { + "integrationName": "AzureEventGrid", + "assemblyName": "Azure.Messaging.EventGrid.Namespaces", + "minAssemblyVersionInclusive": "1.0.0", + "maxAssemblyVersionInclusive": "1.65535.65535", + "packages": [ + { + "name": "Azure.Messaging.EventGrid.Namespaces", + "minVersionAvailableInclusive": "1.0.0", + "minVersionSupportedInclusive": "1.0.0", + "minVersionTestedInclusive": "1.0.0", + "maxVersionSupportedInclusive": "1.1.0", + "maxVersionAvailableInclusive": "1.1.0", + "maxVersionTestedInclusive": "1.1.0" + } + ] + }, { "integrationName": "AzureEventHubs", "assemblyName": "Azure.Messaging.EventHubs", diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridCommon.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridCommon.cs index ad18fab25ed0..bc62519a0d28 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridCommon.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridCommon.cs @@ -26,7 +26,7 @@ internal static class EventGridCommon internal static CallTargetState CreateProducerSpan(TTarget instance, ref TEvents events, bool injectContext) { var tracer = Tracer.Instance; - if (!tracer.CurrentTraceSettings.Settings.IsIntegrationEnabled(IntegrationId.AzureEventGrid, defaultValue: false)) + if (!tracer.CurrentTraceSettings.Settings.IsIntegrationEnabled(IntegrationId.AzureEventGrid)) { return CallTargetState.GetDefault(); } @@ -50,7 +50,7 @@ internal static CallTargetState CreateNamespaceProducerSpanForEvent(TTa where TTarget : IEventGridSenderClient { var tracer = Tracer.Instance; - if (!tracer.CurrentTraceSettings.Settings.IsIntegrationEnabled(IntegrationId.AzureEventGrid, defaultValue: false)) + if (!tracer.CurrentTraceSettings.Settings.IsIntegrationEnabled(IntegrationId.AzureEventGrid)) { return CallTargetState.GetDefault(); } @@ -63,7 +63,7 @@ internal static CallTargetState CreateNamespaceProducerSpanForEvents "Even extractedContext = ExtractPropagatedContextFromMessaging(functionContext, "Properties", "PropertiesArray").MergeBaggageInto(Baggage.Current); break; - case "EventGrid" when tracer.CurrentTraceSettings.Settings.IsIntegrationEnabled(IntegrationId.AzureEventGrid, defaultValue: false): + case "EventGrid" when tracer.CurrentTraceSettings.Settings.IsIntegrationEnabled(IntegrationId.AzureEventGrid): { extractedContext = EventGridFunctionsCommon.CreateReceiveSpanContext(tracer, functionContext, entry.Key as string, Baggage.Current); break; diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Azure/AzureEventGridNamespacesTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Azure/AzureEventGridNamespacesTests.cs index 85a4dd8452b8..8a2081d15bb0 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Azure/AzureEventGridNamespacesTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Azure/AzureEventGridNamespacesTests.cs @@ -23,7 +23,6 @@ public class AzureEventGridNamespacesTests : TracingIntegrationTest public AzureEventGridNamespacesTests(ITestOutputHelper output) : base("AzureEventGridNamespaces", output) { - SetEnvironmentVariable("DD_TRACE_AZUREEVENTGRID_ENABLED", "true"); } public static IEnumerable GetEnabledConfig() diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Azure/AzureEventGridTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Azure/AzureEventGridTests.cs index 038759cf4898..90b446d63fe6 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Azure/AzureEventGridTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Azure/AzureEventGridTests.cs @@ -53,7 +53,6 @@ public class AzureEventGridTests : TracingIntegrationTest public AzureEventGridTests(ITestOutputHelper output) : base("AzureEventGrid", output) { - SetEnvironmentVariable("DD_TRACE_AZUREEVENTGRID_ENABLED", "true"); } public static IEnumerable GetEnabledConfig() diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AzureFunctionsMessagingTriggerTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AzureFunctionsMessagingTriggerTests.cs index 146aa156e1d6..42b93eb44e21 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AzureFunctionsMessagingTriggerTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AzureFunctionsMessagingTriggerTests.cs @@ -55,7 +55,6 @@ public AzureFunctionsMessagingTriggerTests(ITestOutputHelper output) SetEnvironmentVariable("EVENTHUBS_CONNECTION_STRING", GetEventHubsConnectionString()); SetEnvironmentVariable("EVENTGRID_TOPIC_ENDPOINT", GetEventGridTopicEndpoint()); SetEnvironmentVariable("EVENTGRID_TOPIC_KEY", "test-key"); - SetEnvironmentVariable("DD_TRACE_AZUREEVENTGRID_ENABLED", "true"); SetEnvironmentVariable("AzureWebJobsStorage", GetAzuriteConnectionString()); // Exclude the Event Grid emulator endpoint from HTTP client tracing to avoid an extra http.request span. SetEnvironmentVariable(