Files
Evan BradleyandGitHub 630eade94a [envprovider] Add README file (#12499)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Use mdatagen for the env provider. This switches the package test to be
generated and adds an autogenerated section to the readme.

I've also populated the readme with basic usage information.

<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/12465
2025-02-26 16:55:31 +00:00

2.0 KiB

Environment Variable Provider

Status
Stability stable
Distributions core, contrib, k8s, otlp
Issues Open issues Closed issues

Usage

The scheme for this provider is env. Usage looks like the following:

env:NAME_OF_ENVIRONMENT_VARIABLE

To use default values when the environment variable has not been set, you can include a suffix to specify it:

env:NAME_OF_ENVIRONMENT_VARIABLE:-default_value

Environment variables must match the following regular expression. That is, they must be at least one character, start with a letter or underscore, and can only include letters, numbers, and underscores.

^[a-zA-Z_][a-zA-Z0-9_]*$