Contents

spanview documentation

Send your agent's OpenTelemetry traces. Get a verdict for every run.

Getting started

Quickstart

  1. Sign upat app.spanview.dev.
  2. Create an API keyunder API keys. It's shown once.
  3. Install
    pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http \
      openinference-instrumentation-langchain
  4. Configure the exporter
    export OTEL_EXPORTER_OTLP_ENDPOINT=https://app.spanview.dev
    export OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer%20$SPANVIEW_API_KEY
  5. Add tracing
    from opentelemetry import trace
    from opentelemetry.sdk.resources import Resource
    from opentelemetry.sdk.trace import TracerProvider
    from opentelemetry.sdk.trace.export import BatchSpanProcessor
    from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
    from openinference.instrumentation.langchain import LangChainInstrumentor
    
    provider = TracerProvider(resource=Resource.create({"service.name": "my-agent"}))
    provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
    trace.set_tracer_provider(provider)
    LangChainInstrumentor().instrument()
    
    # ... run your agent ...
    provider.force_flush()
  6. Run your agentThe run appears under Runs. Its verdict follows within a few minutes.

Sending traces

Use the Quickstart setup and swap the instrumentor.

LangGraph and LangChain

pip install openinference-instrumentation-langchain
from openinference.instrumentation.langchain import LangChainInstrumentor
LangChainInstrumentor().instrument()

OpenAI Agents SDK

pip install openinference-instrumentation-openai-agents
from openinference.instrumentation.openai_agents import OpenAIAgentsInstrumentor
OpenAIAgentsInstrumentor().instrument()

Claude Agent SDK

pip install openinference-instrumentation-claude-agent-sdk
from openinference.instrumentation.claude_agent_sdk import ClaudeAgentSDKInstrumentor
ClaudeAgentSDKInstrumentor().instrument()

Custom OpenTelemetry

Set openinference.span.kind, input.value and output.value on your spans.

with tracer.start_as_current_span("lookup_order") as span:
    span.set_attribute("openinference.span.kind", "TOOL")
    span.set_attribute("input.value", json.dumps({"order_id": 1182}))
    span.set_attribute("output.value", json.dumps(lookup_order(1182)))

Troubleshooting

  • No runs: endpoint has no path; short scripts call force_flush().
  • 401: check the API key.
  • 413: request over 10 MB.
  • Compression: leave gzip off.

Using spanview

Reading a verdict

Each run gets a severity, a headline, a summary, likely causes and the steps to look at first. Each step gets a note.

noneNothing wrong.
infoMinor notes.
warnProblems along the way.
errorThe result is wrong or missing.

Comparing runs

Open a run, click Compare, pick another run.

Account

Pricing

Free during beta, up to 10 runs a day.

Privacy

  • Zero data retention: the evaluation model stores and trains on nothing.
  • Secrets are redacted before storage.
  • Data is isolated per account.

Self-hosting

Available with Docker. Email team@spanview.dev.

Support

team@spanview.dev