Skip to content

Send agent telemetry through the LiteLLM gateway into Lens - #50

Merged
moe-berri merged 2 commits into
mainfrom
devin/1795630695-gateway-lens-rc
Nov 26, 2026
Merged

moe-berri merged 2 commits into
mainfrom
devin/1795630695-gateway-lens-rc

Conversation

@moe-berri

@moe-berri moe-berri commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #42 now that LiteLLM v1.112.0-rc.1 is tagged with gateway OTLP forwarding and the Lens-served UI. Agent telemetry now goes to the gateway with a LiteLLM key, the gateway forwards it to the private Lens service, and the gateway home page opens Lens. Lens moves to 0.5.0, the latest stable release

  • LiteLLM is pinned to ghcr.io/berriai/litellm:v1.112.0-rc.1@sha256:3082365... (multi-arch index) in Compose and Helm, replacing main-stable in Compose
  • Compose, install.sh and the Helm chart (lens-connection.yaml) generate a shared LITELLM_LENS_SERVICE_TOKEN and LENS_GATEWAY_SECRET for both services, kept across upgrades, and set LITELLM_LENS_URL, LITELLM_LENS_PUBLIC_URL, DOCS_URL=/docs and ROOT_REDIRECT_URL=/ui/lens/ on the gateway. With lens.enabled=false none of this is set
  • Lens is bumped from 0.4.0 to 0.5.0 (multi-arch index) in Compose and the Helm chart dependency. No gateway env changes or new storage migrations were needed
  • The launcher's Lens card opens the gateway's Lens workspace
  • AWS: aws/bootstrap.py redirects /litellm to /litellm/ui/lens/ and agents export to /litellm/v1/traces and /litellm/v1/logs. Standalone /v1/traces, /v1/logs, /ui, /lens routes stay for existing tracing-key exporters. A narrow nginx redirect handles the RC's doubled /litellm prefix in the Lens iframe URL. CloudFront already forwards these paths uncached, and t3.xlarge from Run standalone Lens on AWS installs #42 has enough room, so aws/stack.yaml is unchanged
  • README.md and docs/setup.md: send OTLP to the gateway with a LiteLLM key

Validation

In each of Compose (isolated network), kind (v0.33.0) and the AWS nginx routing run locally, a uniquely named OTLP span and log were posted to the gateway with a temporary LiteLLM key, then read back from Lens by trace id, and a signed-in browser opened the gateway root and landed on Lens

POST /v1/traces HTTP 200
POST /v1/logs HTTP 200
GET /lens/v1/traces/0fb72126392fd69e26e011393364929e HTTP 200; matching span name: gateway-otlp-kind-0fb72126
GET /lens/v1/logs?trace_id=0fb72126392fd69e26e011393364929e HTTP 200; matching log marker: gateway-otlp-kind-0fb72126
GET / HTTP 307 Location: /ui/lens/

After the bump, Compose, kind and the local AWS nginx routing were rerun on Lens 0.5.0 with the same results. A kind upgrade from 0.4.0 kept the ClickHouse volume, and the trace and log written on 0.4.0 were still queryable on 0.5.0. On kind, Helm upgrades that disable then re-enable Lens kept both shared credentials. Unit tests 99 OK (with the kind kubeconfig), Helm lint clean, launcher browser tests 15/15. No live AWS run: the AWS paths were checked against the nginx config bootstrap.py emits, not a CloudFormation stack

Compose gateway root opens Lens
kind gateway root opens Lens
AWS-prefixed gateway root opens Lens

Details

Link to Devin session: https://app.devin.ai/sessions/97f537dadadd49af998d06b7c0c599fa
Open in Devin Desktop: https://app.devin.ai/desktop/session/97f537dadadd49af998d06b7c0c599fa?variant=devin
Requested by: @moe-berri

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@moe-berri
moe-berri merged commit 2ee70d8 into main Nov 26, 2026
1 check passed
@moe-berri moe-berri mentioned this pull request Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant