internal void StartDiagnosticObserversInternal() { DiagnosticManager?.Stop(); var observers = new List <DiagnosticObserver>(); #if NETSTANDARD if (Settings.IsIntegrationEnabled(AspNetCoreDiagnosticObserver.IntegrationName)) { Log.Debug("Adding AspNetCoreDiagnosticObserver"); var aspNetCoreDiagnosticOptions = new AspNetCoreDiagnosticOptions(); observers.Add(new AspNetCoreDiagnosticObserver(this, aspNetCoreDiagnosticOptions)); } #endif if (observers.Count == 0) { Log.Debug("DiagnosticManager not started, zero observers added."); } else { Log.Debug("Starting DiagnosticManager with {0} observers.", observers.Count); var diagnosticManager = new DiagnosticManager(observers); diagnosticManager.Start(); DiagnosticManager = diagnosticManager; } }
public Task StopAsync(CancellationToken cancellationToken) { _diagnosticsManager.Stop(); Status = HostedServiceStatus.Stopped; return(Task.CompletedTask); }
public Task StopAsync(CancellationToken cancellationToken) { _diagnosticManager.Stop(); return(Task.CompletedTask); }