mirror of
https://github.com/simonw/datasette.git
synced 2026-09-05 08:04:15 +02:00
demos/otel/ shows the whole export path end to end with uv alone. The ~150 line otlp_receiver.py decodes the real OTLP/HTTP protobuf wire format and prints a summary on Ctrl-C; a Justfile wraps the receiver, an instrumented `datasette` under opentelemetry-instrument, a generated 200-row demo database, and Jaeger from its own binary. Jaeger and the receiver both listen on 4318, so the Datasette side is one identical `just serve` either way. Verified against this branch: startup plus one request against the demo table exports 93 spans with exactly two roots - the request span and datasette.startup - and in Jaeger the same run lands as two traces, 67 spans nested under `GET <route>` and 26 under startup. That "no orphans" shape is new since the earlier demo iteration: the per-request server span and the startup parent are in core now, so the old asgi_wrapper plugin and its "ignore the ~24 tiny traces" caveats are gone rather than ported. serve_forever() runs on a worker thread with the main thread waiting on an event, and SIGINT/SIGTERM are handled explicitly, because KeyboardInterrupt alone does not reliably reach the script through the `uv run` wrapper - the summary was silently never printed. The per-batch print flushes explicitly so live feedback survives a pipe. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012U7coQfVu8nK2R4q2mCULA |
||
|---|---|---|
| .. | ||
| apache-proxy | ||
| otel | ||
| plugins | ||