mirror of
https://github.com/hanzoai/telemetry.git
synced 2026-10-30 20:01:49 +00:00
<!--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
2.0 KiB
2.0 KiB
Environment Variable Provider
| Status | |
|---|---|
| Stability | stable |
| Distributions | core, contrib, k8s, otlp |
| 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_]*$