Skip to content

Commit

Permalink
Add some doku, examples and example names
Browse files Browse the repository at this point in the history
  • Loading branch information
voxel01 committed Nov 24, 2023
1 parent de96556 commit 49e7ee5
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 9 deletions.
32 changes: 28 additions & 4 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,20 @@ Create a OpenTelemetry Collector exporter in the configuration file.

#### Examples

#####
##### Basic usage

```puppet
otelcol::exporter { 'namevar': }
```

##### Define a exporter and attach it to a pipeline

```puppet
otelcol::exporter { 'prometheus':
pipelines => ['metrics'],
}
```

#### Parameters

The following parameters are available in the `otelcol::exporter` defined type:
Expand Down Expand Up @@ -327,7 +335,7 @@ Add an extension to the OpenTelemetry Collector configuration

#### Examples

#####
##### Basic usage

```puppet
otelcol::extension { 'namevar': }
Expand Down Expand Up @@ -369,7 +377,7 @@ configured by its Components.

#### Examples

#####
##### Configure a pipeline

```puppet
otelcol::pipeline { 'namevar': }
Expand Down Expand Up @@ -409,12 +417,20 @@ Add a processor to the OpenTelemetry Collector configuration

#### Examples

#####
##### Basic usage

```puppet
otelcol::processor { 'namevar': }
```

##### Define a processor and attach it to a pipeline

```puppet
otelcol::processor { 'batch':
pipelines => ['metrics'],
}
```

#### Parameters

The following parameters are available in the `otelcol::processor` defined type:
Expand Down Expand Up @@ -464,6 +480,14 @@ Add a receiver to the OpenTelemetry Collector configuration
otelcol::receiver { 'namevar': }
```

##### Define a receiver and attach it to a pipeline

```puppet
otelcol::receiver { 'otlp':
pipelines => ['metrics'],
}
```

#### Parameters

The following parameters are available in the `otelcol::receiver` defined type:
Expand Down
2 changes: 1 addition & 1 deletion manifests/component.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# @param pipelines
# The pipelines to add the component to
#
# @example
# @example Basic Usage
# otelcol::component { 'receiver_name-receiver':':
# component_name => 'receiver_name',
# type => 'receiver',
Expand Down
6 changes: 5 additions & 1 deletion manifests/exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
# The order of the exporter.
# @param pipelines
# The pipelines to attach the exporter to.
# @example
# @example Basic usage
# otelcol::exporter { 'namevar': }
# @example Define a exporter and attach it to a pipeline
# otelcol::exporter { 'prometheus':
# pipelines => ['metrics'],
# }
define otelcol::exporter (
Hash $config = {},
Integer[0,999] $order = 0,
Expand Down
2 changes: 1 addition & 1 deletion manifests/extension.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# @param order
# The order in which the extension should be loaded
#
# @example
# @example Basic usage
# otelcol::extension { 'namevar': }
define otelcol::extension (
Hash $config = {},
Expand Down
2 changes: 1 addition & 1 deletion manifests/pipeline.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# The configuration for the pipeline.
# @param order
# The order in which the pipeline should be configured.
# @example
# @example Configure a pipeline
# otelcol::pipeline { 'namevar': }
define otelcol::pipeline (
Hash $config = {},
Expand Down
6 changes: 5 additions & 1 deletion manifests/processor.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
# @param pipelines
# The pipelines to attach the processor to
#
# @example
# @example Basic usage
# otelcol::processor { 'namevar': }
# @example Define a processor and attach it to a pipeline
# otelcol::processor { 'batch':
# pipelines => ['metrics'],
# }
define otelcol::processor (
Hash $config = {},
Integer[0,999] $order = 0,
Expand Down
4 changes: 4 additions & 0 deletions manifests/receiver.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
# The pipelines the receiver is part of
# @example basic receiver
# otelcol::receiver { 'namevar': }
# @example Define a receiver and attach it to a pipeline
# otelcol::receiver { 'otlp':
# pipelines => ['metrics'],
# }
define otelcol::receiver (
Hash $config = {},
Integer[0,999] $order = 0,
Expand Down

0 comments on commit 49e7ee5

Please sign in to comment.