Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3124

Support Activity and DiagnosticsSource

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Diagnostics
    • Labels:
    • Fully Compatible

      The current diagnostics support include performance counters and trace source. .NET Core has moved towards the Activity and DiagnosticSource APIs to provide robust diagnostics and tracing. See:

      https://github.com/dotnet/diagnostics/blob/master/documentation/diagnostics-planing.md

      https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md

      https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/DiagnosticSourceUsersGuide.md

      https://devblogs.microsoft.com/aspnet/observability-asp-net-core-apps/

      Would this team consider a PR that added a new event subscriber that conforms to these guidelines and enables Activity and DiagnosticListener-based tracing? This would then enable a number of scenarios, including plugging into Activity-based observability tools.

      I have a small PoC as an example of what the code looks like:

      https://github.com/jbogard/nsb-diagnostics-poc/blob/master/MongoDB.Driver.Core.Extensions.SystemDiagnostics/DiagnosticsActivityEventSubscriber.cs

            Assignee:
            Unassigned Unassigned
            Reporter:
            jimmy.bogard@gmail.com Jimmy Bogard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: