Expand description
Lightweight SQLx wrapper that emits OpenTelemetry-native spans and metrics
following the database client semantic conventions.
Structs§
- Annotated
- A shared-reference annotation wrapper that carries per-query attributes alongside a
borrowed executor. Returned by
Pool::with_annotationsandPool::with_operation. - Annotated
Mut - A mutable-reference annotation wrapper that carries per-query attributes alongside a
mutably borrowed executor. Returned by
PoolConnection::with_annotations,Transaction::with_annotations, and theirwith_operationshorthands. - Pool
- An instrumented wrapper around
sqlx::Poolthat emits OpenTelemetry spans and metrics for every database operation. - Pool
Builder - Builder for constructing an instrumented
Poolfrom a rawsqlx::Pool. - Pool
Connection - A pooled connection instrumented for OpenTelemetry.
- Query
Annotations - Per-query annotation values that enrich OpenTelemetry spans with semantic convention attributes the library cannot derive automatically (because it does not parse SQL).
- Transaction
- An in-progress database transaction instrumented for OpenTelemetry.
Enums§
- Query
Text Mode - Controls whether and how
db.query.textis captured on spans.
Traits§
- Database
- Per-backend contract providing the database system name and a method to extract connection-level attributes from the backend’s connect options.