Transforming Telemetry in the Collector: OTCA practice questions
The Collector is a convenient place to reshape telemetry before it leaves your infrastructure, usually for data quality, governance, cost or security. Contrib processors offer dozens of transformations, and the documentation warns that heavy transformations can noticeably affect Collector performance.
By Ibrahim Yesilay · Published · Updated
Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.
What Transforming Telemetry in the Collector covers in OTCA
The Collector is a convenient place to reshape telemetry before it leaves your infrastructure, usually for data quality, governance, cost or security. Contrib processors offer dozens of transformations, and the documentation warns that heavy transformations can noticeably affect Collector performance.
Much of this work now runs on the OpenTelemetry Transformation Language, OTTL. An OTTL statement combines a function, such as set or delete_key, with an optional where condition that decides whether the function runs. Paths reach into the data through contexts like resource, scope, span, spanevent, metric, datapoint, exemplar and log. OTTL cannot cross signals, so a log statement cannot read a span field.
The transform processor executes OTTL statements in order, with separate lists named trace_statements, metric_statements and log_statements. Each list accepts only the contexts that belong to its signal. Its error_mode defaults to ignore, which logs the error and continues. The silent mode skips logging, and propagate returns the error up the pipeline, dropping the payload. The older attributes processor, which inserts, updates, upserts, deletes, hashes, extracts or converts attributes, and the resource processor, which does the same for resource attributes, both now state that they are superseded by the transform processor. For metric renames, the metrics transform processor remains an option.
Dropping data is the filter processor's job, and it also uses OTTL. Telemetry that matches any configured condition is dropped, because the conditions are ORed. Conditions are evaluated from higher levels to lower ones. Removing every span event leaves the span in place, but removing every data point of a metric removes the metric. For sensitive values, the redaction processor keeps only allowed attribute keys and can mask blocked values, and its list of allowed keys fails closed when left empty.
Enrichment usually comes from two processors. The resource detection processor adds host or cloud information from detectors such as env, system, ec2, gcp or azure, and when two detectors set the same attribute the first one listed wins. The Kubernetes attributes processor adds pod, namespace, node and workload metadata and needs RBAC read access to the Kubernetes API.
Sampling is a transformation too. The probabilistic sampler processor makes stateless decisions from the trace ID and is the efficient choice when you need a fixed percentage. The tail sampling processor holds spans in memory, for 30 seconds by default, and then applies policies such as latency, status code or OTTL conditions to the whole trace, which requires all spans of a trace to reach one instance. Batching closes the loop. Exporters can batch inside their sending queue, which is off until you configure a batch block, and the separate batch processor belongs after memory_limiter and any sampling.
Key points
- OTTL statements pair a function with an optional where condition, and OTTL cannot access another signal.
- The transform processor defaults to error_mode ignore, while propagate drops the payload.
- The filter processor drops telemetry that matches any of its conditions.
- The attributes and resource processors are documented as superseded by the transform processor.
- Probabilistic sampling is stateless; tail sampling needs whole traces on one Collector instance.
- With several resource detectors, the first detector to set an attribute wins.
Three sample questions
17 OTCA questions on Transforming Telemetry in the Collector, 17 with explanations. How practice works
Question 1
- A.An error is logged and processing continues.
- B.The processor stops processing any further contexts.
- C.All statements within that context are executed without conditions.
- D.The associated statements for that context are skipped.
Correct answer: D
conditions of a statement group are ORed together, so "only one condition needs to evaluate to true in order for the statements (including their individual Where clauses) to be executed". When none of them is true, the statements of that group are not run for that context and processing moves on. Why the other options are wrong. "An error is logged and processing continues.": an unmet condition is not an error; error_mode only governs errors raised while a statement runs. "The processor stops processing any further context…": only the statements of that group are skipped; other contexts and groups are still processed. "All statements within that context are executed wi…": this reverses the rule; the statements run only when at least one condition is true.Sources: Collector contrib: transform processor README (v0.164.1), OpenTelemetry docs: Transforming telemetry
Question 2
actions such as insert, update, upsert, delete, hash and extract to add an attribute like environment: production?- A.Attributes Processor
- B.Transform Processor
- C.Metrics Transform Processor
- D.Filter Processor
Correct answer: A
action: insert. Why the other options are wrong. "Transform Processor": the transform processor is configured with OTTL statements such as set(...), not with an actions list. "Metrics Transform Processor": the metrics transform processor renames metrics and labels with transforms and operations, and works only on metrics. "Filter Processor": the filter processor drops telemetry that matches OTTL conditions; it does not add attributes.Sources: Collector contrib: attributes processor README (v0.164.1), OpenTelemetry docs: Transforming telemetry
Question 3
- A.It only collects traces and metrics, not logs.
- B.It replaces all existing logging libraries in applications.
- C.It serves as a backend storage for logs.
- D.It enriches and processes logs uniformly before export
Correct answer: D
Sources: OpenTelemetry spec: Logs, OpenTelemetry docs: Collector
Practice this topic
Focus mode keeps every question on Transforming Telemetry in the Collector until you leave it. 10 free guest answers, then a free account; no credit card.
Or open OTCA practice across all topics.
Sources
The explanation above was checked against these official documents.
- OpenTelemetry docs: Transforming telemetry (checked 2026-10-28)
- Collector contrib README: OpenTelemetry Transformation Language (pkg/ottl) (checked 2026-10-28)
- Collector contrib README: Transform processor (checked 2026-10-28)
- Collector contrib README: Filter processor (checked 2026-10-28)
- Collector contrib README: Attributes processor (checked 2026-10-28)
- Collector contrib README: Redaction processor (checked 2026-10-28)
- Collector contrib README: Resource detection processor (checked 2026-10-28)
- Collector contrib README: Tail sampling processor (checked 2026-10-28)
- Collector contrib README: Probabilistic sampler processor (checked 2026-10-28)
- Collector core README: Exporter helper (queue, batch, retry) (checked 2026-10-28)
Frequently asked questions
If I do not already run tail sampling, how should I sample a fixed percentage of traces?
Use the probabilistic sampler processor. The tail sampling README calls it more efficient and recommends the tail sampling probabilistic policy only when tail sampling is already running.