OpenTelemetry tracing
reflex serve emits OpenTelemetry GenAI-semantic-convention spans for every /act call. Point Phoenix, Datadog, Honeycomb, New Relic, or any OTLP-compatible backend at it.
Install
Section titled “Install”pip install 'reflex-vla[tracing]'Without the [tracing] extra, tracing no-ops silently. Server emits nothing and costs nothing.
Quick start
Section titled “Quick start”# Terminal 1 — Phoenix UI on :6006, OTLP gRPC collector on :4317pip install arize-phoenixphoenix serve
# Terminal 2 — Reflex pointing at itreflex serve ./my-export/ --otel-endpoint localhost:4317 --otel-sample 1.0Hit /act and open http://localhost:6006 — every request shows up as an act span.
# Datadog Agent exposes OTLP on :4317 when receivers.otlp is enabled in datadog.yamlreflex serve ./my-export/ \ --otel-endpoint localhost:4317 \ --otel-sample 0.1Spans land under service:reflex-vla in APM.
| Flag | Default | Purpose |
|---|---|---|
--otel-endpoint | $OTEL_EXPORTER_OTLP_ENDPOINT or localhost:4317 | OTLP gRPC endpoint |
--otel-sample | 1.0 | Fraction of traces to sample. Parent-based — child spans inherit the root’s decision. |
Sampling guidance
Section titled “Sampling guidance”- Dev / staging:
--otel-sample 1.0 - Production, low traffic (under 100 RPS):
--otel-sample 1.0is fine —BatchSpanProcessordecouples export from the hot path - Production, high traffic (over 1000 RPS):
--otel-sample 0.1per OTel GenAI SemConv recommendation
You can also set OTEL_EXPORTER_OTLP_ENDPOINT as an env var.
Attribute reference
Section titled “Attribute reference”Every /act call produces one root span named act.
Standard OTel GenAI
Section titled “Standard OTel GenAI”| Attribute | Type | Value |
|---|---|---|
gen_ai.operation.name | string | "act" |
gen_ai.request.model | string | Export directory path (post policy-versioning, this becomes the routing slot) |
Robotics extensions (Reflex-specific, proposed upstream Phase 2)
Section titled “Robotics extensions (Reflex-specific, proposed upstream Phase 2)”| Attribute | Type | Value |
|---|---|---|
gen_ai.action.embodiment | string | Embodiment preset name or "custom" |
gen_ai.action.chunk_size | int | Number of actions returned in this chunk |
gen_ai.action.denoise_steps | int | Diffusion denoise iterations (when adaptive-denoise is active) |
Reflex-specific (prefix intentional; not for upstream)
Section titled “Reflex-specific (prefix intentional; not for upstream)”| Attribute | Type | Value |
|---|---|---|
reflex.instruction | string | First 512 chars of the instruction text (truncated — never raw bytes) |
reflex.state_dim | int | Length of the proprio-state vector |
reflex.image_bytes | int | Size of the posted image in bytes (size only — never the image data) |
reflex.rtc.episode_id | string | Episode identifier when RTC adapter is active |
reflex.rtc.episode_reset | bool | True on the first span of a new episode |
reflex.inference_mode | string | "decomposed", "monolithic", "native", etc. |
reflex.action_chunk_len | int | Same as gen_ai.action.chunk_size; kept for backward compat |
error.type | string | Populated only when the server returned an error |
PII and security
Section titled “PII and security”Reflex explicitly does not attribute:
- Raw image bytes (could contain faces, text, identifiers on screens)
- API keys or auth headers
- Raw state vectors when they exceed 512 dims (use
reflex.state_dimfor size only)
Instructions are truncated to 512 chars. If your instructions carry secrets, filter them client-side before calling /act.
Troubleshooting
Section titled “Troubleshooting”“Tracing skipped — pip install reflex-vla[tracing] to enable” — the [tracing] extra isn’t installed.
Spans appear in Phoenix but not in Datadog — Datadog Agent probably has receivers.otlp disabled. Enable OTLP gRPC on :4317 in datadog.yaml.
--otel-sample 0.1 but I see every trace — parent-based sampling inherits from incoming parent context. If an upstream client is propagating a sampled trace context (W3C traceparent), Reflex honors it.
Export slowing down /act — BatchSpanProcessor is async; export failures shouldn’t bubble to request latency. If you see correlation, drop sampling or check collector health.