Are there any observability auth connectors to Ope...
# questions
t
Are there any observability auth connectors to OpenHands in case there was a conversation that I was looking for that is not shown on the left panel? I would like to view what is happening in the backend
Would like to follow up on this if anyone has been able to connect OpenHands to Prometheus and Grafana or implemented the built-in metrics from OpenHands?
l
t
thank you, I will.
I checked it out, and I am using the agent-canvas on Docker. Can I still use this tracing and observability tool even though it is described from an SDK perspective?
c
@nutritious-balloon-65098 clone yourself all agent-canvas, agent-sdk and docs/ repos from openhands org. Look at how agent-canvas uses the sdk in docker. Understand what is missing from docs, and open a PR with it. Also answer Beryl’s question how to use it here.
🙌 1
n
I'm on it! can track my progress here.
l
(I think if you just set the appropriate environment variable it should work)
nod 1
c
I think you should be right… Let's see what the agent comes up with, maybe just a sentence could be added to docs?
t
Yh maybe, because I set up the environment variables with Prometheus and Jaeger, but I am guessing that was the wrong way to go about things.
I also looked at connecting it to grafana but could not visualize anything
n
Done. Opened PR: github.com/OpenHands/docs/pull/608 What I did: • Cloned: ◦
/workspace/repos/agent-canvas
◦
/workspace/repos/software-agent-sdk
◦
/workspace/repos/docs
• Confirmed Agent Canvas Docker is built on top of
<http://ghcr.io/openhands/agent-server|ghcr.io/openhands/agent-server>
, and its entrypoint starts
openhands-agent-server
, so SDK observability env vars are inherited by the backend process. • Added docs for the missing Agent Canvas Docker observability path: ◦
openhands/usage/agent-canvas/backend-setup/docker.mdx
◦
openhands/usage/agent-canvas/setup.mdx
◦
sdk/guides/observability.mdx
• Committed and pushed: ◦ commit:
8e8f3c1a docs: add Agent Canvas Docker observability guidance
◦ branch:
docs/agent-canvas-docker-observability
Validation: •
git diff --check
passed •
uv run --with pytest --with requests --with pyyaml pytest -q tests/ -k 'not pricing'
passed: 30 passed, 6 deselected • Full suite currently has an unrelated pricing-doc test error because
<https://raw.githubusercontent.com/OpenHands/OpenHands/main/openhands/utils/llm.py>
returns 404. Slack-ready answer for Beryl:
Yes — even though the observability docs are written from the SDK perspective, they also apply to Agent Canvas when you run it with Docker. The Agent Canvas Docker image starts the OpenHands Agent Server inside the container, and that server uses the OpenHands SDK, so you enable tracing by passing the same
LMNR_*
or
OTEL_*
environment variables to the container.
For Laminar:
```docker run -it --rm \
-p 8000:8000 \
-e LMNR_PROJECT_API_KEY="your-laminar-api-key" \
-v ~/.openhands:/home/openhands/.openhands \
-v ~/projects:/projects \
ghcr.io/openhands/agent-canvas:latest```
For an OTLP backend such as Jaeger, Tempo, Honeycomb, Datadog, or New Relic:
```docker run -it --rm \
--add-host=host.docker.internal:host-gateway \
-p 8000:8000 \
-e OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="http://host.docker.internal:4317" \
-e OTEL_EXPORTER_OTLP_TRACES_PROTOCOL="grpc" \
-v ~/.openhands:/home/openhands/.openhands \
-v ~/projects:/projects \
ghcr.io/openhands/agent-canvas:latest```
One important Docker gotcha:
localhost
inside the Agent Canvas container means the container itself, not your host. If your collector is on your host, use
host.docker.internal
on Docker Desktop, or add the host gateway alias on Linux. If the collector is another container, put both containers on the same Docker network and use the collector service name, for example
<http://jaeger:4317>
or
<http://tempo:4317>
.
For Prometheus/Grafana specifically: the SDK observability path is OTLP tracing, not a built-in Prometheus
/metrics
scrape endpoint. Grafana works well if you send OTLP traces to Tempo or Jaeger and add that as a Grafana data source. The SDK “metrics” docs are mostly token/cost/latency metrics accessible from SDK objects, not a Prometheus exporter for Agent Canvas Docker.
Do you want me to also add a Grafana Tempo-specific example to the PR, or keep this PR focused on the generic Laminar/OTLP Docker guidance?
t
yes please, a grafana example would be helpful
c
@nutritious-balloon-65098 see Beryl's ask and add to PR . Be careful, to distinguish clearly what is built in and what is an example of use
n
Added Beryl’s ask to the existing PR and pushed a follow-up commit. PR: github.com/OpenHands/docs/pull/608 New commit:
e77a2864 docs: clarify Agent Canvas observability boundaries
What I added: • A new “View Backend Conversations and Events” section for Agent Canvas Docker: ◦ Uses built-in backend APIs. ◦ Shows
X-Session-API-Key
with
LOCAL_BACKEND_API_KEY
. ◦ Shows
/api/conversations/search
. ◦ Shows
/api/conversations/{id}/events/search?limit=20
. ◦ Clarifies this is separate from observability tracing. • A new “Built-in Tracing vs. External Backends” section: ◦ Built in: ▪︎ Agent Server runs inside Agent Canvas Docker. ▪︎ SDK trace instrumentation/export is built in. ▪︎ Backend conversation/event APIs are built in. ◦ Not built in: ▪︎ No Prometheus
/metrics
endpoint for Agent Canvas Docker agent execution metrics. ▪︎ No Grafana connector that authenticates into Agent Canvas or makes conversations appear in the left panel. ▪︎ Laminar, Jaeger, Tempo, Prometheus, Grafana, Datadog, Honeycomb, New Relic are external systems. • A clarification that SDK metrics are token/cost/latency tracking, not Prometheus scrape metrics. • Updated the SDK observability note to make the same built-in-vs-external distinction. Validation: •
git diff --check
passed •
uv run --with pytest --with requests --with pyyaml pytest -q tests/ -k 'not pricing'
passed: 30 passed, 6 deselected I also updated the PR body to call out these changes explicitly.
t
Thank you for the clarification