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 edc8933fdeb5..ebff6426f9a7 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 c8627f423070..9be042125625 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridCommon.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/EventGrid/EventGridCommon.cs @@ -66,7 +66,7 @@ internal static CallTargetState CreateNamespaceProducerSpanForEvents - tracer.CurrentTraceSettings.Settings.IsIntegrationEnabled(IntegrationId.AzureEventGrid, defaultValue: false); + tracer.CurrentTraceSettings.Settings.IsIntegrationEnabled(IntegrationId.AzureEventGrid); private static CallTargetState CreateProducerSpan(Tracer tracer, string? host, int port, ref TEvents events, bool injectContext) { diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/Functions/AzureFunctionsCommon.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/Functions/AzureFunctionsCommon.cs index 8f71dfc9486f..ab6f9b0770ac 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/Functions/AzureFunctionsCommon.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/Functions/AzureFunctionsCommon.cs @@ -333,7 +333,7 @@ _ when type.Equals("entityTrigger", StringComparison.OrdinalIgnoreCase) => Durab 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/AutoInstrumentation/Azure/AzureEventGridNamespacesTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AutoInstrumentation/Azure/AzureEventGridNamespacesTests.cs index 65caeb640c92..564ef1474eb5 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AutoInstrumentation/Azure/AzureEventGridNamespacesTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AutoInstrumentation/Azure/AzureEventGridNamespacesTests.cs @@ -26,7 +26,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/AutoInstrumentation/Azure/AzureEventGridTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AutoInstrumentation/Azure/AzureEventGridTests.cs index 49f82e00e30c..ae2b77a15098 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AutoInstrumentation/Azure/AzureEventGridTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AutoInstrumentation/Azure/AzureEventGridTests.cs @@ -33,7 +33,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/Serverless/Azure/AzureFunctionsMessagingTriggerTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Serverless/Azure/AzureFunctionsMessagingTriggerTests.cs index af969feda3b3..e4ba229911e6 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Serverless/Azure/AzureFunctionsMessagingTriggerTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Serverless/Azure/AzureFunctionsMessagingTriggerTests.cs @@ -62,7 +62,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(