Skip to content

Azure App Insights broken when using ServiceDefaults #4687

Answered by samsp-msft
natelaff asked this question in Q&A
Discussion options

You must be logged in to vote

It looks like you are mixing the classic Application Insights SDK and OpenTelemetry. Aspire is built using OpenTelemetry and the OTel based exporters to AzureMonitor/Application Insights. The call to ServiceDefaults is setting up OpenTelemetry.

To use Application Insights with Aspire, please use either Azure Monitor Distro or Azure monitor exporter. The former is a wrapper around the latter that provides good defaults and extensions to provide the best experience.

https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-enable?tabs=aspnetcore#enable-azure-monitor-opentelemetry-for-net-nodejs-python-and-java-applications
https://learn.microsoft.com/en-us/dotnet/aspire/deploy…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by davidfowl
Comment options

You must be logged in to vote
1 reply
@davidfowl
Comment options

Comment options

You must be logged in to vote
1 reply
@davidfowl
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants
Converted from issue

This discussion was converted from issue #4378 on June 26, 2024 22:46.