Skip to content

v1.9.0: Opt-in OpenTelemetry traces, metrics and logs

Choose a tag to compare

@ZmeiGorynych ZmeiGorynych released this 19 Nov 12:23

SLayer 1.9.0

SLayer can now send traces, metrics and logs to any OpenTelemetry backend.

OpenTelemetry, opt-in

Install the otel extra (pip install 'motley-slayer[otel]', also part of all), set SLAYER_OTEL=on and point the standard OTEL_EXPORTER_OTLP_ENDPOINT at your backend. Every slayer command then reports its work: a span per request from REST, MCP, Flight SQL, the Postgres facade or the CLI, with each query's phases, database calls and ingest runs inside it, plus duration and retry metrics and SLayer's own log records linked to their traces. It works with the OpenTelemetry Collector, SigNoz, Grafana, OpenObserve, Honeycomb and any other OTLP/HTTP backend. If you already run under opentelemetry-instrument, SLayer uses its providers; in your own Python code, call slayer.otel.instrument().

It is off by default, and the base install gains no dependency. SLayer sends no SQL text, filter values, row data or error messages unless you also set SLAYER_OTEL_CAPTURE_CONTENT=on.

Two new commands help with setup: slayer otel status shows what SLayer will send and where, and slayer otel test checks that your backend accepts it. See the OpenTelemetry page in the docs and the ready-to-run examples/otel.

Ingest reports key metadata fills

A re-ingest that only fills in key metadata, such as a primary key or a join's cardinality, now reports it (+key metadata) instead of looking like nothing changed.