If your agent framework already emits OpenTelemetry spans, point its exporter at LangSight’s OTLP endpoint. No code changes required.Documentation Index
Fetch the complete documentation index at: https://docs.langsight.dev/llms.txt
Use this file to discover all available pages before exploring further.
Setup
Framework examples
Span detection
LangSight extracts MCP tool calls from OTLP spans by looking for:- Span name matching
mcp.*(e.g.mcp.postgres-mcp.query) - Attribute
gen_ai.tool.name(OpenAI Agents SDK / GenAI semantic conventions) - Attribute
mcp.server.name+mcp.tool.name
OTEL Collector (production)
For production, use the included OTEL Collector config:4317 (gRPC) and 4318 (HTTP), filters to MCP spans, and forwards to LangSight.
Token cost attributes
LangSight extracts token counts from OTEL spans automatically if your framework emits them:| OTLP attribute | Maps to | Used for |
|---|---|---|
gen_ai.usage.input_tokens | input_tokens | LLM cost calculation |
gen_ai.usage.output_tokens | output_tokens | LLM cost calculation |
gen_ai.request.model | model_id | Matches against model pricing table |