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

LevelSignals
alphalogs

Internal telemetry

MetricTypeValue typeUnitStabilityEnabledAttributesDescription
processor_drain_clusters_activegaugeint{clusters}developmentyesCurrent number of active clusters in the Drain parse tree.
processor_drain_log_records_annotatedsum (monotonic)int{records}developmentyesNumber of log records successfully annotated with a template.
processor_drain_masks_duplicatessum (monotonic)int{records}developmentyesmask (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

AttributeTypeDescription
maskstringThe mask name that matched more than one position in a single template.

Data

  • JSON (latest): /data/collector/components/contrib-drainprocessor/latest.json
  • JSON (pinned): /data/collector/components/contrib-drainprocessor/contrib-drainprocessor-9b11d387a775.json
  • Explore: /collector/components/contrib/drainprocessor