otel_hive 0.2.0 copy "otel_hive: ^0.2.0" to clipboard
otel_hive: ^0.2.0 copied to clipboard

OpenTelemetry instrumentation for `package:hive`. Box extension methods that wrap put/putAll/delete/clear/compact in `db.system.name=hive` semconv CLIENT spans.

otel_hive #

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.name = hive
  • db.collection.name = users, db.operation.name = put
  • db.hive.key = alice (omitted on operations without a key)
  • db.operation.batch.size on tracedPutAll

Synchronous reads (get, values, length, containsKey) are not wrapped — wrapping every sync read would generate a flood of spans for minimal observability value.

Using hive_ce? The Box extension targets package:hive, but the generic tracedHiveCall helper wraps any call site.

Suppression: runWithoutHiveInstrumentationAsync.

License #

Apache 2.0

0
likes
160
points
73
downloads

Documentation

API reference

Publisher

verified publisherdartastic.io

Weekly Downloads

OpenTelemetry instrumentation for `package:hive`. Box extension methods that wrap put/putAll/delete/clear/compact in `db.system.name=hive` semconv CLIENT spans.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

dartastic_opentelemetry, dartastic_opentelemetry_api, hive

More

Packages that depend on otel_hive