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

EventSource startup initialization #106014

Merged
merged 2 commits into from
Aug 8, 2024
Merged

Commits on Aug 7, 2024

  1. EventSource startup initialization

    Fixes dotnet#105845
    
    Previously MetricsEventSource wasn't being created for apps that didn't ever create a Meter. This caused a chicken-and-egg problem for RuntimeMetrics which weren't created until MetricsEventSource started a tracing session. This change ensures that MetricsEventSource will be created on demand if ETW, EventPipe, or EventListener based tooling starts a tracing session. I took some extra effort to create the EventSource in a deferred fashion to avoid eager loading System.Diagnostics.DiagnosticSource.dll when it might never be needed.
    
    Aside from the fix there were some small improvements:
    - Moved NativeRuntimeEventSource to initialize in the same place as other startup EventSources
    - Removed a useless lock(EventListener.EventListenersLock) around EventPipe eventProvider registration
    noahfalk committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    85ff378 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. PR feedback

    noahfalk committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    daeb128 View commit details
    Browse the repository at this point in the history