{"slug": "open-webui-observability-monitoring-with-opentelemetry", "title": "Open WebUI Observability & Monitoring with OpenTelemetry", "summary": "SigNoz announced that Open WebUI, a self-hosted AI interface, now supports observability and monitoring through OpenTelemetry, enabling real-time tracing, metrics, and logs for API requests, database queries, and outbound calls without code changes. Users can optionally integrate OpenLIT via Open WebUI Pipelines to track LLM token usage and cost per model. The setup requires a SigNoz Cloud account or self-hosted instance, Docker, and a recent Open WebUI deployment, with configuration via an OpenTelemetry Collector and Docker Compose.", "body_md": "What is Open WebUI Monitoring?\n\nOpen WebUI monitoring gives you real-time visibility into your self-hosted [Open WebUI](https://openwebui.com/) deployment using [OpenTelemetry](https://opentelemetry.io/). Open WebUI's backend ships with OpenTelemetry built in, auto-instrumenting FastAPI, SQLAlchemy, and its HTTP clients, so it emits traces, metrics, and logs for API requests, database queries, and outbound calls without any code changes. If you also want GenAI telemetry (model, tokens, and cost) for every LLM call, you can optionally add [OpenLIT](https://openlit.io/) through Open WebUI Pipelines.\n\nWith full Open WebUI observability in SigNoz, you can trace API requests end to end, monitor database and endpoint latency, track LLM token usage and cost per model, set alerts on errors and latency, and keep your deployment reliable.\n\nPrerequisites\n\n- A\n[SigNoz Cloud account](https://signoz.io/teams/)with an active ingestion key or[Self Hosted SigNoz instance](https://signoz.io/docs/install/self-host/) - Docker and Docker Compose installed and running on your system\n- A running Open WebUI deployment (a recent version with OpenTelemetry support). Follow the\n[Open WebUI docs](https://docs.openwebui.com/)if you don't have it yet - Only for the optional LLM telemetry add-on: an OpenAI API key (or another OpenAI-compatible provider)\n\nMonitor Open WebUI with OpenTelemetry\n\nOpen WebUI's OpenTelemetry stack is bundled inside its backend and turned on with environment variables, so there is no instrumentation package to install. Open WebUI's exporter does not attach custom headers, so it sends OTLP to a lightweight OpenTelemetry Collector that adds your SigNoz ingestion key and forwards the data. The three steps below wire both together with Docker Compose and get data into SigNoz. Once that works, you can optionally [add LLM telemetry with OpenLIT](#add-llm-telemetry-with-openlit-optional) for per-call model, token, and cost data.\n\nStep 1: Configure the OpenTelemetry Collector\n\nCreate `otel-collector-config.yaml`\n\n. The Collector receives OTLP from Open WebUI and OpenLIT and exports it to SigNoz with your ingestion key.\n\n```\notel-collector-config.yaml\nreceivers:\n  otlp:\n    protocols:\n      grpc:\n        endpoint: 0.0.0.0:4317\n      http:\n        endpoint: 0.0.0.0:4318\n \nprocessors:\n  batch:\n    timeout: 5s\n \nexporters:\n  otlp/signoz:\n    endpoint: https://ingest.<region>.signoz.cloud:443\n    tls:\n      insecure: false\n    headers:\n      signoz-ingestion-key: <your-ingestion-key>\n \nservice:\n  pipelines:\n    traces:\n      receivers: [otlp]\n      processors: [batch]\n      exporters: [otlp/signoz]\n    metrics:\n      receivers: [otlp]\n      processors: [batch]\n      exporters: [otlp/signoz]\n    logs:\n      receivers: [otlp]\n      processors: [batch]\n      exporters: [otlp/signoz]\n```\n\n**Verify these values:**\n\n`<region>`\n\n: Your[SigNoz Cloud region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint).`<your-ingestion-key>`\n\n: Your SigNoz[ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/).\n\nStep 2: Start the stack with Docker Compose\n\nCreate `docker-compose.yaml`\n\n. It runs Open WebUI and the Collector on one network, with Open WebUI exporting its native OTLP to the Collector.\n\n```\nservices:\n  otel-collector:\n    image: otel/opentelemetry-collector-contrib:latest\n    command: [\"--config=/etc/otel-collector-config.yaml\"]\n    volumes:\n      - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro\n    ports:\n      - \"4317:4317\"\n      - \"4318:4318\"\n \n  open-webui:\n    image: ghcr.io/open-webui/open-webui:main\n    depends_on: [otel-collector]\n    environment:\n      ENABLE_OTEL: \"true\"\n      ENABLE_OTEL_TRACES: \"true\"\n      ENABLE_OTEL_METRICS: \"true\"\n      ENABLE_OTEL_LOGS: \"true\"\n      OTEL_SERVICE_NAME: \"open-webui\"\n      OTEL_EXPORTER_OTLP_ENDPOINT: \"http://otel-collector:4318\"\n      OTEL_OTLP_SPAN_EXPORTER: \"http\"\n      OTEL_EXPORTER_OTLP_INSECURE: \"true\"\n    ports:\n      - \"3000:8080\"\n    volumes:\n      - open-webui-data:/app/backend/data\n \nvolumes:\n  open-webui-data:\n```\n\nStart everything:\n\n```\ndocker compose up -d\n```\n\nThe Open WebUI environment variables above control the native export:\n\n| Variable | Required | Value | What it does |\n|---|---|---|---|\n`ENABLE_OTEL` | Yes | `true` | Turns on Open WebUI's OpenTelemetry stack. |\n`ENABLE_OTEL_TRACES` / `ENABLE_OTEL_METRICS` / `ENABLE_OTEL_LOGS` | No | `true` (default `false` ) | Enable each signal. |\n`OTEL_SERVICE_NAME` | No | `open-webui` | The `service.name` Open WebUI reports. |\n`OTEL_EXPORTER_OTLP_ENDPOINT` | Yes | `http://otel-collector:4318` | The Collector's OTLP HTTP endpoint. |\n`OTEL_OTLP_SPAN_EXPORTER` | No | `http` (default `grpc` ) | Selects the OTLP/HTTP exporter for traces. |\n`OTEL_EXPORTER_OTLP_INSECURE` | Yes | `true` | Plaintext OTLP to the Collector on the local network. |\n\nStep 3: Generate telemetry\n\n- Open Open WebUI at\n`http://localhost:3000`\n\nand create the first (admin) account. - Browse the app and start a chat to exercise the API.\n\nApp activity produces FastAPI, database, and HTTP spans. An idle instance emits little, so use the app before checking SigNoz, and allow a few seconds for export. Your Open WebUI telemetry is now in SigNoz.\n\nAdd LLM Telemetry with OpenLIT (Optional)\n\n[Add LLM Telemetry with OpenLIT (Optional)](#add-llm-telemetry-with-openlit-optional)\n\nOpen WebUI's native instrumentation captures API, database, and HTTP spans, but not token usage, cost, or the model behind each call. To capture those, run an Open WebUI Pipelines server with an OpenLIT-instrumented OpenAI client. This adds a container and some manual wiring, so set it up after the steps above are sending data.\n\nCreate the pipeline\n\nCreate `pipelines/openai_openlit_pipeline.py`\n\n:\n\n``` python\n\"\"\"\ntitle: OpenAI GenAI (OpenLIT)\nrequirements: openlit, openai\n\"\"\"\nimport os\nfrom typing import Generator, List, Union\n \nfrom pydantic import BaseModel\n \n \nclass Pipeline:\n    class Valves(BaseModel):\n        OPENAI_API_KEY: str = \"\"\n        OPENAI_MODEL: str = \"gpt-4o-mini\"\n        OTLP_ENDPOINT: str = \"http://otel-collector:4318\"\n \n    def __init__(self):\n        self.id = \"openai-genai\"\n        self.name = \"OpenAI GenAI (OpenLIT)\"\n        self.valves = self.Valves(\n            OPENAI_API_KEY=os.getenv(\"OPENAI_API_KEY\", \"\"),\n            OTLP_ENDPOINT=os.getenv(\"OTLP_ENDPOINT\", \"http://otel-collector:4318\"),\n        )\n        self.client = None\n \n    async def on_startup(self):\n        import openlit\n        from openai import OpenAI\n \n        # Instruments the OpenAI client and exports gen_ai.* spans to the Collector.\n        openlit.init(otlp_endpoint=self.valves.OTLP_ENDPOINT, application_name=\"open-webui-llm\")\n        self.client = OpenAI(api_key=self.valves.OPENAI_API_KEY)\n \n    def pipe(self, user_message: str, model_id: str, messages: List[dict], body: dict) -> Union[str, Generator]:\n        resp = self.client.chat.completions.create(\n            model=self.valves.OPENAI_MODEL,\n            messages=messages,\n            stream=True,\n            stream_options={\"include_usage\": True},\n        )\n        for chunk in resp:\n            if chunk.choices and chunk.choices[0].delta.content:\n                yield chunk.choices[0].delta.content\n```\n\nAdd the Pipelines service\n\nAdd this service to the `docker-compose.yaml`\n\nfrom Step 2. It exports GenAI telemetry to the same Collector:\n\n```\n  pipelines:\n    image: ghcr.io/open-webui/pipelines:main\n    depends_on: [otel-collector]\n    environment:\n      OPENAI_API_KEY: ${OPENAI_API_KEY}\n      OTLP_ENDPOINT: \"http://otel-collector:4318\"\n    volumes:\n      - ./pipelines:/app/pipelines\n    ports:\n      - \"9099:9099\"\n```\n\nThen add `pipelines`\n\nto the `open-webui`\n\nservice's `depends_on`\n\nso it starts after the Pipelines server:\n\n```\n    depends_on: [otel-collector, pipelines]\n```\n\nRestart the stack:\n\n```\ndocker compose up -d\n```\n\nConnect the pipeline\n\n- In Open WebUI, go to\n**Admin Panel → Settings → Connections** and add an OpenAI-compatible connection with the URL`http://pipelines:9099`\n\nand the API key`0p3n-w3bu!`\n\n. - Start a chat with the\n**OpenAI GenAI (OpenLIT)** model.\n\nEach chat now produces GenAI spans carrying `gen_ai.*`\n\nattributes (model, token usage, cost) under the service `open-webui-llm`\n\n.\n\nView Open WebUI Traces in SigNoz\n\nOnce configured, Open WebUI emits traces for app requests under the service `open-webui`\n\n, plus traces for LLM calls under `open-webui-llm`\n\nif you added the OpenLIT step. Traces are available in SigNoz under the Traces tab:\n\nClick a trace to see the detailed view, including all spans, events, and attributes. With OpenLIT added, LLM spans carry `gen_ai.*`\n\nattributes such as the model, token usage, cost, and the prompt and response messages.\n\nView Open WebUI Metrics in SigNoz\n\nOpen WebUI also emits OpenTelemetry metrics. Explore them under the Metrics tab, where you can see HTTP client and server durations, alongside GenAI metrics such as token usage, request cost, and time to first token if you added OpenLIT:\n\nSelect a metric to inspect its metadata, type, and attributes:\n\nOpen WebUI Observability Dashboard\n\nYou can also import our custom [Open WebUI dashboard](https://signoz.io/docs/dashboards/dashboard-templates/open-webui-dashboard/), which provides ready-made panels for application health, database performance, and LLM usage, tokens, cost, and latency by model, along with import instructions to get started quickly. The LLM panels populate once you add the optional [OpenLIT step](#add-llm-telemetry-with-openlit-optional).\n\nTroubleshooting Open WebUI Observability\n\n[Troubleshooting Open WebUI Observability](#troubleshooting-open-webui-observability)\n\nNo traces or metrics in SigNoz\n\n- Confirm you used the app after starting the stack. An idle instance emits little telemetry.\n- Check the Collector logs for export errors:\n`docker compose logs otel-collector`\n\n. - Verify\n`ENABLE_OTEL=true`\n\nis set on the Open WebUI container and that`OTEL_EXPORTER_OTLP_ENDPOINT`\n\npoints at the Collector. - OpenTelemetry batches data before sending, so wait 10-30 seconds after generating activity.\n\nNo LLM (gen_ai) spans\n\n- These spans only appear if you completed the optional\n[OpenLIT step](#add-llm-telemetry-with-openlit-optional). - Confirm the Pipelines server loaded the pipeline and that Open WebUI's OpenAI connection points at\n`http://pipelines:9099`\n\nwith the API key`0p3n-w3bu!`\n\n. - Make sure you chatted with the\n**OpenAI GenAI (OpenLIT)** model, not another connection. - Check the Pipelines logs:\n`docker compose logs pipelines`\n\n.\n\nAuth errors (401 / 403)\n\nRe-check the ingestion key in the Collector's `signoz-ingestion-key`\n\nheader. It must be the exact key from your SigNoz Ingestion Settings, with no extra spaces or quotes, and the region in the endpoint must match your account.\n\nSetup OpenTelemetry Collector (Optional)\n\n[Setup OpenTelemetry Collector (Optional)](#setup-opentelemetry-collector-optional)\n\nWhat is the OpenTelemetry Collector?\n\nThink of the OTel Collector as a middleman between your app and SigNoz. Instead of your application sending data directly to SigNoz, it sends everything to the Collector first, which then forwards it along. This guide already routes Open WebUI through a Collector because Open WebUI cannot attach the SigNoz ingestion key itself.\n\nWhy use it?\n\n**Cleaning up data**- Filter out noisy traces you don't care about, or remove sensitive info before it leaves your servers.** Keeping your app lightweight**- Let the Collector handle batching, retries, and compression instead of your application code.** Adding context automatically**- The Collector can tag your data with useful info like which Kubernetes pod or cloud region it came from.** Future flexibility**- Want to send data to multiple backends later? The Collector makes that easy without changing your app.\n\nFor more details, see [Why use the OpenTelemetry Collector?](https://signoz.io/docs/opentelemetry-collection-agents/opentelemetry-collector/why-to-use-collector/) and the [Collector configuration guide](https://signoz.io/docs/opentelemetry-collection-agents/opentelemetry-collector/configuration/).\n\nRelated integrations\n\nInstrument the rest of your self-hosted inference stack:\n\n[Monitor Ollama with OpenTelemetry](https://signoz.io/docs/ollama-monitoring/)- track local model inference latency, tokens, and resource usage[Hugging Face observability with OpenTelemetry](https://signoz.io/docs/huggingface-observability/)- trace inference API calls and local pipeline runs[Monitor Baseten with OpenTelemetry](https://signoz.io/docs/baseten-monitoring/)- trace model deployments and inference calls running on Baseten[LangChain and LangGraph observability with OpenTelemetry](https://signoz.io/docs/langchain-observability/)- trace chains, agents, graph nodes, and tool calls[LiteLLM observability with OpenTelemetry](https://signoz.io/docs/litellm-observability/)- trace calls across 100+ models through either the SDK or the proxy\n\nBrowse [all LLM observability integrations](https://signoz.io/docs/llm-observability/) to instrument the rest of your stack.", "url": "https://wpnews.pro/news/open-webui-observability-monitoring-with-opentelemetry", "canonical_source": "https://signoz.io/docs/open-webui-monitoring", "published_at": "2026-08-03 00:00:00+00:00", "updated_at": "2026-08-05 01:54:41.191054+00:00", "lang": "en", "topics": ["ai-infrastructure", "developer-tools", "ai-tools"], "entities": ["SigNoz", "Open WebUI", "OpenTelemetry", "OpenLIT", "Docker", "Docker Compose", "FastAPI", "SQLAlchemy"], "alternates": {"html": "https://wpnews.pro/news/open-webui-observability-monitoring-with-opentelemetry", "markdown": "https://wpnews.pro/news/open-webui-observability-monitoring-with-opentelemetry.md", "text": "https://wpnews.pro/news/open-webui-observability-monitoring-with-opentelemetry.txt", "jsonld": "https://wpnews.pro/news/open-webui-observability-monitoring-with-opentelemetry.jsonld"}}