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

Refactor AspNetCore and WorkerService use of Heartbeat (DiagnosticTelemetryModule) #1954

Closed
TimothyMothra opened this issue Jul 7, 2020 · 0 comments
Milestone

Comments

@TimothyMothra
Copy link
Member

TimothyMothra commented Jul 7, 2020

Currently, AspNetCore uses DependencyInjection for configuration for all components except the DiagnosticTelemetryModule which still depends on TelemetryConfiguration.Active.
This dependency is because of the Heartbeat feature.
The other TelemetryModules (AppServicesHeartbeatTelemetryModule and AzureInstanceMetadataTelemetryModule) don't do any real work and use .Active to apply their settings to the Heartbeat manager in the DiagnosticTelemetryModule.
In order to remove AspNetCore's dependency on .Active, the internal configuration will need to correctly configure these Modules using DI.

IMPORTANT: We've been recommending customers use DI to manually configure Heartbeat and DiagnosticTelemetryModule.

services.AddSingleton<ITelemetryModule>(new DiagnosticTelemetryModule());

We will continue to support this scenario.

The end goal is to support Heartbeat in all supported app models: Asp.Net, Asp.Net Core, and Worker-Service.

@TimothyMothra TimothyMothra changed the title Refactor AspNetCore use of Heartbeat Refactor AspNetCore use of Heartbeat (DiagnosticTelemetryModule) Jul 7, 2020
@TimothyMothra TimothyMothra changed the title Refactor AspNetCore use of Heartbeat (DiagnosticTelemetryModule) Refactor AspNetCore and WorkerService use of Heartbeat (DiagnosticTelemetryModule) Jul 7, 2020
@TimothyMothra TimothyMothra added this to the 2.15 milestone Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant