https://github.com/simplesurance/sqltracing
Go SQL-Driver wrapper to trace operations via OpenTracing
https://github.com/simplesurance/sqltracing
database go golang jaeger opentracing sql
Last synced: about 2 months ago
JSON representation
Go SQL-Driver wrapper to trace operations via OpenTracing
- Host: GitHub
- URL: https://github.com/simplesurance/sqltracing
- Owner: simplesurance
- License: mit
- Created: 2021-08-04T13:32:30.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-11-26T16:07:54.000Z (over 4 years ago)
- Last Synced: 2026-05-02T01:34:58.371Z (about 2 months ago)
- Topics: database, go, golang, jaeger, opentracing, sql
- Language: Go
- Homepage:
- Size: 216 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sqltracing

[](https://goreportcard.com/report/github.com/simplesurance/sqltracing)
[](https://pkg.go.dev/github.com/simplesurance/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](https://github.com/simplesurance/sqlmw).
## Documentation
[Go Package Documentation](https://pkg.go.dev/github.com/simplesurance/sqltracing)
### Example
See [example_test.go](example_test.go)
## Known Issues
- Transactions: all operations on transactions except `Commit()` and
`Rollback()` are recorded as independent spans, instead of as child spans of
the `BeginTx()` operation
## Credits
sqltracing and simplesurance/sqlmw are based heavily on forks and the ideas of
the following projects:
- [ngrok/sqlmw](https://github.com/ngrok/sqlmw)
- [luna-duclos/instrumentedsql](https://github.com/luna-duclos/instrumentedsql)
- [ExpansiveWorlds/instrumentedsql](https://github.com/ExpansiveWorlds/instrumentedsql)