Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aybabtme/otsql


https://github.com/aybabtme/otsql

Last synced: about 1 month ago
JSON representation

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.Tracer

db, 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.