forked from elastic/apm-agent-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure ETW session is deleted when GcMetricsProvider is disposed
This commit fixes a bug in collecting GC Metrics on .NET Framework where the underlying ETW session created by TraceEventSession was not stopped and deleted when GcMetricsProvider was disposed. The issue arises due to the using around _traceEventSession in the GcMetricsProvider's ctor, and the Task.Run() inside it, which leaves the session in a running state that can't be deleted on disposing the GcMetricsProvider. An internal TraceEventSession name property exposes the name of the session to allow tests to assert that the session is deleted on dispose. Fixes elastic#897
- Loading branch information
Showing
2 changed files
with
96 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters