Published

Cut Datadog Ingestion Costs with a Measured OpenTelemetry Filter Pilot

A bounded Collector filter example, fixture matrix and rollout procedure for reducing low-value logs before ingestion without hiding operational failures.

Working through this in your own environment? See the scope of a telemetry audit.

Before a migration, find one expensive stream with a clear operational contract. Successful health-check logs from a known source are often a useful pilot. Failed checks, security logs and records with missing context need to remain visible until their consumers have been reviewed.

The Collector filter processor evaluates drop conditions. A matching record is removed. Its current documentation uses log_conditions with explicit context prefixes for version 0.146.0 and later; confirm the syntax against the exact distribution and version you run.

Begin with a single approved source

This processor fragment illustrates one narrow policy. It is not a complete Collector configuration and does not configure an exporter, credentials or transport security. It assumes your source provides a numeric http.response.status_code and a normalized http.route.

processors:
  filter/approved_health_checks:
    error_mode: ignore
    log_conditions:
      - 'resource.attributes["service.name"] == "edge-api" and log.attributes["http.route"] == "/healthz" and log.attributes["http.response.status_code"] == 200'

Enable the processor only in the agreed logs pipeline, ahead of its exporter. Keep production receiver authentication, memory limits, batch settings and retry controls in the reviewed gateway configuration. See the gateway architecture guide for the surrounding design.

The example deliberately avoids a rule that drops every low-severity record. A global severity filter can erase useful audit events and incident breadcrumbs. Inspect your actual attributes before choosing a predicate.

Validate the rule against fixtures

Test inputExpected result
edge-api, /healthz, numeric 200Dropped by the approved policy
edge-api, /healthz, numeric 503Retained
edge-api, /checkout, numeric 200Retained
Another service, /healthz, numeric 200Retained
Missing route or statusRetained; investigate instrumentation coverage
Status encoded as a stringRetained under this numeric predicate; normalize deliberately

Run these cases against the pinned Collector binary. Validate configuration startup, then send fixture records through a debug destination in a sandbox. Record the observed outputs. Avoid enabling verbose telemetry-body logging on real customer traffic.

The processor’s ignore error mode keeps processing despite evaluation errors; it is not proof that a rule executed correctly. Monitor processor errors and distinguish deliberate filtering from queue loss, exporter failure or collector restarts.

Measure usage and contract effects separately

Record incoming records and bytes, filtered records, exported volume, exporter errors and queue health for matched before / after windows. Compare the same services, traffic patterns and retention policy. Then run the agreed alert and incident-query checks against the retained data.

A reduction in exported bytes is not necessarily a proportional reduction in the invoice. Ingestion, indexing, retention, commitments and overages can have different billing mechanics. Use your actual Datadog usage and pricing information and the current contract to calculate the marginal cost that changes. The billing audit checklist helps separate those inputs.

Treat cardinality as a separate change

A log filter does not solve a metric series explosion. Removing an identifier from metric datapoints can also collapse distinct series into identical identities, requiring a deliberate aggregation strategy. Review instrumentation and series identity before applying a broad attribute-removal rule. The official telemetry transformation guidance is a starting point for selecting the appropriate processor.

Make rollback part of acceptance

Keep the last configuration revision, define the exact coverage checks and restore the previous processor list if an agreed query fails. Expand only after the pilot has stable measurements and an operational owner.

For implementation help, the observability sprint scopes one backend, up to three sources and a reversible pilot. It starts with usage evidence, not a savings percentage.

Browse all writing · RSS feed

Tymur Chmeruk

Written by

Tymur Chmeruk

Cloud Security & Infrastructure Engineer · Baltimore–Washington Metro · [email protected]