Why the OpenTelemetry filter processor is the first cost lever to pull
Paid telemetry back ends bill for every span, log record and metric point they ingest, so the cheapest data to remove is data nobody reads. Health check probes, verbose debug logs from production services and metric series that no dashboard or alert uses often make up a large share of ingest without adding investigative value. The OpenTelemetry filter processor lets you drop that data inside the Collector before it is exported, so the storage bill never sees it. Before you tune anything, ask your back end vendor which billing unit applies to you (spans, log records, samples or active series) and list the top sources of each by volume, because that list decides where filtering pays off.
The filter processor runs in a Collector pipeline as one step between receivers and exporters. It evaluates OTTL (OpenTelemetry Transformation Language) conditions against spans, log records and metrics, and removes the items that match. This matters because OpenTelemetry is an observability framework and toolkit, not an observability back end, so storage and visualization are handled by separate tools. Filtering in the Collector is therefore the point where you control what leaves your infrastructure, and it works the same way whichever back end receives the data. Confirm in the processor's README on the OpenTelemetry Collector GitHub repository which signals and conditions your Collector distribution supports, because component stability varies across the project.
Use the filter processor before sampling when the data is known to be useless. Sampling keeps a fraction of data that might still be needed, while filtering removes data that has no value in any case, so filtering is the lower-risk first step. Dropping health checks or debug logs rarely changes what your incident responders can see. Sampling decisions can wait until you have measured what remains. Plan a review step before each rule goes live, with the service owner signing off that the dropped data is not used in alerts, audits or troubleshooting runbooks.
Where the filter processor sits in the Collector pipeline
Telemetry starts at instrumented applications and host or cluster sources, enters the Collector through receivers, and passes the filter processor before anything is batched or exported. Dropped records leave the pipeline at that point, while kept records continue to batching and then the exporter that writes to paid storage. Check that the filter runs before the batch processor, because data dropped after batching has already been prepared for export and the savings are smaller than they look.
Filter processor placement between receivers and batching, ahead of export.
Filter processor options and when each fits
This table compares the main choices for filtering telemetry with the OpenTelemetry filter processor: which signal you target, how you match records, whether you drop by exclusion or keep by allowlist, and where in the pipeline the rule runs. Read each row for the trade-off it carries, then check the processor README for the contexts and signal types your Collector build supports before you write any rule.
| Option | Best fit | Trade-off | When to choose it |
|---|---|---|---|
| Filter spans | Health checks, probe requests and noisy internal calls that generate many trace spans | Dropped spans cannot be recovered, and parent or child spans may lose context if a whole trace is cut | When a span pattern is clearly low value and you have confirmed it does not break trace continuity |
| Filter logs | Debug-level logs, repetitive heartbeat messages and known-noisy library output | Log volume falls quickly, but a condition that matches too broadly can hide the error you need during an incident | When log severity or body text reliably separates noise from useful events in your services |
| Filter metrics | Unused metric series, duplicate instruments and labels nobody queries | Dashboards and alerts built on a dropped series fail silently, so inventory consumers first | When a dashboard and alert query search confirms the series has no readers |
| OTTL conditions on resource context | Rules tied to a service, namespace, cluster or host | Broad and cheap to write, but one wrong resource match can drop an entire service's telemetry | When the noise is tied to a workload, such as a single test environment or a sidecar |
| OTTL conditions on span, log or datapoint context | Rules tied to a route, message body, status code or metric name | Precise, but attribute names differ by instrumentation library, so each rule needs testing against real payloads | When the noise is distinguishable by a field inside the record itself |
| Exclusion (drop matching records) | Removing a few well-understood noise patterns from otherwise useful data | Any new noise type passes through unchanged, so volume can creep back after a library upgrade | When your noise catalogue is short and stable and you review new sources regularly |
| Allowlist (keep only listed records) | Strict cost control or regulated environments where only approved telemetry should be stored | Risk of silently losing new signals and needed fields, with higher ongoing maintenance | When the approved set is documented and someone owns updates when services change |
| Filter at the agent | Dropping noise close to the source, before it uses network and buffer capacity | Rules are spread across many agent configs, which makes review and rollout harder | When the noise is specific to one host or node group and you want reduction at the earliest point |
| Filter at the gateway | Central rules applied uniformly to all sources before paid storage | Data still crosses the network and uses gateway memory before it is dropped | When one team owns the policy and consistency across sources matters more than early reduction |
How OTTL conditions decide what gets dropped
The filter processor drops telemetry when an OpenTelemetry Transformation Language (OTTL) condition evaluates to true for an item. Each condition is an expression over the fields of that item: span names and attributes for traces, log bodies and severity for logs, and metric names, data types and datapoint attributes for metrics. The processor evaluates the condition once per item, so the match is only as precise as the fields you reference. Before you write any rule, confirm in the current filter processor documentation which fields and functions your Collector version exposes for each signal, because the available paths and converters differ between releases and component stability levels vary.
A rule that matches one attribute, such as the route of a health check, is narrow and predictable. For example, an illustrative condition might match spans whose http.route attribute equals /healthz. A rule that matches on severity or metric name is broader: a condition such as dropping logs below a severity threshold, or dropping a named metric family, removes every item that fits the pattern, including ones you would want if the environment changed. Start with the narrowest condition that removes the known noise, and widen it only after a sample of dropped items confirms nothing useful was lost. Also validate exact syntax against the current processor documentation, since attribute names and operators in the example above are illustrative, not copied from a release.
Order matters inside a pipeline. Processors run in the sequence listed under the pipeline's processors key, so a filter placed after a transform or attribute processor sees the modified fields, and a filter placed before them sees the originals. If a redaction or attribute step rewrites the field your condition depends on, the rule can silently stop matching. Sampling processors placed before the filter also change what reaches it. Test the full pipeline order, not the filter in isolation, and confirm with the Collector's own telemetry that the expected drop counts appear after each change.
How to roll out filter rules without losing data you need
This sequence moves filter rules from an inventory of noisy telemetry into production gateways in small, verified steps, so each drop is intentional and visible. Each step ends with a check that confirms the rule removed only what was planned.
Inventory the noisiest telemetry first
Start from back-end usage data: which services, log bodies, span names and metric names generate the most billable volume, and which of them nobody queries. Your platform or observability team does this with the storage vendor's usage reports and a sample of raw data from the Collector. Write each candidate as a named category, such as health check spans from a load balancer or debug logs from a specific service. The step is done when every candidate has an owner who confirms it is not needed for alerts, dashboards or audits.
Write rules in a non-production Collector
Add the filter processor to a non-production Collector configuration, using OTTL conditions that match the categories from the inventory. Match on specific attributes, such as the HTTP route for health checks or the severity and scope name for debug logs, rather than broad patterns that could catch error data. Keep each rule in version control with a comment naming the owner and the reason. The step is done when the configuration passes validation and the Collector starts cleanly with the processor in the pipeline.
Run rules against sample traffic with the debug exporter
Send representative traffic through the test Collector and place the debug exporter after the filter processor so you can read what passes. Replay a mix that includes errors, slow requests and the noisy categories, because a rule that looks correct against healthy traffic can still drop failures. Check that the rule removed only the categories it targets. The step is done when a reviewer has read the debug output and confirmed that every dropped item belongs to a category approved in the inventory.
Compare counts before and after the filter
Place the debug exporter or a counting connector before and after the filter processor and compare item counts for each category over the same traffic window. Record the totals in a table alongside the owner's sign-off. Expect the drop counts for targeted categories to match the planned reduction and the counts for everything else to stay unchanged. The step is done when unexpected changes are either explained or fixed by tightening the OTTL condition, then the test is repeated.
Promote rules to a gateway in stages
Deploy the tested configuration to one gateway Collector that receives a limited share of production traffic, then widen the rollout once results hold. Keep the previous configuration available so you can revert quickly. Confirm that the gateway version supports the filter processor and the OTTL functions you used, since component stability varies and is documented per component. The step is done when the gateway runs with the new configuration and the back-end counts for the targeted categories fall as predicted.
Monitor the Collector's own dropped data
Use the Collector's internal telemetry to track how many items the filter processor drops, and alert when that number changes sharply or when unexpected categories appear. Compare the dropped counts with the planned categories every review cycle. The internal metrics show what the Collector discarded, so they are the evidence you need when someone asks whether a rule removed data they needed. The step is done when dashboards and alerts for dropped items exist, owners know where to look, and the first review has been recorded.
Review rules on a fixed schedule
Set a recurring review of every filter rule against current usage data, because services change their log levels, routes and metric names over time. Remove rules that no longer match anything and add rules for new noise found in back-end reports. Confirm the review with the owners who signed off the original inventory. The step is done when the review produces a dated change record in version control and the next review date is assigned to a named owner.
Testing rules safely before they reach production
A filter rule can silently remove the telemetry you need during an incident, so each rule should be proven on realistic traffic before it touches paid storage. The cards below cover the checks and ownership that keep a filter change reversible and measurable.
Replay representative traffic in staging
Run the candidate filter configuration in a staging Collector fed with recorded or mirrored traffic from a normal business day and from a peak or incident period. Confirm that the health check spans, debug logs and metrics you intend to drop are the ones you expected to match, and that error spans, warning logs and business-critical metrics still arrive. Compare counts before and after the rule, and treat any unexpected drop as a failed test. Ask your team which signals they relied on during the last major incident, because those are the cases a replay should include.
Shadow the rule before enforcing it
Add the filter in a parallel pipeline that uses the same receivers but exports matched data to a debug destination, such as the debug exporter or a scratch file store, instead of production storage. Review what would have been removed for a fixed period before moving the rule into the live pipeline. This shows real match rates on production data without changing what your teams see. Keep the shadow pipeline running only as long as needed, since it doubles export work.
Watch the Collector's dropped counts
The Collector exposes internal metrics that count data the processor discards, so confirm the filter is dropping what you intended and nothing else. Set an alert on an unexpected rise in dropped items for each signal after a rule change, and compare the dropped totals against the volume you expected from the replay. Check the Collector's own health metrics as well, since a rule that matches more than expected can shift load onto downstream components. Document the metric names your version exposes, because they vary by release.
Keep a versioned rollback config
Store every filter configuration in version control alongside the previous working version, and deploy through the same review path as other Collector changes. A rollback should be a revert and a redeploy of the prior file, not a manual edit under pressure during an incident. Tag the release that introduced each rule so you can identify which change removed a given signal. Test the rollback in staging at least once, so the team knows how long the revert takes in your environment.
Assign an owner to each rule
Record a named owner, the reason for the rule, the signal and attributes it matches, and the date it was last reviewed, in a comment or companion file next to the configuration. Owners answer questions when a dashboard goes blank and decide whether a rule still applies after a service changes its logging. Review ownership during planned Collector upgrades, since component behavior and OTTL syntax can change between releases. Rules without an owner are the first candidates for removal.
How to measure the savings from dropped telemetry
Start by baselining before any filter rule goes live. For each signal (traces, metrics and logs), record the volume your Collector receives, the volume it exports to each back end, and the billed units your back end reports for the same period. Ingest volume measured at the Collector shows what the filter processor removes, while the back-end bill shows what you actually pay for. Take the baseline over a full business cycle, since weekday traffic, batch jobs and release weeks can distort a short window. Confirm with the vendor exactly what is billed: ingested bytes, indexed events, active series, span counts, retained days or query volume. Each pricing model responds differently to the same drop, so a rule that cuts 30 percent of log lines may cut the bill by much less, or by much more, depending on the unit.
Repeat the same measurement after the change, using the same signal, time window and billing unit. Compare the Collector's receiver counts with its exporter counts for the filter processor's pipeline, and confirm that dropped items match the rule you intended. The Collector's own internal telemetry can report these counts, and the exact metric names depend on your Collector version, so confirm them against the release you run. Then check whether the savings are real. Volume often moves rather than disappears: health check spans may reappear as a new metric series, or debug logs may be rerouted by another exporter to a cheaper archive. Count every exporter in the pipeline, not only the primary back end, and treat volume sent to a second destination as a cost to be priced, not as savings.
Keep the measurement tied to the rule set. Record which filter conditions were active on each date, and keep the configuration under version control so you can explain any change in the numbers later. Ask your back-end vendor whether discounted tiers, committed-use contracts or minimum charges affect how a reduction shows up on invoices, since a lower volume may not lower the bill until a contract period ends. Finally, document the result as a before and after table per signal, with the billing unit named, so that finance, security and platform teams read the same figures. Savings figures should come from your own measurements in your own environment, not from general estimates.
Security and operational risks of dropping data
Filtering telemetry removes evidence as well as noise. The cards below cover the ways a filter rule can hide security events or incidents, and the controls that keep those rules reviewable, protected and safe to run. Each risk is paired with a check the team can put in place before the rule reaches production.
Dropping authentication events by mistake
A broad condition such as matching on a log body or a service name can match login, token refresh and privilege change events along with the debug noise you meant to remove. Authentication logs are often the only record of account misuse, so an accidental drop can erase evidence of an intrusion. Before deploying, run each condition against a sample of real authentication logs and confirm that none match. Keep a separate allowlist of security-relevant event names that the filter must never drop.
Health checks that hide failures
Dropping health check spans is a common saving, but a rule keyed only to the URL path can also drop failing checks, timeouts and status codes that signal a broken dependency. If those signals disappear, dashboards and alerts can show a quiet system during an outage. Filter on the request path and a successful status code together, and keep error-status checks flowing. Confirm that alerts still fire when a dependency is stopped in a test environment.
Unprotected filter configuration files
Filter rules are configuration, and the Collector configuration may also hold exporter endpoints, tokens and other credentials. Anyone who can edit the file can silently remove data from future collection. Store the configuration in version control with reviewed merges, restrict write access to the platform team, and keep credentials out of the file by referencing secrets. OpenTelemetry's security guidance recommends storing Collector configuration securely and encrypting and authenticating its inputs.
Collector security practicesLocalhost binding and exposed endpoints
Since Collector v0.110.0, server components bind to localhost by default rather than 0.0.0.0. Teams that override this to accept telemetry from other hosts, or copy older examples that bind widely, can expose receivers and debug endpoints to the network. Set receiver endpoints deliberately, restrict them with network policy or firewall rules, and add authentication where data crosses a trust boundary. Review the effective configuration after every upgrade.
Collector security practicesSilent drops without an audit trail
A filter that removes data does so without a record unless you add one, so later investigators may not know that data was ever discarded. Record each rule's name, owner and approval in the change log, and track the count of dropped items with the Collector's own metrics. Review those counts after each change so an unexpected spike in drops prompts investigation rather than going unnoticed.
Sensitive data in kept telemetry
Filtering reduces volume but does not remove personal or secret values from the records that remain. Before a rule keeps a log line, check whether its attributes contain tokens, session identifiers or personal data, and use the redaction processor to strip them. Test the redaction rules on sample payloads alongside the filter conditions, so the two processors together leave no regulated values behind.
Collector configuration docsQuestions teams ask before dropping telemetry
How much effort does a filter rollout take, and what drives it?
Effort depends mostly on how many noisy sources exist, how many teams own them, and how many rules must be written and verified. A rollout that targets a handful of known sources, such as health check endpoints and one debug log stream, is usually a small change. Effort grows when telemetry comes from many services with different naming, when the same attribute means different things in different teams, or when someone must confirm that a dropped signal is not needed for an incident or an audit. Each rule needs a test against real samples, a staged rollout, and a check on the back-end bill afterward. Ask any partner to split the quote into discovery, rule authoring, staging validation, production rollout and measurement, so you can see which part your own team could absorb.
Can our in-house team write and test filter rules themselves?
Often yes, if the team already runs Collector pipelines and knows the telemetry it produces. The filter processor uses OTTL conditions in the Collector configuration, so engineers who can read YAML and write simple expressions can start with well-understood sources. The harder parts are judgment calls: deciding which logs are safe to drop, knowing which dashboards or alerts depend on a metric, and recognizing when a rule matches more than intended. Teams without an existing Collector or without someone who owns telemetry standards often find the rollout takes longer than expected. A useful test is whether someone on the team can explain, for each rule, what it removes and who agreed to losing it.
What does the work need from our team?
The work needs three things from your side. First, representative sample data from the sources you want to reduce, ideally exported from a staging environment, so rules can be tested before they touch production. Second, your back-end bills or usage reports for the signals in question, so the savings can be measured against a baseline. Third, a staging Collector that receives the same traffic shape as production and forwards to a non-production back end or a copy of the current one. Owners of dashboards, alerts and incident runbooks must also review which fields they rely on. Ask your partner to list these inputs in the written scope so access requests start early.
How long does a filter rollout take, and what depends on it?
Duration depends on the number of sources, the number of owners who must sign off, and how quickly you can run a staging Collector against realistic traffic. Changes that are reviewed in one team and applied to a single pipeline move faster than changes that touch shared gateways or several business units. Waiting for sample data, access to back-end usage reports, and a change window for the production Collector are common delays. Your partner should give you a timeline only after the scope is agreed in writing, because the timeline follows from the number of rules and approvals. Ask for milestones tied to each rule group so you can see progress before the full rollout is complete.
How does filtering differ from sampling?
Filtering removes data according to a condition you write, so a matched item never reaches the back end. Sampling keeps a share of items, chosen by probability or by policy, and drops the rest. A filter rule for GET /healthz removes every such span, which is appropriate when that data has no diagnostic value. Sampling is better suited to high-volume traces where you want a representative subset, such as keeping a fraction of successful requests while retaining every error. Filtering is deterministic and easy to explain to auditors, but it can remove data you later need if the condition is too broad. Sampling reduces volume across many signals but makes individual requests harder to reconstruct. Most teams use filtering first for clearly useless data and sampling for the remaining volume.
When should we bring in a partner for telemetry filtering?
Bring in a partner when the rollout crosses team boundaries, when rules could remove data that auditors, security teams or incident responders depend on, or when no one on your team has time to own the test and measurement work. A partner is also useful when you run several Collector tiers, when the back-end bill is hard to attribute to specific sources, or when you need documented evidence of what was dropped and why. Ask for a written scope that names the sources, the test method, the staging environment, the rollout steps, and how savings will be measured. The Collector is open source under Apache-2.0, so licensing does not change the decision. The deciding factors are internal capacity and the cost of a mistake.
Could dropping telemetry create compliance or audit gaps?
It can, if the dropped data is evidence that a control operates. Before removing logs or traces, check whether any logging, monitoring or retention requirement in your framework depends on them. Access events, security-relevant logs and records needed for incident reconstruction should be reviewed by the compliance and security owners before any rule targets them. Document each rule with its owner, its reason and the date it was approved, so the change history can be shown to an auditor. DeployOpen prepares systems and evidence for compliance assessments, but auditors and certification bodies issue the reports, so confirm your framework's expectations with them.
How DeployOpen scopes and delivers filter processor work
DeployOpen starts filter processor work from a written scope that names the telemetry sources, the pipelines and back ends involved, the categories of data to drop (such as health check traces, debug-level logs and unused metric families), and the deliverables. Most engagements are fixed-scope, so the scope, deliverables and timeline are agreed in writing before any configuration changes. Ask for the scope to state which Collector deployment is in view, which environments are covered and who on your side approves rule changes, because those answers decide how much review and testing the work needs.
Before writing any rule, the team reviews your current telemetry volumes and the rules your engineers already rely on with your platform, application and security teams. The aim is to confirm which data is truly noise, which data is needed for incident response or compliance evidence, and which dashboards and alerts read the fields a filter might remove. Your teams should expect to supply pipeline configuration, recent volume reports from your back end and a list of owners for each service. Ask for this review to produce a written inventory of proposed drop rules with the reason each one exists.
DeployOpen then implements and tests the filter configuration inside your infrastructure, using your own Collector deployment and your staging environment before production. Testing covers the OTTL conditions against representative sample data, confirmation that protected signals still arrive, and a before-and-after comparison of ingested volume. Documentation covers the rule set, the rollback steps and the measurement method, and optional retainers can cover rule reviews as services change. Confirm with the team who will own the rules after handover, since a filter that nobody maintains tends to drop data that a later release starts emitting.

