Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 17, 2025

Problem

The Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration package was only tracking telemetry from the Microsoft.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 array s_activitySourceNames that tracks both activity sources:

  1. Microsoft.Extensions.Configuration.AzureAppConfiguration - Configuration provider operations (existing)
  2. Azure.Data.AppConfiguration - Azure SDK client HTTP operations (newly added)

Key changes:

  • Converted ActivitySourceName from a const string to static readonly string[] named s_activitySourceNames (following repository naming conventions)
  • Added "Azure.Data.AppConfiguration" to the array
  • Updated the OpenTelemetry tracing registration to use the array: AddSource(s_activitySourceNames)
  • Added test coverage to verify OpenTelemetry configuration

This implementation follows the same pattern used in other Aspire Azure components (e.g., AzureComponent.cs, EventHubsComponent.cs) that track multiple activity sources.

Testing

  • All 35 existing tests pass
  • Added new test TracingRegistersMultipleActivitySources to verify the functionality
  • Azure Hosting tests continue to pass
  • No breaking changes to public API surface

When DisableTracing is false, 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
    • Triggering command: /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)
    • Triggering command: /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)
    • Triggering command: /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

The Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration package does not appear to be emitting the telemetry. It is possible that the ActivitySourceName in AspireAppConfigurationExtensions is incorrect.

Modify the implementation so that ActivitySourceName becomes an array called ActivitySourceNames and add the value Azure.Data.AppConfiguration to the list of activity sources that are tracked with DisableTracing is false.


💡 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.

@Copilot Copilot AI changed the title [WIP] Update ActivitySourceName to support multiple sources Add Azure.Data.AppConfiguration activity source to telemetry tracking Oct 17, 2025
@Copilot Copilot AI requested a review from mitchdenny October 17, 2025 10:21
Copilot finished work on behalf of mitchdenny October 17, 2025 10:21
Copy link
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12120

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12120"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants