Skip to content

v1.18.0

Choose a tag to compare

@mpangrazzi mpangrazzi released this 24 Apr 11:38
c0ca81a

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_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT is 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


What's Changed

Full Changelog: v1.17.0...v1.18.0