metrics recorder; your application supplies and configures the OpenTelemetry SDK.
This page covers LanceDB OSS. LanceDB Enterprise clusters emit their own Prometheus/OpenTelemetry metrics from the server side — see the Enterprise overview for that flow.
What you get
Once instrumented, LanceDB registers one observable instrument per metric on yourMeterProvider. The current catalog covers the object store layer:
| Metric | Kind | Description |
|---|---|---|
lance_object_store_requests_total | Counter | Total object store requests, labelled by operation and base (store scheme). |
lance_object_store_request_duration_seconds | Histogram | Request latency in seconds. |
lance_object_store_bytes_transferred_total | Counter | Bytes read from or written to the store. |
lance_object_store_retryable_responses_total | Counter | Requests that returned a retryable error (throttles, transient failures). |
lance_object_store_in_flight_requests | Gauge | Currently outstanding object store requests. |
MetricReader collects on its own schedule, so there is no hot-path overhead beyond the atomic aggregation that LanceDB does anyway.
Histograms are exported Prometheus-style. OpenTelemetry has no asynchronous histogram instrument, so each histogram surfaces as three observable counters:
<name>_bucket (with an le attribute per bucket boundary, including +Inf), <name>_count, and <name>_sum. Only _sum carries the histogram’s unit; _bucket and _count are cumulative sample counts.Python
Install LanceDB with theotel extra to pull in the OpenTelemetry API, plus an OpenTelemetry SDK of your choice. The SDK is intentionally not bundled — you configure it, its readers, and its exporters however your platform expects.
instrument_lancedb_metrics() once at startup, before opening any tables. It returns True when the recorder is installed and instruments are registered.
Python
meter_provider, LanceDB uses the global provider returned by opentelemetry.metrics.get_meter_provider().
TypeScript
The Node SDK depends on@opentelemetry/api directly, so no extra install step is needed to expose the entry point. You still need an OpenTelemetry SDK to actually export.
TypeScript
instrumentLanceDbMetrics() also accepts no arguments, in which case it uses the global provider from @opentelemetry/api. Calling it more than once is safe: instruments are created only on the first successful call.
What to watch
A few starting points for dashboards and alerts:- Request rate by operation —
rate(lance_object_store_requests_total[1m])broken down byoperationshows read vs. write pressure and helps size ingestion vs. serving traffic separately. - Tail latency — histogram quantiles over
lance_object_store_request_duration_seconds_bucketcatch object store slowdowns before they surface as query timeouts. - Retryable responses — a rising
lance_object_store_retryable_responses_totaltypically means you are being throttled and should back off or shard writes. - In-flight requests — a growing
lance_object_store_in_flight_requestsgauge without a matching rise in throughput indicates queueing.
Where to go next
Performance tips
Tune ingestion, indexing, and query patterns once metrics highlight a hot spot.
Storage configuration
Configure the object store backends whose requests these metrics measure.