Skip to content

optional opentelemetry tracing supported by helm#1981

Open
esara wants to merge 1 commit intoHolmesGPT:masterfrom
esara:otel
Open

optional opentelemetry tracing supported by helm#1981
esara wants to merge 1 commit intoHolmesGPT:masterfrom
esara:otel

Conversation

@esara
Copy link
Copy Markdown

@esara esara commented May 2, 2026

Summary by CodeRabbit

  • New Features

    • Optional OpenTelemetry (OTLP) tracing for Kubernetes Helm deployments (disabled by default).
    • Experimental AG‑UI server option (disabled by default) to expose an alternate AG‑UI endpoint.
  • Documentation

    • Added Kubernetes Helm installation docs explaining how to enable OTLP, configure OTLP options (service, endpoint, metrics, logs, protocol/auth), and example values.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds optional OpenTelemetry (OTLP) env-var injection and configuration to the Holmes Helm chart, an experimental AG‑UI server toggle to select the startup command, and documents OTLP usage in the Kubernetes installation guide. No exported/public code entities changed.

Changes

OpenTelemetry and AG‑UI Server Integration

Layer / File(s) Summary
Configuration Schema
helm/holmes/values.yaml
Adds experimental.aguiServer.enabled: false and an otlp block with enabled: false, service: holmesgpt, metrics: "none", logs: "none", endpoint: "", plus commented options for protocol/insecure/headers/excludedUrls.
Template Implementation
helm/holmes/templates/holmes.yaml
Makes container command conditional: runs experimental/ag-ui/server-agui.py when experimental.aguiServer.enabled is true, otherwise server.py. When both otlp.enabled and otlp.endpoint are set, injects OTEL_* env vars (service name, metrics/logs exporters, optional protocol/insecure/headers, endpoint) and OTEL_PYTHON_FASTAPI_EXCLUDED_URLS (defaults to "/healthz,/readyz").
Documentation
docs/installation/kubernetes-installation.md
Adds "Optional: OpenTelemetry instrumentation" section describing enabling otlp.enabled and otlp.endpoint, provides a values.yaml snippet, notes Helm injects OTLP env vars for Holmes’ tracer, documents entrypoint wrapping requirement for auto-instrumentation, and explains behavior when OTLP is disabled or endpoint is empty.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Avi-Robusta
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding optional OpenTelemetry tracing support to the Helm installation, which is the primary objective across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 2, 2026

Deploy Preview for holmes-docs failed. Why did it fail? →

Name Link
🔨 Latest commit 6a954d4
🔍 Latest deploy log https://app.netlify.com/projects/holmes-docs/deploys/69fb582002ce9f0008bd7883

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/installation/kubernetes-installation.md`:
- Around line 136-167: The docs claim the chart runs under
"opentelemetry-instrument" but the actual Helm template still uses the direct
Python startup command, so auto-instrumentation won't occur; either update the
docs to state that enabling otlp (otlp.enabled / otlp.endpoint) only sets env
vars and that the container must be started with opentelemetry-instrument or
modify the Helm templates to conditionally replace the startup command with
"opentelemetry-instrument" when otlp.enabled is true (ensure the command string
and any args in the deployment/daemonset/container spec are updated), and
mention required image deps if you choose the docs route.

In `@helm/holmes/templates/holmes.yaml`:
- Around line 93-116: The OTEL_PYTHON_FASTAPI_EXCLUDED_URLS env var currently
uses {{ .Values.otlp.excludedUrls | default "/healthz,/readyz" }} which treats
an explicit empty string as unset; change it to explicitly check for the
presence of the value so an empty string is honored: render
OTEL_PYTHON_FASTAPI_EXCLUDED_URLS as the quoted .Values.otlp.excludedUrls when
that key is set (even if empty), otherwise fall back to "/healthz,/readyz" (e.g.
use an if block testing .Values.otlp.excludedUrls), and remove or conditionally
emit OTEL_EXPORTER_OTLP_PROTOCOL and OTEL_EXPORTER_OTLP_INSECURE env vars
(currently rendered from .Values.otlp.protocol and .Values.otlp.insecure) if the
runtime tracer ignores them so you don’t expose unused knobs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d563a19f-6c25-4cda-81e5-55505f81a297

📥 Commits

Reviewing files that changed from the base of the PR and between cf6ddb7 and 52abad4.

📒 Files selected for processing (4)
  • Dockerfile
  • docs/installation/kubernetes-installation.md
  • helm/holmes/templates/holmes.yaml
  • helm/holmes/values.yaml

Comment thread docs/installation/kubernetes-installation.md
Comment thread helm/holmes/templates/holmes.yaml
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
helm/holmes/templates/holmes.yaml (1)

114-120: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

excludedUrls: "" still falls back to the default exclusion list

{{- if .Values.otlp.excludedUrls }} evaluates to false for an empty string, so an explicit excludedUrls: "" (intended to trace all paths) silently applies /healthz,/readyz. The previous suggestion of using {{- if hasKey .Values.otlp "excludedUrls" }} would correctly distinguish between "key not present" and "key set to empty string."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@helm/holmes/templates/holmes.yaml` around lines 114 - 120, The helm template
currently treats an explicit empty string for .Values.otlp.excludedUrls as
"unset"; change the conditional to check for the key presence instead of
truthiness by using hasKey on .Values.otlp for "excludedUrls" so that
OTEL_PYTHON_FASTAPI_EXCLUDED_URLS uses the provided value (even an empty string)
when the key exists, and only falls back to "/healthz,/readyz" when the key is
absent; update the conditional around OTEL_PYTHON_FASTAPI_EXCLUDED_URLS to use
hasKey .Values.otlp "excludedUrls" and keep the value assignment as
.Values.otlp.excludedUrls | quote when present.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/installation/kubernetes-installation.md`:
- Line 158: The docs line claiming 'excludedUrls: ""' will trace all paths is
inaccurate; update the documentation to remove the empty-string claim and
clarify that the Helm template conditional {{- if .Values.otlp.excludedUrls }}
treats an empty string as false so the default "/healthz,/readyz" remains;
specifically, edit the documentation text referencing excludedUrls to state the
correct behavior (that omitting the value or setting it to an empty string will
result in the default /healthz,/readyz) and remove the suggestion that ""
enables tracing of all paths so it matches the actual logic used by the Helm
template.

---

Duplicate comments:
In `@helm/holmes/templates/holmes.yaml`:
- Around line 114-120: The helm template currently treats an explicit empty
string for .Values.otlp.excludedUrls as "unset"; change the conditional to check
for the key presence instead of truthiness by using hasKey on .Values.otlp for
"excludedUrls" so that OTEL_PYTHON_FASTAPI_EXCLUDED_URLS uses the provided value
(even an empty string) when the key exists, and only falls back to
"/healthz,/readyz" when the key is absent; update the conditional around
OTEL_PYTHON_FASTAPI_EXCLUDED_URLS to use hasKey .Values.otlp "excludedUrls" and
keep the value assignment as .Values.otlp.excludedUrls | quote when present.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0e875e54-48e7-430f-9888-c5ff183a7eb6

📥 Commits

Reviewing files that changed from the base of the PR and between 52abad4 and 8788c97.

📒 Files selected for processing (4)
  • Dockerfile
  • docs/installation/kubernetes-installation.md
  • helm/holmes/templates/holmes.yaml
  • helm/holmes/values.yaml
✅ Files skipped from review due to trivial changes (1)
  • helm/holmes/values.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • Dockerfile

Comment thread docs/installation/kubernetes-installation.md Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/installation/kubernetes-installation.md`:
- Around line 147-165: The markdown lint flags are caused by fenced code blocks;
replace the two fenced blocks (the YAML block that begins with "otlp:" and the
bash block that contains "helm upgrade --install holmesgpt robusta/holmes -f
values.yaml") with indented code blocks (indent each code line by four spaces)
so the file uses indented code fencing expected by MD046 and removes the lint
warnings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ac69b309-7c4c-44aa-a563-767833c6c2db

📥 Commits

Reviewing files that changed from the base of the PR and between 8788c97 and ac99b5d.

📒 Files selected for processing (3)
  • docs/installation/kubernetes-installation.md
  • helm/holmes/templates/holmes.yaml
  • helm/holmes/values.yaml
✅ Files skipped from review due to trivial changes (1)
  • helm/holmes/values.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • helm/holmes/templates/holmes.yaml

Comment thread docs/installation/kubernetes-installation.md Outdated
@esara esara force-pushed the otel branch 2 times, most recently from 1497116 to 7809f50 Compare May 2, 2026 16:00
Signed-off-by: Endre Sara <endresara@gmail.com>
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