otel_cloud_firestore 0.3.0 copy "otel_cloud_firestore: ^0.3.0" to clipboard
otel_cloud_firestore: ^0.3.0 copied to clipboard

OpenTelemetry instrumentation for `package:cloud_firestore`. Extensions on DocumentReference, CollectionReference and Query wrap reads, writes and listens in `db.*` semconv spans.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.3.0 - 2026-10-11 #

Changed #

  • Requires dartastic_opentelemetry_api >=1.0.0-rc.4 <1.0.0-rc.5.
  • Breaking: depends on dartastic_opentelemetry_api only, no longer on the SDK. The application chooses and initializes the OpenTelemetry SDK. Parameters and fields typed with SDK classes now use the API types (APITracer, APISpan, APILogger, ...); SDK instances are still accepted wherever an API type is expected.

0.2.0 - 2026-08-08 #

Changed #

  • Semantic conventions updated to the current OTel registry: deprecated attribute keys are no longer emitted (db.system -> db.system.name, db.operation -> db.operation.name).
  • Dependency floors raised to dartastic_opentelemetry ^1.1.0-beta.12 and dartastic_opentelemetry_api ^1.0.0-rc.1. The previous floors declared compatibility with API versions that predate the semconv enums this package uses and could not actually resolve-and-compile.
  • cloud_firestore raised to ^6.0.0 (current major); fake_cloud_firestore dev dependency to ^4.0.0 to match.
  • repository URL corrected to the canonical Dartastic org casing so pub.dev repository verification succeeds.

Added #

  • Extension methods on DocumentReference: tracedGet, tracedSet, tracedUpdate, tracedDelete, tracedSnapshots. Each opens a CLIENT span named firestore <op> <collection>/<doc> with db.system.name=firestore and db.firestore.collection / db.firestore.document attributes.
  • Extension method on CollectionReference: tracedAdd.
  • Extension methods on Query: tracedGet, tracedSnapshots. tracedGet adds db.response.returned_rows for the snapshot size.
  • Top-level tracedFirestoreTransaction — wraps FirebaseFirestore.runTransaction with an attempt counter surfaced as db.firestore.transaction.attempt.
  • Top-level tracedFirestoreBatchCommit — wraps WriteBatch.commit and records db.firestore.batch.size when supplied.
  • runWithoutFirestoreInstrumentation / runWithoutFirestoreInstrumentationAsync — zone-scoped suppression helpers, mirroring the pattern used by otel_grpc, otel_http, and otel_web_socket_channel. Preemptive: Firestore is a plausible (if unconventional) log sink in some deployments.
  • FirestoreSemantics — typed attribute-key enum holding the Firestore-specific db.firestore.* keys until the upstream semconv Database enum picks them up.
  • Tests use fake_cloud_firestore; no live Firebase required. Coverage: doc set+get, collection add, query get with returned_rows, update + delete, exception path, suppression scope, transaction (with attempt counter), batch commit (with size).
0
likes
160
points
101
downloads

Documentation

API reference

Publisher

verified publisherdartastic.io

Weekly Downloads

OpenTelemetry instrumentation for `package:cloud_firestore`. Extensions on DocumentReference, CollectionReference and Query wrap reads, writes and listens in `db.*` semconv spans.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

cloud_firestore, dartastic_opentelemetry_api, flutter

More

Packages that depend on otel_cloud_firestore