Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecated TelemetryConfiguration.Active in App Insights Publisher #365

Merged
merged 2 commits into from
Dec 16, 2019

Conversation

CarlosLanderas
Copy link
Contributor

Fixes #348

Application Insights publisher no longer relies in static TelemetryConfiguration.Active

The TelemetryKey should be configured using the healthcheck parameter:

         services
           .AddHealthChecks()
           .AddApplicationInsightsPublisher("telemetrykey");

Or by using

 services.AddApplicationInsightsTelemetry()

that uses IConfiguration ApplicationInsights section.

https://github.com/microsoft/ApplicationInsights-aspnetcore/blob/205bcd90fa70b5afc3f8dd967035bac7b06c00ef/src/Microsoft.ApplicationInsights.AspNetCore/Extensions/ApplicationInsightsExtensions.cs#L163

@CarlosLanderas CarlosLanderas merged commit 6e7be01 into master Dec 16, 2019
@CarlosLanderas CarlosLanderas deleted the telemetryconfiguraton-active-deprecated branch April 17, 2020 17:14
@sungam3r sungam3r mentioned this pull request Jul 30, 2023
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.

HealthChecks.Publisher.ApplicationInsights: TelemetryConfiguration.Active is deprecated
1 participant