Skip to main content

Module rusqlite

Module rusqlite 

Source
Expand description

rusqlite: a span and db.client.operation.duration for every statement a connection runs.

It uses SQLite’s own trace hooks, so nothing about how the program calls rusqlite changes. SQLite reports when a statement starts running and when it finishes, with its duration; the span runs between the two, and the metric records SQLite’s duration.

SQLite’s hooks don’t say whether a statement failed, so these spans and measurements carry no error.type. The program’s own error handling sees failures as before.

Functions§

instrument
Record a client span and db.client.operation.duration for every statement connection runs, named by its query summary (SELECT users), with db.system.name sqlite and, unless turned off with record_query_text, its text with literals replaced.