pub trait Observer:
Send
+ Sync
+ 'static {
// Provided method
fn transaction_begun(&self, waited: Duration) { ... }
}Expand description
What a host wants to be told about. Every method has a default that ignores the measurement, so an observer names only what it records, and a measurement added here later breaks no host’s build.
Provided Methods§
Sourcefn transaction_begun(&self, waited: Duration)
fn transaction_begun(&self, waited: Duration)
How long a request waited for a transaction to begin: a connection
from the pool, and the BEGIN sent on it. Mostly the pool – BEGIN
is one round trip – so a wait that grows is a pool that is too small
for the load, or a database that is slow to hand connections back.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".