Documentation forSolarWinds Observability

Go trace context in queries

Adding trace context to application queries provides the ability to correlate the queries from a traced transaction, and if sampled, the queries to the transaction trace detail.

Trace context can be included automatically using the XSAM/otelsql package. See its usage section on the WithSQLCommenter feature and the example in apm-go/examples/http at main · solarwinds/apm-go.