Add Azure.Data.AppConfiguration activity source to telemetry tracking #12120
+27
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration
package was only tracking telemetry from theMicrosoft.Extensions.Configuration.AzureAppConfiguration
activity source, which captures configuration refresh operations. However, it was not capturing traces from the underlying Azure SDK client library (Azure.Data.AppConfiguration
), which generates telemetry for the actual HTTP calls to Azure App Configuration service.This resulted in incomplete telemetry coverage, making it difficult to observe and debug the full request lifecycle when using Azure App Configuration.
Solution
Changed the
ActivitySourceName
constant to an arrays_activitySourceNames
that tracks both activity sources:Microsoft.Extensions.Configuration.AzureAppConfiguration
- Configuration provider operations (existing)Azure.Data.AppConfiguration
- Azure SDK client HTTP operations (newly added)Key changes:
ActivitySourceName
from aconst string
tostatic readonly string[]
nameds_activitySourceNames
(following repository naming conventions)"Azure.Data.AppConfiguration"
to the arrayAddSource(s_activitySourceNames)
This implementation follows the same pattern used in other Aspire Azure components (e.g.,
AzureComponent.cs
,EventHubsComponent.cs
) that track multiple activity sources.Testing
TracingRegistersMultipleActivitySources
to verify the functionalityWhen
DisableTracing
isfalse
, applications using Azure App Configuration will now see complete distributed traces covering both the configuration abstraction layer and the underlying Azure SDK network calls.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
aspiretests.azconfig.io
/home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests/Debug/net8.0/Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests --internal-msbuild-node /home/REDACTED/.local/share/c494fe4c30564071aae60128f951f72a/.p --filter-not-trait category=failing --filter-not-trait quarantined=true --filter-not-trait outerloop=true
(dns block)/usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests/Debug/net8.0/Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests/Debug/net8.0/Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests.deps.json /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests/Debug/net8.0/Microsoft.DotNet.RemoteExecutor.dll Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests, Version=42.42.42.42, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests.ConformanceTests <TracingEnablesTheRightActivitySource>b__21_0 /tmp/jfzsuplt.jds
(dns block)/home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests/Debug/net8.0/Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests --internal-msbuild-node /home/REDACTED/.local/share/de92182f4c684729a13f5f7ae9fab592/.p --filter-not-trait category=failing --filter-not-trait quarantined=true --filter-not-trait outerloop=true
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.