Skip to content
This page was generated and translated with the assistance of AI. If you spot any inaccuracies, feel free to help improve it. Edit on GitHub

OpenTelemetry

PRX supports OpenTelemetry (OTLP) for distributed tracing. Traces provide span-level visibility into agent operations, including LLM calls, tool executions, and memory operations.

Overview

Each agent operation creates a trace with nested spans:

Session
  └── Turn
       ├── Memory Recall (span)
       ├── LLM Request (span)
       │    ├── Token Streaming
       │    └── Response Parsing
       └── Tool Execution (span)
            ├── Policy Check
            └── Sandbox Run

Configuration

toml
[observability.tracing]
enabled = false
endpoint = "http://localhost:4317"  # OTLP gRPC endpoint
protocol = "grpc"  # "grpc" | "http"
service_name = "prx"
sample_rate = 1.0  # 0.0 to 1.0

Supported Backends

PRX can export traces to any OTLP-compatible backend:

  • Jaeger
  • Grafana Tempo
  • Honeycomb
  • Datadog
  • AWS X-Ray (via OTLP collector)

Span Attributes

Common attributes attached to spans:

AttributeDescription
prx.session_idAgent session identifier
prx.providerLLM provider name
prx.modelModel identifier
prx.toolTool name (for tool spans)
prx.tokens.inputInput token count
prx.tokens.outputOutput token count

Released under the Apache-2.0 License.