-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 #12465
- Loading branch information
1 parent
58f3efb
commit e6b1e92
Showing
4 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Environment Variable Provider | ||
|
||
<!-- status autogenerated section --> | ||
| Status | | | ||
| ------------- |-----------| | ||
| Stability | [stable] | | ||
| Distributions | [core], [contrib], [k8s], [otlp] | | ||
| Issues | [](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aopen+is%3Aissue+label%3Aprovider%2Fenvprovider) [](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aclosed+is%3Aissue+label%3Aprovider%2Fenvprovider) | | ||
|
||
[stable]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#stable | ||
[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol | ||
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib | ||
[k8s]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s | ||
[otlp]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-otlp | ||
<!-- end autogenerated section --> | ||
|
||
## Usage | ||
|
||
The scheme for this provider is `env`. Usage looks like the following: | ||
|
||
```text | ||
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: | ||
|
||
```text | ||
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. | ||
|
||
```text | ||
^[a-zA-Z_][a-zA-Z0-9_]*$ | ||
``` |
3 changes: 1 addition & 2 deletions
3
confmap/provider/envprovider/package_test.go → ...der/envprovider/generated_package_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type: env | ||
github_project: open-telemetry/opentelemetry-collector | ||
|
||
status: | ||
class: provider | ||
stability: | ||
stable: [provider] | ||
distributions: [core, contrib, k8s, otlp] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters