Skip to content
Mementropy
RecipesHomelab recipesReference

Running Arize Phoenix behind an OpenTelemetry privacy collector

Traces with token counts and timings, without prompt text.

By Ryan Hammang

LLM tracing in Phoenix with prompt and completion text kept out.

  1. Phoenix (20.23.0-nonroot tested): non-root, a 10 GiB volume, 14-day retention, PHOENIX_TELEMETRY_ENABLED=false.

  2. Collector (otel/opentelemetry-collector-contrib 0.163.2 tested): non-root, readOnlyRootFilesystem: true. Receive OTLP in-cluster without auth, and from outside only with a bearer token. Drop content attributes and events, keep model name, token counts and span kind, and export to Phoenix’s /v1/traces.

  3. Validate the config:

Terminal window
otelcol-contrib validate --config config.yaml
  1. In the gateway (LiteLLM here), set:
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=NO_CONTENT
OTEL_EXPORTER=otlp_http
OTEL_ENDPOINT=http://otel-collector.observability.svc.cluster.local:4318
  1. A trace with no token to the external endpoint returns 401.
  2. A trace with a token and made-up canary content (for example secret.prompt.canary, gen_ai.content.prompt) returns 200.
  3. In Phoenix the trace is present and none of the canary strings are.
  • Config fields from custom collector builds fail upstream validation.
  • Container port names are limited to 15 characters.