otel_hive 0.1.0-beta.1
otel_hive: ^0.1.0-beta.1 copied to clipboard
OpenTelemetry instrumentation for `package:hive` and `package:hive_ce`. Extension methods on Box that wrap put/get/delete/ clear with `db.system=hive` semconv spans.
dartastic_hive_otel #
OpenTelemetry instrumentation for
package:hive.
final box = await Hive.openBox<dynamic>('users');
await box.tracedPut('alice', {'name': 'Alice'});
await box.tracedDelete('bob');
await box.tracedPutAll({'k1': 'v1', 'k2': 'v2'});
await box.tracedClear();
Each call emits a CLIENT span:
- name:
hive put users/alice db.system = hive,db.system.name = hivedb.collection.name = users,db.operation = putdb.hive.key = alice(omitted on operations without a key)
Synchronous reads (get, values, length, containsKey) are
not wrapped — wrapping every sync read would generate a flood
of spans for minimal observability value.
Suppression: runWithoutHiveInstrumentationAsync.
License #
Apache 2.0