Why teams use OTTL in the Collector to transform and filter telemetry
Raw telemetry is often noisy, inconsistent or sensitive, and fixing each problem in every service means changing code in many places. The transform processor and filter processor in the OpenTelemetry Collector let you fix these problems once, in the pipeline. Both use the OpenTelemetry Transformation Language (OTTL). The transform processor runs OTTL statements in order for each signal, so later statements see the results of earlier ones, while the filter processor drops any telemetry that matches at least one OTTL condition. The transform processor is beta for traces, metrics and logs, so check the stability level for each signal you plan to use before you commit to it in production.
The main value is consistency. A single pipeline can rename attributes to match your naming conventions, parse a message body into structured fields, add environment or ownership labels, and remove fields that should never leave your network. Because the change happens in the Collector, teams that own services do not all need to ship the same fix. The trade-off is that a transformation rule in the Collector is shared infrastructure: a mistake affects every service that sends data through that pipeline. Plan who can edit these rules, how changes are reviewed and how you will test a statement against sample data before it reaches production.
The OpenTelemetry documentation warns that transformations, particularly advanced ones, can significantly affect Collector performance. Every statement runs against every matching record, so cost grows with data volume and statement complexity. Before you build a long rule set, ask your team to measure Collector CPU and memory under realistic load, and keep heavy parsing for the stage of the pipeline where it is needed. The transforming telemetry documentation is the next read for the statement model and its limits.
Parsing, renaming, enriching and dropping: which processor fits each job
Parsing pulls structured fields out of a free-text log body so they can be filtered, grouped and queried as attributes. The transform processor is the natural fit when the parsing is a small number of OTTL statements that run on logs already in the pipeline. For multi-step parsing of raw files, the filelog receiver's operators are usually the better place to act, so the decision of where parsing happens comes first. Illustrative example: a body such as user=alice action=login status=denied could be split into attributes for user, action and status with a parsing function in a transform statement.
- Decide where parsing belongs: Parse at the receiver when the source format is known and stable, and in the transform processor when logs arrive already structured or from several sources.
- Plan for failed matches: Parsing functions return errors on unexpected input, so decide whether a non-matching line keeps its original body, gets a marker attribute, or is dropped.
- Keep the original body: Consider retaining the raw body until downstream queries prove the parsed fields are reliable.
- Control the field set: Extract only the fields that answer known questions, since every extracted attribute adds cardinality and storage cost.
- Test against real samples: Run statements against representative log lines, including malformed and multiline entries.
Confirm the exact parsing functions and their behavior in the transform processor README for the Collector version you deploy.
Renaming and normalizing make attribute names consistent across services, so dashboards, alerts and queries do not depend on which team wrote the instrumentation. The transform processor can set, copy, rename and delete attributes on each signal, and statements run in the order written, so later statements see the results of earlier ones. Normalization is often needed when older instrumentation uses names that differ from the names the organization has standardized on.
- Agree the target naming scheme: Settle on the attribute names that dashboards and alerts will use before writing any rename statement.
- Map legacy names explicitly: List each old name, its new name and the services that emit it, so the mapping can be reviewed and tested.
- Mind statement order: A rename placed after a statement that reads the old name will break that statement, so review the sequence per signal.
- Watch for collisions: Renaming onto an attribute name that already exists can overwrite values, so check for conflicts first.
- Keep the change reversible in config: Store the mapping in version-controlled configuration so it can be audited and rolled back.
Check which signal types each statement applies to, because the transform processor configures trace, metric and log contexts separately.
Enrichment adds values such as deployment environment, owning team, region or build version to telemetry at the Collector, so the context is attached even when applications do not set it. The transform processor can set attributes from literal values or from other fields, and the resource processor and resourcedetection processor are often better fits for values that describe the host, cloud or cluster. The decision that matters most is which layer owns each value, because enrichment done in several places produces conflicting attributes.
- Assign ownership per attribute: Decide whether the SDK, the Collector or a platform component is the source of truth for each enrichment value.
- Choose the right processor: Use resource-level processors for values that describe the emitting entity, and transform statements for conditional or per-record logic.
- Avoid high-cardinality values: Adding per-request or per-user identifiers to resource attributes multiplies series in metric backends.
- Define precedence: Decide what happens when an application already sets the same attribute, and whether the Collector should overwrite it.
- Source values reliably: Pull values from configuration or environment variables that the platform controls, not from request data.
Confirm the current behavior of each processor in its own README, since their overlap changes between releases.
Dropping removes telemetry that adds cost without value, such as health check spans, debug logs from noisy libraries or metrics no one queries. The filter processor drops telemetry that matches any of its OTTL conditions, which makes it the natural fit for pure removal. The transform processor can also delete data, but mixing deletion with reshaping in one block makes review harder. Dropping is also the step most likely to hide a real incident if the rules are too broad, so the decision is as much about governance as about syntax.
- Define what must never be dropped: List the signals, services and error classes that have to survive every rule, and test for them explicitly.
- Prefer narrow conditions: Match on specific attributes and severities rather than broad patterns that could catch unexpected data.
- Record what is dropped: Track dropped counts through Collector telemetry so the effect of each rule is visible.
- Separate drop rules from reshaping: Keep filter rules in their own processor where possible so changes are easy to review.
- Agree the approval path: Decide who signs off on drop rules, especially where logs may be needed for audit or incident investigation.
Check the filter processor documentation for the exact condition syntax and the signals it supports in your Collector version.
Configuration options and when each fits
This table compares the transform processor, the filter processor and simpler attribute or redaction processors by job, signal support, stability, cost and fit. Read each row as a decision: start with the simplest processor that does the job, and move to OTTL only when the logic needs conditions, parsing or multi-step changes.
| Option | Job | Signal support and stability | When to choose it |
|---|---|---|---|
| Transform processor | Runs ordered OTTL statements that set, rename, parse, copy or delete fields on telemetry | Traces, metrics and logs; beta for each signal per the processor README | Conditional enrichment, parsing unstructured log bodies or reshaping attributes that simpler processors cannot express |
| Filter processor | Drops telemetry that matches any OTTL condition | Traces, metrics and logs; check the README for the stability of each signal before relying on it | Removing health checks, debug logs or noisy series where the rule is a single match condition |
| Attribute processor | Inserts, updates, deletes, hashes or extracts attributes by key name | Check the component README for current stability per signal | Fixed key-based edits with no conditions, where a short configuration is easier to review than OTTL |
| Redaction processor | Removes or masks sensitive attribute values using allowed keys and blocked value patterns | Check the component README for current stability per signal | Scrubbing secrets and personal data as a safety net, typically placed near the end of the pipeline |
| Cost of advanced OTTL | Each statement runs on every matching item, so complex parsing and regular expressions add CPU work | Applies to transform and filter processors alike | Keep statements narrow with conditions, measure Collector CPU and memory after each change, and test on realistic sample volumes |
Keeping heavy transformations from slowing the pipeline
The OpenTelemetry docs warn that transformations, particularly advanced ones, can significantly affect Collector performance. The practices below are how teams keep OTTL statements in the transform and filter processors from becoming the bottleneck, and each one gives you a check to run before and after a change.
Filter before you transform
Place the filter processor ahead of the transform processor so records you will drop never reach expensive statements. Each condition should be a cheap test on fields such as severity, span name or resource attributes. Check the pipeline order in your configuration and confirm that dropped records no longer appear in the transform processor's throughput after the change.
Transforming telemetry docsKeep each statement simple
Prefer one clear statement that sets, deletes or renames a single attribute over long chains that rebuild a whole record. Simple statements are easier to review, easier to test, and easier to reorder safely. If a statement needs several nested functions to produce one field, ask whether the field can be produced at the source instead.
Limit parsing on high-volume signals
Parsing functions that split strings or extract fields with patterns cost more per record than attribute assignments. Apply them to low-volume signals or to a narrow subset selected by a filter, and avoid running them on every debug or access log line. For high-volume log streams, ask whether parsing belongs in the filelog receiver or in the application's log format.
Order statements deliberately
OTTL statements in a processor run in the order you write them, so a later statement may depend on an attribute an earlier one created or removed. Put deletions of sensitive or unneeded fields early so later statements handle less data, and group related statements together so the sequence is readable in review. Document the intended order in the configuration comments.
Test with representative volume
Run candidate configurations against replayed or synthetic traffic that matches your production mix of signals, attribute sizes and error rates. Small test inputs hide the cost of regular expressions and per-record lookups. Record the Collector's CPU and memory during each run, and treat the results as specific to your traffic, not as a general benchmark.
Watch resource metrics after each change
Enable the Collector's own internal telemetry and watch CPU, memory, queue size and refused or dropped data after every OTTL change. Compare these against the baseline from before the change and roll back when a statement moves the numbers in the wrong direction. Confirm the metric names and the internal telemetry setup for your Collector version before you build dashboards.
How to roll out OTTL statements safely
This sequence moves OTTL statements from an idea to a production pipeline without surprises, so each change is justified, tested against known input, and watched once it is live. Each step ends with a check that tells the team whether to move on or go back.
Inventory the telemetry and the reason for each change
The platform or observability team lists the signals, sources and attributes that need to change, and records the reason for each one: a parsing need, a naming standard, enrichment for ownership, or volume that should be dropped. Security and compliance reviewers join this list when an attribute may hold regulated or secret data. The step is done when every proposed statement has a written purpose and an owner, and any change with no clear reason has been removed from the list.
Choose the processor and signal for each change
For each item, the team decides whether the transform processor or the filter processor fits, and which signal (traces, metrics or logs) the statement applies to. Filtering to remove whole records belongs in the filter processor, while field-level edits belong in the transform processor. Because the transform processor is beta for traces, metrics and logs, the team should confirm the stability level of the Collector version it runs. The step is done when each item names one processor, one signal and one pipeline position.
Write statements in a test pipeline with debug output
An engineer writes the OTTL statements in a non-production Collector configuration that receives sample telemetry and sends the result to a debug exporter. Statements run in the order they are written, so the team places dependent changes accordingly. The transform processor README is the reference for syntax and function behavior, and the team should check each function it uses against that reference for the version it deploys. The step is done when the test pipeline starts without configuration errors and the debug output shows the statements being applied.
Check output against expected results
The team builds a small set of representative inputs, including normal records, edge cases such as missing attributes, and records that should be dropped, and compares the debug output with a written expected result for each. Reviewers confirm that no sensitive attribute survives a parse or rename, and that filter conditions match only what was intended. The step is done when every test case matches its expected output, and any mismatch has been fixed and retested.
Measure the cost of the statements before production
The documentation warns that transformations, particularly advanced ones, can significantly affect Collector performance, so the team measures the Collector's CPU and memory with and without the new statements under a load that resembles production. Complex parsing and regular expressions deserve the closest attention. Where a statement is heavy, the team reconsiders whether it can move to an earlier stage, be simplified, or be replaced with a filter. The step is done when the measured overhead is recorded and accepted by the platform owner.
Roll out to production in stages
The change goes to one Collector or one pool first, then to a wider set of Collectors once the first group runs cleanly. Each stage uses the same configuration file reviewed in the test pipeline, deployed through the normal change process. The team keeps the previous configuration available so it can be restored quickly. The step is done when the change runs in every target pool and the rollout log records which version of the configuration is active in each.
Monitor Collector health after each change
After each stage, the operations team watches the Collector's own health signals, such as refused or dropped data, memory use, restarts and exporter errors, and compares them with the baseline taken before the change. They also spot-check the backend to confirm that renamed fields, enrichment and dropped records appear as expected. The step is done when the health signals stay within the agreed baseline for the observation period the team sets, and any regression has been rolled back and written up.
Where transform and filter sit in the pipeline
Place the filter processor as early as the signal allows, and keep the transform processor after the memory_limiter processor. The memory_limiter should run first in every pipeline so it can refuse data when the Collector is under pressure, and the batch processor belongs near the end so it groups data that has already been reduced. Anything dropped before batching never reaches the batch buffer, never costs memory in the queue and never has to be transformed. Because the filter processor drops telemetry that matches any OTTL condition, a rule such as discarding health-check spans or debug logs placed early removes work from every later stage. Confirm the exact processor order your Collector version expects in the Collector configuration docs, since the order you write in the file is the order the processors execute.
The right position also depends on the tier. On an agent next to a workload, transform and filter rules run close to the source, where the data is cheapest to discard, but the agent often lacks Kubernetes or cloud metadata that is added later. At a gateway, the resource attributes from the agents are present, so rules that match on resource.attributes or on service names behave as written, yet the gateway pays the cost of receiving everything first. Enrichment that depends on resource attributes, such as copying a team label from a resource into a log attribute, will fail silently if it runs on an agent that has not yet received that attribute. Before you move a rule between tiers, check which resource attributes exist at that point in your pipeline and test the rule against a sample from each tier.
How telemetry moves through the filter and transform processors
Telemetry enters through a receiver, then passes the memory_limiter before reaching the filter processor, which drops records matching any OTTL condition. Surviving records move to the transform processor, where OTTL statements run in the order written for each signal and add, rename or reshape attributes. The batch processor then groups data before the exporter sends it on. Check the drop point first, because records removed by the filter never reach later statements, and heavy transform statements sit on the hot path for every record.
Data path through a Collector pipeline, showing where records are dropped and enriched.
Security risks when transforming telemetry
Transform and filter statements run inside the Collector, where a single mistake can remove audit evidence, keep secrets in place, or expose the configuration itself. The cards below cover the risks to review before any OTTL change reaches production, and the controls that reduce them.
Filters that drop audit events
A filter condition that matches more than intended silently removes records before they reach the back end. A broad match on a field such as severity_text or a service name can discard authentication failures, privilege changes or admin actions along with routine noise. Before deploying, replay a sample of known security events through the pipeline and confirm each one still arrives. Keep a written list of event types that must never be filtered.
Sensitive values left in place
A set or replace_pattern statement can rename or reshape a field while leaving the sensitive value intact in another attribute, a log body or a span event. Tokens, session identifiers, card numbers and personal data often appear in several places at once. Check each signal type separately, including log bodies, and test with synthetic values that match your real formats. The redaction processor is the dedicated control for removing sensitive attributes, so use it for known fields and keep OTTL for logic it cannot express.
Weak change control on configuration
OTTL statements are code that changes what is kept, dropped and exposed, yet they are often edited directly in a running Collector config. Require review, version control and a recorded approval for every change to transform or filter statements. Keep a rollback path to the previous configuration, and record which version each Collector is running so drift is visible.
Storing configuration securely
Collector configuration often contains exporter credentials, tokens and endpoint addresses, and a copy of it may sit in a repository, a container image or a ConfigMap readable by too many people. Keep secrets out of the file and reference them from a secrets store. Restrict read access to the configuration and encrypt it at rest. Confirm who can read the rendered config in your Kubernetes or VM tooling, since that is the view most often exposed.
Exposed Collector endpoints
Transformations do not change who can reach the Collector's receivers and extensions. Since v0.110.0, server components bind to localhost by default rather than 0.0.0.0, but a configuration that sets a wider bind address reopens them. Check each receiver's endpoint, enable authentication where data arrives from other networks, and confirm the health and debug extensions are not reachable from untrusted segments.
Security best practicesOversized Collector builds
A Collector built with more components than the pipeline needs carries extra code that is never used but still must be patched and reviewed. Use the Collector Builder to include only the receivers, processors and exporters you need, and confirm that transform and filter processors are present only where required. Keep the component list in version control so reviewers can see what each build contains.
Questions buyers ask about OTTL transformation work
What drives the cost of OTTL transformation work?
The main drivers are the number of statements, how many signals they touch (traces, metrics and logs each need their own review), the volume of telemetry flowing through the pipeline, and how much sample data exists to test against. Statements that parse unstructured log bodies or perform lookups usually take more design and test time than simple renames or attribute drops. Compliance review adds cost when redaction or retention rules must be documented and approved. Ask any partner for a quote that lists statements, signals, test cases and review steps separately, and state which items are one-time work and which are ongoing support. DeployOpen does not publish a price list; a quote follows from the written scope.
How long does an OTTL rollout take?
Duration depends on scope: how many pipelines are affected, how many statements must be written and validated, and how quickly your teams can review changes in a non-production Collector. A rollout limited to a few drop rules on one signal is far shorter than a multi-signal enrichment and parsing project that must be measured under production-like load. Ask for a timeline tied to named milestones, such as sample review, staging validation, performance measurement and production rollout, rather than a single overall figure. Figures should come from the written scope and your environment, not from general claims.
What does our team need to provide for transformation work?
Your team needs to supply representative telemetry samples from each source, the current Collector configuration, and a list of fields that must be kept, renamed, enriched or removed. You also need named owners for each signal and each downstream backend, because a dropped attribute can break a dashboard or alert that someone else depends on. Change approval is essential: confirm who signs off on statement changes, how they reach production, and how rollback works. Access to a non-production environment that resembles production traffic is often the difference between a fast validation and a slow one. Agree on these inputs in the written scope before work starts.
Can our in-house team write and maintain OTTL statements?
Often yes, if your engineers already understand the telemetry they handle and have time to test changes. The transform and filter processors use OTTL statements that run in order per signal, so an engineer must understand how an early statement changes the data a later one sees. The skills that are hardest to build in-house are measuring the performance cost of advanced transformations and writing tests that catch silent data loss. A common middle path is to have a partner design the first set of statements and test plan, then have your team own routine changes. Decide this with a skills review of your own staff rather than assuming either outcome.
How do I tell a fixed-scope quote from open-ended work?
A fixed-scope quote names the Collector pipelines in scope, the signals, the list or count of statements, the test approach, the deliverables such as configuration files and runbooks, and the acceptance criteria. Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Open-ended work often appears as hourly time with no defined end point, or as a request to tune transformations until performance is acceptable without agreed measurements. Ask what happens if the sample data differs from what was expected, and how changes requested after sign-off are priced.
How do we keep OTTL statements working after Collector upgrades?
Keep statements in version control, pin the Collector version each environment runs, and read the release notes before every upgrade, since component stability levels are documented in each component's README and can change. Build a regression test set from real sample payloads so that a renamed field or changed function fails in staging rather than in production. Also record which statements are beta, because the transform processor is beta for traces, metrics and logs and may change. Ask any partner how upgrades are tested, who owns them after handover, and whether a retainer covers them. Ongoing support and upgrades are available as retainers.
Could heavy OTTL transformations slow our pipeline?
Yes. The OpenTelemetry documentation warns that transformations, particularly advanced ones, can significantly affect Collector performance. The effect depends on statement complexity, telemetry volume and the Collector's resource limits, so it should be measured rather than assumed. Put filters early to drop data before expensive parsing, keep parsing statements narrow, and test with production-like volume before rollout. Watch the Collector's own metrics for refused data and memory pressure after each change. Ask for the performance test results and the resource profile used during validation as part of any acceptance review.
How DeployOpen scopes and delivers OTTL pipelines
DeployOpen plans, builds and hands over OpenTelemetry Collector transform and filter rules as part of a self-hosted pipeline in infrastructure you control. Each engagement starts from a written scope that names the telemetry, the rules and the back ends they feed.
How we scope
- Inventory which signals, services and attributes the OTTL rules will parse, rename, enrich or drop
- Agree in writing which filter conditions and redactions are in scope and which stay with your teams
- Record the Collector version, distribution and components the rules depend on before work starts
- Define how rule performance will be measured and which pipeline throughput targets apply
How we build
- Write transform and filter statements in the order each signal requires, with a test case for every rule
- Validate OTTL syntax and behavior against representative traces, metrics and logs from a non-production pipeline
- Measure Collector CPU, memory and refused-data signals before and after heavy transformations are added
- Move expensive parsing toward agents or earlier stages where the design and your architecture allow it
How we hand over
- Deliver the Collector configuration files, rule inventory and the reasoning behind each filter and transform
- Document rollback steps, test fixtures and the expected output for each rule so your team can rerun them
- Walk your platform and security engineers through the rules and the performance results
- Provide a written record of which rules changed telemetry content, for review by your compliance team
How we support
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts
- Ongoing support, Collector upgrades and rule changes are available as a retainer
- Retesting after Collector version changes, since OTTL behavior and component stability can shift between releases
- Quotes follow from the written scope, so ask for the rule count, signals and back ends to be itemized

