Skip to main content
Filter spans, metrics, and logs using the filter processor for the OpenTelemetry Collector. The filter processor for the OpenTelemetry (OTel) Collector filters telemetry based on conditions you provide. If you have instrumentations creating a lot of unneeded signals, the filter processor is a great way to reduce this noisy, noncritical data.
The filter processor is included in the Core, Contrib, and Kubernetes distributions of the Collector.

Filter Conditions

You can use the OpenTelemetry Transformation Language (OTTL) to create filtering conditions for different types of telemetry. If any condition is met, the telemetry is dropped. If there are multiple conditions, each condition is ORed together.
Honeycomb currently translates all fields with the instrumentation_scope.name field into library.name. To filter based on the value of an instrumentation scope, use instrumentation_scope.name instead of library.name.

Get Started

To use the filter processor, add the filter component as a processor in your OTel Collector configuration file:
Then add the filter processor to a compatible pipeline:
An example Collector configuration:

Examples

Here are some example configurations for filtering spans, metrics, and logs. You can find more examples in the filter processor repository. An example with filters for each type:

Filter Spans

Drop spans based on a resource attribute:

Filter Span Events

Drop span events based on attribute and span event name:

Filter Metrics

Drop metrics with an invalid type:
Drop metrics based on name and value:
Drop metrics based on attribute key with the filter processor’s HasAttrKeyOnDatapoint() function:
Drop metrics with a given attribute and given value using the filter processor’s HasAttrOnDataPoint() function:

Filter Logs

Drop logs based on log body or log severity: