feat(agent): OTel observability integration - #9596
Conversation
Add gateway shutdown and still-working observability signals, improve tool/subagent tracing hooks, and add focused OTel tests for span parenting and shutdown behavior. Made-with: Cursor
DemoShort walkthrough video of OTel tracing + stuck-run telemetry: |
Add Promtail config/service templates with optional setup automation, document Loki prerequisites, and update the Grafana observability dashboard. Made-with: Cursor
|
Are you still working on this? It looks great |
This was done for 0.8.0 version, and we are atleast 4 to 5 releases ahead, i did some testing long back. Currently I see there is going to be a plugin with langfuse. So not sure this will be helpful. I am anyway open to suggestions on how to take this forward. |
|
Amazing, i was searching the doc yesterday about OTEL |
|
Really excited to see this landing in core! 🙌 This would be a great complement to hermes-telemetry (https://github.com/nujovich/hermes-telemetry), a zero-infra observability plugin I built for the Hermes Challenge. Right now it captures tokens, cost, latency and budget enforcement via hooks, storing everything locally in SQLite — no extra services needed. If OTel lands in core, the natural next step would be wiring hermes-telemetry as an OTel exporter, so users can choose: lightweight slash-command visibility with Would love to coordinate once this merges. Great work! 🔥 |
|
Thank you for the substantial tracing, metrics, dashboard, and operational setup work. This is an automated hermes-sweeper review.
Please consider publishing the exporter and Grafana/collector assets as a standalone plugin repo, installable through Closed as not-planned per standing maintainer policy ( |
What does this PR do?
Adds OpenTelemetry observability integration in Hermes Agent, including runtime instrumentation hooks and Grafana/OTel config assets.
This enables trace and metrics visibility in Grafana/Tempo/Prometheus when OTel is enabled, while preserving default behavior when observability is not configured.
Related Issue
N/A
Type of Change
Changes Made
agent/otel_shim.pygateway/run.pycli.pyrun_agent.pyotel/grafana/hermes_observability_dashboard.jsonotel/otel-lgtm/otelcol-config.yamlREADME.mdHow to Test
OTEL_ENABLED=trueOTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318OTEL_EXPORTER_OTLP_PROTOCOL=http/protobufhermesand/or gateway), execute a prompt with tool activity, and verify:otel/grafana/hermes_observability_dashboard.jsonChecklist
Code
pytest tests/ -qand all tests passDocumentation & Housekeeping
cli-config.yaml.exampleif needed — or N/ACONTRIBUTING.md/AGENTS.mdif needed — or N/AScreenshots / Logs
Logs when OTEL is enabled

Grafana Dashboard Screens

Drill down into the Traces
