This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/collector/components/contrib/drainprocessor.md.
Drain Processor
OpenTelemetry Collector processor · contrib distribution
The Drain Processor applies the Drain log clustering algorithm to log records as they pass through the pipeline, deriving a template string (e.g. "user <*> logged in from <*>") and attaching it as an attribute on each record.
- Component ID:
contrib-drainprocessor - Name:
drainprocessor - Type: processor
- Distribution: contrib
- Repository:
opentelemetry-collector-contrib
Stability
Internal telemetry
| Metric | Type | Value type | Unit | Stability | Enabled | Attributes | Description |
|---|
processor_drain_clusters_active | gauge | int | {clusters} | development | yes | | Current number of active clusters in the Drain parse tree. |
processor_drain_log_records_annotated | sum (monotonic) | int | {records} | development | yes | | Number of log records successfully annotated with a template. |
processor_drain_masks_duplicates | sum (monotonic) | int | {records} | development | yes | mask (string) | Number of records where a mask name matched more than one position in the matched template. Incremented once per record per duplicated mask name; the losing values are discarded and first-match wins. |
Attributes
| Attribute | Type | Description |
|---|
mask | string | The mask name that matched more than one position in a single template. |
Data