LiteLLM · Via Your OTEL Collector
Already running an OTEL collector? Forward traces from your collector to Milestone — your collector stays the single egress point and redaction can happen server-side, before the data leaves your network.
Step 1: Add the Milestone exporter
Drop into your existing collector config:
# Add to your existing otel-collector-config.yaml.
exporters:
otlphttp/milestone:
endpoint: https://telemetry.mstone.ai
headers:
x-shared-secret: <your-shared-secret>
service:
pipelines:
traces:
exporters: [otlphttp/milestone]
Show how to filter / redact sensitive fields
Add an OTTL transform processor with delete_matching_keys to strip prompt / completion / tool-result text before egress. Edit the regexes for whatever attribute names your source emits:
# Add to your otel-collector-config.yaml — strips prompt /
# completion / tool-result text before egress. Adjust the regexes
# for whatever attribute names your source emits.
processors:
transform/redact:
trace_statements:
- context: span
statements:
- delete_matching_keys(attributes, "^gen_ai\\.request\\.messages")
- delete_matching_keys(attributes, "^gen_ai\\.completion(\\.|$)")
- delete_matching_keys(attributes, "^gen_ai\\.prompt")
- delete_matching_keys(attributes, "^litellm\\.params\\.messages")
- delete_matching_keys(attributes, "^tool_call_response")
- delete_matching_keys(attributes, "^metadata\\.(requester_metadata|completion_response|request_body|response_body)")
service:
pipelines:
traces:
processors: [transform/redact, batch]
exporters: [otlphttp/milestone]
Step 2: Point LiteLLM proxy at your collector
Save to litellm_config.yaml on your LiteLLM proxy — replace <your-otel-collector> with the address of your collector's OTLP/HTTP listener (port 4318):
litellm_settings:
callbacks: ["otel"]
# Redacts prompts, completions, and tool-result text from all callbacks.
# Token counts, model, latency, and user attribution are still sent.
turn_off_message_logging: True
environment_variables:
OTEL_EXPORTER: "otlp_http"
OTEL_ENDPOINT: "http://<your-otel-collector>:4318/v1/traces"
OTEL_HEADERS: ""
Restart LiteLLM proxy
Close and reopen LiteLLM proxy for settings to take effect.