-
Type: Task
-
Resolution: Duplicate
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Feature Request
-
None
-
Dotnet Drivers
Description:
The goal is the have possibility to instrument MongoDB.Client simply by calling AddSource("MongoDB.Driver") on OpenTelemetry API. There should be not need to include any additional library/call any additional MongoDB, specific method.
using var tracerProvider = Sdk.CreateTracerProviderBuilder() .AddSource("MongoDB.Driver") // or other chosen during implementation .AddConsoleExporter() .Build();
Required changes:
New reference to System.Diagnostics.DiagnosticSource will be needed to achieve this. OpenTelemetry Under the hood relays on ActivitySource.
Traces/spans should be implemented according to semantic convention.
Current state:
There is a possibility to do similar things by using MongoDB.Driver.Core.Extensions.DiagnosticSources nuget package. However it is against best practices/recommendation and force end-users to utilize additional package.
- duplicates
-
CSHARP-3124 Support Activity and DiagnosticsSource
- Backlog