Defined Type: otelcol::pipeline

Defined in:
manifests/pipeline.pp

Summary

Add a pipeline to the OpenTelemetry Collector configuration

Overview

Used for explicitly configuring a pipeline in the OpenTelemetry Collector. This is useful for configuring a pipeline that is not automatically configured by its Components.

Examples:

Configure a pipeline

otelcol::pipeline { 'namevar': }

Parameters:

  • name

    The name of the pipeline to configure.

  • config (Hash) (defaults to: {})

    The configuration for the pipeline.

  • order (Integer[0,999]) (defaults to: 0)

    The order in which the pipeline should be configured.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'manifests/pipeline.pp', line 15

define otelcol::pipeline (
  Hash $config = {},
  Integer[0,999] $order = 0,
) {
  $component = {
    'service' => {
      'pipelines' => {
        $name => $config,
      },
    },
  }
  $real_order = 5000+$order
  concat::fragment { "otelcol-config-pipeline-${name}" :
    target  => 'otelcol-config',
    order   => $real_order,
    content => stdlib::to_yaml($component),
  }
}