[CSHARP-3124] Support Activity and DiagnosticsSource Created: 02/Jun/20  Updated: 31/Mar/22

Status: Backlog
Project: C# Driver
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Jimmy Bogard Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: rp-toSched
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DRIVERS-719 Client Side Support for OpenTelemetry Defining Requirements
Backwards Compatibility: Fully Compatible

 Description   

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



 Comments   
Comment by Jimmy Bogard [ 08/Jun/20 ]

Here ya go:

https://github.com/jbogard/MongoDB.Driver.Core.Extensions.DiagnosticSources/blob/master/src/MongoDB.Driver.Core.Extensions.DiagnosticSources/DiagnosticsActivityEventSubscriber.cs

I moved to an individual repository.

Comment by Esha Bhargava [ 08/Jun/20 ]

jimmy.bogard@gmail.com The link to your POC returns a 404 status. Can you provide an updated link?

Generated at Wed Feb 07 21:44:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.