Registry / observability / xsam-otelsql

xsam-otelsql

JSON →
library0.42.0gogounverified

Package otelsql instruments the database/sql package.

go get github.com/XSAM/otelsql
INSTALL
IMPORT
SIG · XSAM-OTELSQL
X
xsam-otelsql
observabilitygov0.42.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

otelsql
github.com/XSAM/otelsql

Wraps a database/sql connection with OpenTelemetry instrumentation.

package main import ( "database/sql" "github.com/XSAM/otelsql" "go.opentelemetry.io/otel" ) func main() { db, _ := sql.Open("mysql", "user:pass@/dbname") db = otelsql.OpenDB("mysql", "user:pass@/dbname", otelsql.WithTracerProvider(otel.GetTracerProvider())) defer db.Close() }
Debug
Known issues
gotchaRequires an OpenTelemetry SDK to be configured for tracing to work.
fix
Ensure you have imported and configured an OTel exporter and provider.
affects: >=0.1.0
Upgrade
Version history
0.42.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
50 hits · last 30 days
node
42
Amazon
1
OpenAI (training)
1
Resources