modulepackage
0.2.1
Repository: https://github.com/simplesurance/sqltracing.git
Documentation: pkg.go.dev
# README
sqltracing
sqltracing is a Go package for tracing database operations via an OpenTracing
tracer.
It can wrap any driver.Driver
compatible SQL driver.
It is implemented as an interceptor for simplesurance/sqlmw.
Documentation
Example
See example_test.go
Known Issues
- Transactions: all operations on transactions except
Commit()
andRollback()
are recorded as independent spans, instead of as child spans of theBeginTx()
operation
Credits
sqltracing and simplesurance/sqlmw are based heavily on forks and the ideas of the following projects:
# Packages
No description provided by the author
# Functions
NewInterceptor returns a new interceptor that records traces for database operations.
WithOpsExcluded can be passed when creating an Interceptor.
WrapDriver returns a driver that wraps the passed driver and records traces for it's operations.
# Constants
DBStatementTagKey is the name of the tracing that contains db query statements.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
Defines the names of SQL operations.
# Structs
Interceptor records traces for database operations.