Otelite Dashboard

## Overview

## Logs

No logs yet

Logs will appear here as they are received. See the Setup tab for configuration instructions.

## Traces

No traces available

Traces will appear here as they are received

## Metrics

No metrics available

Metrics will appear here as they are received

Select a metric to view

## Sessions

## GenAI Analytics

## Setup

### Otelite is listening on

- OTLP gRPC: `localhost:4317`
- OTLP HTTP: `http://localhost:4318`

### Configuration examples

Claude Code (Environment Variables)

    # Set these environment variables before running Claude Code.
    # Telemetry is off by default — CLAUDE_CODE_ENABLE_TELEMETRY=1 is required.
    export CLAUDE_CODE_ENABLE_TELEMETRY=1
    export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
    export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
    export OTEL_SERVICE_NAME=claude-code
    export OTEL_LOGS_EXPORTER=otlp
    export OTEL_METRICS_EXPORTER=otlp

    # Optional: distributed traces (beta) — interaction / llm_request / tool spans
    export CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1
    export OTEL_TRACES_EXPORTER=otlp

    # Optional: include prompt / tool input content in events (off by default)
    # export OTEL_LOG_USER_PROMPTS=1
    # export OTEL_LOG_TOOL_DETAILS=1

Official docs: docs.claude.com › Claude Code › Monitoring usage — authoritative list of env vars, metric names, event names, and attributes.

Claude Agent SDK

    # The Agent SDK runs the Claude Code CLI as a child process,
    # so the same env vars apply. Set them before launching your agent:
    export CLAUDE_CODE_ENABLE_TELEMETRY=1
    export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
    export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
    export OTEL_LOGS_EXPORTER=otlp
    export OTEL_METRICS_EXPORTER=otlp
    # Note: do NOT use OTEL_*_EXPORTER=console under the SDK
    # (console output collides with the SDK's message channel).

Official docs: code.claude.com › Agent SDK › Observability with OpenTelemetry.

Python (OpenTelemetry SDK)

    from opentelemetry import trace
    from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
    from opentelemetry.sdk.trace import TracerProvider
    from opentelemetry.sdk.trace.export import BatchSpanProcessor

    exporter = OTLPSpanExporter(endpoint="http://localhost:4318/v1/traces")
    provider = TracerProvider()
    provider.add_span_processor(BatchSpanProcessor(exporter))
    trace.set_tracer_provider(provider)

    tracer = trace.get_tracer(__name__)
    with tracer.start_as_current_span("my-operation"):
        print("Hello from Python!")

Official docs: opentelemetry.io › Python.

Mellea — build predictable AI without guesswork

    uv pip install "mellea[telemetry]"
    export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
    export MELLEA_TRACE_APPLICATION=true
    export MELLEA_TRACE_BACKEND=true
    export MELLEA_METRICS_ENABLED=true
    export MELLEA_METRICS_OTLP=true

Mellea is a Python library for writing generative programs — structured outputs, verifiable requirements, automatic retries. Backend spans follow OTel GenAI semconv so the Usage page and trace waterfall work out of the box. See mellea.ai · telemetry docs · github.com/generative-computing/mellea.

Python (OpenAI SDK — OpenLLMetry / Traceloop)

    # pip install opentelemetry-instrumentation-openai
    from opentelemetry.instrumentation.openai import OpenAIInstrumentor
    from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
    from opentelemetry.sdk.trace import TracerProvider
    from opentelemetry.sdk.trace.export import BatchSpanProcessor
    import openai

    exporter = OTLPSpanExporter(endpoint="http://localhost:4318/v1/traces")
    provider = TracerProvider()
    provider.add_span_processor(BatchSpanProcessor(exporter))
    OpenAIInstrumentor().instrument()

    client = openai.OpenAI()
    response = client.chat.completions.create(
        model="gpt-4",
        messages=[{"role": "user", "content": "Hello!"}]
    )
    # Default: prompts/completions are captured on span attributes.
    # Disable with: export TRACELOOP_TRACE_CONTENT=false

Official docs: traceloop/openllmetry › opentelemetry-instrumentation-openai.

Python (Anthropic SDK — OpenLLMetry / Traceloop)

    # pip install opentelemetry-instrumentation-anthropic
    from opentelemetry.instrumentation.anthropic import AnthropicInstrumentor
    from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
    from opentelemetry.sdk.trace import TracerProvider
    from opentelemetry.sdk.trace.export import BatchSpanProcessor
    import anthropic

    exporter = OTLPSpanExporter(endpoint="http://localhost:4318/v1/traces")
    provider = TracerProvider()
    provider.add_span_processor(BatchSpanProcessor(exporter))
    AnthropicInstrumentor().instrument()

    client = anthropic.Anthropic()
    message = client.messages.create(
        model="claude-sonnet-4-5",
        max_tokens=1024,
        messages=[{"role": "user", "content": "Hello!"}],
    )

Official docs: traceloop/openllmetry › opentelemetry-instrumentation-anthropic. OpenLLMetry also covers Bedrock, Cohere, Gemini, Groq, Mistral, Ollama, VertexAI — same pattern; see the full list.

Python (OpenAI / Anthropic — OpenInference / Arize)

    # pip install openinference-instrumentation-openai opentelemetry-sdk \
    #             opentelemetry-exporter-otlp
    from openinference.instrumentation.openai import OpenAIInstrumentor
    from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
    from opentelemetry.sdk.trace import TracerProvider
    from opentelemetry.sdk.trace.export import BatchSpanProcessor
    import openai

    provider = TracerProvider()
    provider.add_span_processor(BatchSpanProcessor(
        OTLPSpanExporter(endpoint="http://localhost:4318/v1/traces")))
    OpenAIInstrumentor().instrument(tracer_provider=provider)

    # Swap OpenAIInstrumentor for AnthropicInstrumentor (from
    # openinference.instrumentation.anthropic) for Claude apps, or for
    # LangChainInstrumentor, LlamaIndexInstrumentor, etc.

Official docs: Arize-ai/openinference — covers OpenAI, Anthropic, Bedrock, Mistral, LangChain, LlamaIndex, DSPy, CrewAI, LiteLLM, and more.

Node.js (OpenTelemetry SDK)

    const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
    const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http');
    const { BatchSpanProcessor } = require('@opentelemetry/sdk-trace-base');

    const provider = new NodeTracerProvider();
    provider.addSpanProcessor(new BatchSpanProcessor(new OTLPTraceExporter({
      url: 'http://localhost:4318/v1/traces'
    })));
    provider.register();

Go (OpenTelemetry SDK)

    exporter, _ := otlptracehttp.New(context.Background(),
        otlptracehttp.WithEndpoint("localhost:4318"),
        otlptracehttp.WithInsecure(),
    )
    provider := trace.NewTracerProvider(trace.WithBatcher(exporter))
    otel.SetTracerProvider(provider)

Test with otel-cli

    # Install: https://github.com/equinix-labs/otel-cli
    otel-cli exec --endpoint http://localhost:4318 --service my-test -- echo "Hello Otelite!"

### CLI commands

- `otelite logs list` — view recent logs
- `otelite traces list` — view recent traces
- `otelite metrics list` — view recent metrics
- `otelite tui` — launch terminal UI