Area(s)
area:db
What's missing?
At work, I've noticed a lack of service correlation between our application and SQL Server, such as passing the current service name, trace ID, and span ID to the database. Implementing this feature would greatly enhance our ability to trace application behaviors.
Describe the solution you'd like
Introducing an option to enable instrumentation libraries to propagate context information to databases.
Using SQL Server as an example, we can implement a ContextPropagationLevel flag with three possible values:
disabled: Disable context propagation, default value.
service: Passing the current service.name to the database when executing queries.
trace: Passing the current service.name, trace ID and span ID to the database when executing queries.
For an example of the trace level implementation in SQL Server, see the following PR: open-telemetry/opentelemetry-dotnet-contrib#2709
If you agree with this proposal, I'm willing to create an initial specification for SQL Server. Thank you!
Area(s)
area:db
What's missing?
At work, I've noticed a lack of service correlation between our application and SQL Server, such as passing the current
service name,trace ID, andspan IDto the database. Implementing this feature would greatly enhance our ability to trace application behaviors.Describe the solution you'd like
Introducing an option to enable instrumentation libraries to propagate context information to databases.
Using SQL Server as an example, we can implement a
ContextPropagationLevelflag with three possible values:disabled: Disable context propagation, default value.service: Passing the currentservice.nameto the database when executing queries.trace: Passing the currentservice.name,trace IDandspan IDto the database when executing queries.For an example of the
tracelevel implementation in SQL Server, see the following PR: open-telemetry/opentelemetry-dotnet-contrib#2709If you agree with this proposal, I'm willing to create an initial specification for SQL Server. Thank you!