otel_sqflite 0.1.0
otel_sqflite: ^0.1.0 copied to clipboard
OpenTelemetry instrumentation for `package:sqflite` / `sqflite_common`. Extensions on DatabaseExecutor wrapping query, insert, update, delete and rawQuery with `db.*` spans.
Changelog #
0.1.0 - 2026-08-10 #
Added #
- Extension methods on
DatabaseExecutor(covers bothDatabaseandTransaction):tracedQuery,tracedInsert,tracedUpdate,tracedDelete,tracedRawQuery,tracedExecute. Each opens a CLIENT span withdb.system.name=sqlite,db.collection.name=<table>,db.operation.name. Raw operations also recorddb.query.text. tracedSqfliteCall<R>— generic helper for testing or custom call sites.DatabaseException-aware error handling:error.typeis set toDatabaseExceptionfor known sqflite errors, otherwise to the runtime class name.- Zone-scoped suppression
(
runWithoutSqfliteInstrumentationand async variant). - 4 tests via the generic helper.