Feature · OpenTelemetry tracing
A bridge from Prism’s telemetry to GenAI-convention OpenTelemetry spans: a root span per generation, and child spans per step and per tool call.
Export over OTLP to Arize Phoenix, Jaeger, Tempo, Grafana or anything else that speaks OTLP.
Capabilities
01
Spans carry both the OpenTelemetry gen_ai.* attributes and the OpenInference attributes Phoenix uses to render LLM traces.
02
Spans carry model and provider, timing, finish reason, token counts, cost, rate limits and tool names. Prompts, completions and tool arguments are exported only when you turn on content capture.
03
In PHP the bridge subscribes to the Laravel events Prism emits; there is nothing to call once Prism telemetry is enabled.
04
The subscribers do not import OpenTelemetry. They write through a small tracer interface you connect to your OpenTelemetry SDK, and have no dependencies of their own.
How it fits
In PHP, the bridge subscribes to the Laravel events Prism emits. In TypeScript and Python, your application calls the subscriber at generation, step and tool boundaries, and spans are written through a tracer interface you connect to your OpenTelemetry SDK.
Install
particle-academy/prism-opentelemetry PHP
@particle-academy/prism-opentelemetry TypeScript
prism-ai-opentelemetry Python
Related features
Provider interface
One API, every provider
One request shape for text, structured output, streaming, embeddings, media, audio, files and batches, in PHP, TypeScript and Python.
Durable agent sessions
Agent harness
Durable sessions, threads, modes, approvals and subagents with their own budgets, for agents that outlive a request.
Search and research
Research (Perplexity)
Perplexity embeddings, web search and the long-running Agent API.