Otelite Dashboard

## 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

## GenAI Usage

## 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:
    export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
    export OTEL_SERVICE_NAME=claude-code
    export OTEL_LOGS_EXPORTER=otlp
    export OTEL_METRICS_EXPORTER=otlp

    # Claude Code will automatically send telemetry to Otelite

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!")

Python (OpenAI SDK with instrumentation)

    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!"}]
    )

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