microsoft / microsoft/aspire

Add OpenTelemetry tracing instrumentation for SqlClient

Open
#2,427 9 comments 1 reaction 0 assignees View on GitHub
area-integrations sqlserver
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

SqlClient itself doesn't emit OpenTelemetry tracing, but an [instrumentation package](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Instrumentation.SqlClient/README.md) exists for that; this emits traces for each command executed.

Aspire.Microsoft.Data.SqlClient currently wires up [event counter-based metrics](https://github.com/dotnet/aspire/blob/main/src/Components/Aspire.Microsoft.Data.SqlClient/AspireSqlServerSqlClientExtensions.cs#L95), but does not wire up tracing - we should add that to get traces out-of-the-box.

/cc @AndriySvyryd

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.