Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aybabtme/otsql
https://github.com/aybabtme/otsql
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/aybabtme/otsql
- Owner: aybabtme
- License: mit
- Created: 2020-09-24T06:48:52.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-09-24T07:10:22.000Z (about 4 years ago)
- Last Synced: 2024-06-20T13:54:03.727Z (5 months ago)
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# otsql
OpenTelemetry *tracing* integration for the `database/sql` package.
## Usage
If using `github.com/lib/pq`:
```go
var tracer trace.Tracerdb, err := sql.Open(otsql.WrapDriver("postgres", &pq.Driver{}, tracer), dsn)
if err != nil {
return errors.Wrap(err, "opening DB")
}
```Same thing for any other SQL library (MySQL or wtv).
## License
MIT.
## Credits
Pretty much copy-pasta from `github.com/ExpansiveWorlds/instrumentedsql`, which is also MIT licensed.