dotnet / dotnet/SqlClient

Feature | Emit OpenTelemetry metrics

Open
#2,211 12 comments 22 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
989
Forks
340
Avg merge
4d 18h
Merged PRs (30d)
69

Description

OpenTelemetry has become the de-facto standard for distributed, cross-platform tracing; it is being rapidly adopted both inside the .NET ecosystem and outside. OTel defines semantic conventions for how a database client emits metrics, which are aggregated, numeric counters about the state and performance of the driver (e.g. number of commands executed, idle/busy connections in the pool, etc.). [these specifications](https://opentelemetry.io/docs/specs/semconv/database/database-metrics/) are currently in experimental state, but stabilization is likely start happening soon.

Note that unlike with [tracing](https://github.com/dotnet/SqlClient/issues/2210), AFAIK there's no way to get data like this out of SqlClient at the moment. This sort of data can be invaluable in diagnosing performance problems (e.g. by inspecting real-time connection pool state) and tracking what's going on.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.