[PR #23660] [CLOSED] feat(otel): add W3C TraceContext propagator for distributed tracing #130972

Closed
opened 2026-05-21 15:49:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23660
Author: @runixer
Created: 4/13/2026
Status: Closed

Base: devHead: feat/otel-trace-propagation


📝 Commits (1)

  • 60a85ee feat(otel): add W3C TraceContext propagator for distributed trace correlation

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 backend/open_webui/utils/telemetry/setup.py (+9 -0)

📄 Description

Description

Open WebUI configures a TracerProvider and instruments HTTP clients, but never configures a propagator — so traceparent headers are never injected into outgoing requests. Downstream services (LLM backends, etc.) start isolated traces instead of joining the parent trace.

This PR configures the standard W3C TraceContext + Baggage propagators so that the existing requests/httpx/aiohttp instrumentation propagates trace context automatically.

Added

  • W3C TraceContext and Baggage propagators (standard OTEL defaults)

Fixed

  • Trace context is no longer dropped at outgoing HTTP boundaries

Dependencies

No changes — all classes come from opentelemetry-api, already in requirements.


Testing

Deployed in a Kubernetes environment with Open WebUI → LiteLLM → vLLM. Before: three disconnected traces. After: single end-to-end trace across all three services. Running in production for ~5 days without issues.

Contributor License Agreement


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/23660 **Author:** [@runixer](https://github.com/runixer) **Created:** 4/13/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/otel-trace-propagation` --- ### 📝 Commits (1) - [`60a85ee`](https://github.com/open-webui/open-webui/commit/60a85ee1402683fdccf03ef016afcf7279095e42) feat(otel): add W3C TraceContext propagator for distributed trace correlation ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/telemetry/setup.py` (+9 -0) </details> ### 📄 Description # Description Open WebUI configures a `TracerProvider` and instruments HTTP clients, but never configures a propagator — so `traceparent` headers are never injected into outgoing requests. Downstream services (LLM backends, etc.) start isolated traces instead of joining the parent trace. This PR configures the standard W3C TraceContext + Baggage propagators so that the existing `requests`/`httpx`/`aiohttp` instrumentation propagates trace context automatically. ### Added - W3C TraceContext and Baggage propagators (standard OTEL defaults) ### Fixed - Trace context is no longer dropped at outgoing HTTP boundaries ### Dependencies No changes — all classes come from `opentelemetry-api`, already in requirements. --- ## Testing Deployed in a Kubernetes environment with Open WebUI → LiteLLM → vLLM. Before: three disconnected traces. After: single end-to-end trace across all three services. Running in production for ~5 days without issues. ### Contributor License Agreement - [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-21 15:49:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#130972