macro_rules! instrument {
($name:expr, $statement:expr, $attributes:expr) => { ... };
}Expand description
Macro to create a tracing span for a SQLx operation with OpenTelemetry-compatible fields.
$name: The operation name (e.g., “sqlx.execute”).$statement: The SQL statement being executed.$attributes: Connection or pool attributes for peer and db context.
This macro is used internally by the crate to instrument all major SQLx operations.