Trace sampling and redaction
Before traces reach MLflow, the OpenTelemetry collector in Cloudera Agent Studio limits memory use, masks sensitive values, drops noise, and applies tail sampling.
The source material describes the collector configuration that ships with the observability components. It does not state which of these settings customers can change. Each setting below is marked accordingly.
Processing order
The collector applies these stages to every span, in this order:
memory_limiter: protects the collector from running out of memory.redaction: masks sensitive values.filter/drop_noise: drops spans for health and metrics routes.tail_sampling: decides which traces to keep.
The collector then sends the remaining traces to a router, which assigns each group of spans to the MLflow experiment for the agent and environment.
Tail sampling
Tail sampling decides after a trace is complete. The collector waits for spans to arrive before it decides (10 seconds in the reference configuration) and tracks up to 50,000 traces at a time. A trace is kept when any of these policies match:
| Policy | Keeps |
|---|---|
keep-errors |
Traces with an error status |
keep-slow |
Traces with a latency of 3000 ms or more |
keep-hitl |
Traces whose run status is awaiting_human or resumed |
keep-resume |
Traces that continue an earlier trace (they carry a resumed-from trace ID) |
sample-rest |
All other traces, at a probability of 100 percent |
Because sample-rest is set to 100 percent in the reference configuration, the collector drops no traces for sampling reasons. Whether the collector drops any traces when its limits are reached is not stated.
Redaction
The redaction stage masks values that match patterns. The reference configuration defines three patterns:
- A pattern for card-number-like values.
- A pattern for Social Security number-like values.
- A pattern for secret-like values: the words
api_key,secret,password,token, orbearerfollowed by an assignment and 20 or more characters.
The stage keeps all attribute keys and masks only the values that match.
Noise filtering
The collector drops spans whose http.route is one of /health, /healthz, /readyz, /metrics, /v1/threads/{id}/context, or /v1/agents/{id}. The router also drops spans that only record a raw HTTP request (a method such as GET or POST with an http.url or http.method attribute). This keeps health checks and other routine calls out of your traces.
Large payloads
The router can move large span attributes to S3 storage and replace them in the trace with a pointer and a short preview. Payload offload is off by default. When an administrator turns it on, attributes larger than 256 KiB are offloaded and the preview contains the first 500 characters.
Telemetry redaction rules in the engine settings
Separately from the collector, the Agent Studio engine panel in the Anywhere Cloud Console has a Telemetry tab. The tab has these sections:
- Default Storage Path: select a Storage Service and a Default Storage Bucket. Unmapped engine component logs, system diagnostics, and operator logs are exported to this bucket automatically.
- Log Stream Mappings: map each log stream (
agent-studio-infra,agent-workload,agent-session,agent-sandbox, anddefault) to a destination bucket, or leave it on the default bucket. - Telemetry Redaction Rules: enter regular expression patterns in the Rules field to mask sensitive data in logs, metrics, and traces in real time, before Agent Studio sends them to storage or external exporters.
For the steps to open the engine panel, see Deploying Cloudera Agent Studio from Anywhere Cloud.
