Code issue on article about OpenTelemetry and Application Insights #42467
Labels
dotnet-fundamentals/svc
in-pr
This issue will be closed (fixed) by an active pull request.
Pri1
High priority, do before Pri2 and Pri3
⌚ Not Triaged
Not triaged
Type of issue
Code doesn't work
Description
There is a small issue in the article which prevents the sample code from working.
In step two the following code is added:
In step three it's recommended to add the following json to
appsettings.json
:Because of this
otel.UseAzureMonitor();
is never called.An easy fix would be to update code in step 2 as so:
or something similar.
Thank you!
Page URL
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/observability-applicationinsights
Content source URL
https://github.com/dotnet/docs/blob/main/docs/core/diagnostics/observability-applicationinsights.md
Document Version Independent Id
e14803f7-d5c7-657a-763c-680cf4197365
Article author
@tommcdon
Metadata
The text was updated successfully, but these errors were encountered: