Skip to content

Commit

Permalink
Add explanation of double colons to Collector config page (#4524)
Browse files Browse the repository at this point in the history
Co-authored-by: Severin Neumann <[email protected]>
  • Loading branch information
tiffany76 and svrnm authored May 23, 2024
1 parent 1ca30b4 commit 2001473
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions content/en/docs/collector/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,22 @@ example:
otelcol --config=customconfig.yaml
```

You can also provide configurations using environment variables, YAML paths, or
HTTP URIs. For example:
You can also provide configurations using environment variables, HTTP URIs, or
YAML paths. For example:

```shell
otelcol --config=env:MY_CONFIG_IN_AN_ENVVAR --config=https://server/config.yaml
otelcol --config="yaml:exporters::debug::verbosity: normal"
```

{{% alert title="Tip" color="primary" %}}

When referring to nested keys in YAML paths, make sure to use double colons (::)
to avoid confusion with namespaces that contain dots. For example:
`receivers::docker_stats::metrics::container.cpu.utilization::enabled: false`.

{{% /alert %}}

To validate a configuration file, use the `validate` command. For example:

```shell
Expand Down

0 comments on commit 2001473

Please sign in to comment.