Skip to content

fix(docker): disable guardrails-ai hub telemetry - #179

Open
vprashrex wants to merge 1 commit into
mainfrom
fix/disable-guardrails-hub-telemetry
Open

vprashrex wants to merge 1 commit into
mainfrom
fix/disable-guardrails-hub-telemetry

Conversation

@vprashrex

@vprashrex vprashrex commented Oct 29, 2026 •

Copy link
Copy Markdown

Summary

Target issue is #177

Every POST /api/v1/guardrails/ request produced a Sentry error (KAAPI-PRODUCTION-24, logger opentelemetry.exporter.otlp.proto.http.trace_exporter): Failed to export span batch due to timeout, max retries or shutdown.

The exporter is not ours. It is the guardrails-ai library's own hub telemetry (HubTelemetry in guardrails/utils/hub_telemetry_utils.py), which sends spans to a hardcoded vendor collector (hty0gc1ok3.execute-api.us-east-1.amazonaws.com) that no longer resolves. It runs whenever settings.rc.enable_metrics is truthy, and RC defaults that to True when ~/.guardrailsrc is missing. Our image never writes that file.

This PR writes enable_metrics=false to /root/.guardrailsrc in backend/Dockerfile (the container runs as root, so ~ is /root). Our own Sentry/OTel setup in app/core/telemetry.py is unaffected.

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.
  • If you've fixed a bug or added code that is tested and has test cases.

guardrails-ai defaults enable_metrics=True when ~/.guardrailsrc is absent
and exports spans to a vendor collector that no longer resolves, flooding
Sentry with 'Failed to export span batch' errors on /api/v1/guardrails/.
Write enable_metrics=false into the image.
@vprashrex vprashrex added the bug Something isn't working label Oct 29, 2026
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1
  • ready-for-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@vprashrex vprashrex self-assigned this Oct 29, 2026
@vprashrex vprashrex linked an issue Oct 29, 2026 that may be closed by this pull request

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend: Disable Guardrails hub telemetry

1 participant