v1.18.0
This release adds first-class OpenTelemetry tracing support to Hayhooks, with end-to-end visibility across REST, OpenAI-compatible endpoints, and MCP operations.
Install tracing support with:
pip install "hayhooks[tracing]"✨ OpenTelemetry Tracing Support
Hayhooks now emits structured tracing spans for key lifecycle and runtime actions, including:
- Pipeline deploy / prepare / commit / startup deploy / undeploy
- Pipeline run endpoint (
/<pipeline>/run) - OpenAI-compatible execution (
/chat/completions,/responses) and file uploads - MCP actions (
list_tools,call_tool, and pipeline-as-tool execution)
Streaming responses are traced with stream-aware metadata, and failures are tagged consistently for easier diagnosis.
⚙️ Configuration and Bootstrap
Tracing uses standard OpenTelemetry configuration (OTEL_* environment variables), plus one Hayhooks-specific tuning option:
HAYHOOKS_TRACING_EXCLUDED_SPANS(default:["send", "receive"]) to reduce low-level ASGI span noise in streaming scenarios.
Hayhooks also attempts OTLP auto-bootstrap at startup when:
OTEL_EXPORTER_OTLP_ENDPOINTorOTEL_EXPORTER_OTLP_TRACES_ENDPOINTis set- Protocol is supported via
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL/OTEL_EXPORTER_OTLP_PROTOCOL
📈 Log Correlation Improvements
When tracing is enabled, logs now include normalized trace_id and span_id context (alongside existing request_id) to simplify correlation between logs and traces.
📚 Documentation
- Added a new tracing reference page
- Expanded environment-variable docs with OpenTelemetry guidance
- Added tracing notes in installation, logging, MCP docs, and README
What's Changed
- Add tracing support to Hayhooks by @mpangrazzi in #236
Full Changelog: v1.17.0...v1.18.0