Skip to main content

Logdedup Processor

Status Available in: contrib, k8s Maintainers: @MikeGoldsmith Source: opentelemetry-collector-contrib

Supported Telemetry

Logs

Overview

How It Works

  1. The user configures the log deduplication processor in the desired logs pipeline.
  2. If the processor does not provide conditions, all logs are considered eligible for aggregation. If the processor does have configured conditions, all log entries where at least one of the conditions evaluates true are considered eligible for aggregation. Eligible identical logs are aggregated over the configured interval. Logs are considered identical if they have the same body, resource attributes, severity, and log attributes. Logs that do not match any condition in conditions are passed onward in the pipeline without aggregating.
  3. After the interval, the processor emits a single log with the count of logs that were deduplicated. The emitted log will have the same body, resource attributes, severity, and log attributes as the original log. The emitted log will also have the following new attributes:
    • log_count: The count of logs that were deduplicated over the interval. The name of the attribute is configurable via the log_count_attribute parameter.
    • first_observed_timestamp: The timestamp of the first log that was observed during the aggregation interval.
    • last_observed_timestamp: The timestamp of the last log that was observed during the aggregation interval.
Note: The ObservedTimestamp and Timestamp of the emitted log will be the time that the aggregated log was emitted and will not be the same as the ObservedTimestamp and Timestamp of the original logs.

Configuration

Note: The processor type has been renamed from logdedup to log_dedup. The old name is still accepted but will log a deprecation warning.

Example Config

The following config is an example configuration for the log deduplication processor. It is configured with an aggregation interval of 60 seconds, a timezone of America/Los_Angeles, and a log count attribute of dedup_count. It has no fields being excluded.

Example Config with Excluded Fields

The following config is an example configuration that excludes the following fields from being considered when searching for duplicate logs:
  • timestamp field from the body
  • host.name field from attributes
  • ip nested attribute inside a map attribute named src

Example Config with Include Fields

This example demonstrates a configuration where deduplication is applied to telemetry based on specified fields. Only logs with the same values for the fields defined in the include_fields parameter are deduplicated:

Example Config with Conditions

The following config is an example configuration that only performs the deduping process on telemetry where Attribute ID equals 1 OR where Resource Attribute service.name equals my-service:

Last generated: 2026-08-24