Skip to content

Commit 1a0ccdf

Browse files
authored
[chore][yamlprovider] Add README file (#12516)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Add a README for the YAML file with an mdatagen autogenerated section and basic usage information.
1 parent 273742a commit 1a0ccdf

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# YAML Provider
2+
3+
<!-- status autogenerated section -->
4+
| Status | |
5+
| ------------- |-----------|
6+
| Stability | [stable] |
7+
| Distributions | [core], [contrib], [k8s] |
8+
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector?query=is%3Aissue%20is%3Aopen%20label%3Aprovider%2Fyamlprovider%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aopen+is%3Aissue+label%3Aprovider%2Fyamlprovider) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector?query=is%3Aissue%20is%3Aclosed%20label%3Aprovider%2Fyamlprovider%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aclosed+is%3Aissue+label%3Aprovider%2Fyamlprovider) |
9+
10+
[stable]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#stable
11+
[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol
12+
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
13+
[k8s]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s
14+
<!-- end autogenerated section -->
15+
16+
## Overview
17+
18+
The YAML Provider takes a literal YAML string as Collector configuration.
19+
20+
## Usage
21+
22+
The scheme for this provider is `yaml`. Usage looks like the following passed to the Collector's command line invocation:
23+
24+
```text
25+
--config=yaml:processors::batch::timeout: 2s
26+
```

confmap/provider/yamlprovider/package_test.go confmap/provider/yamlprovider/generated_package_test.go

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
type: yaml
2+
github_project: open-telemetry/opentelemetry-collector
3+
4+
status:
5+
class: provider
6+
stability:
7+
stable: [provider]
8+
distributions: [core, contrib, k8s]

confmap/provider/yamlprovider/provider.go

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
package yamlprovider // import "go.opentelemetry.io/collector/confmap/provider/yamlprovider"
55

6+
//go:generate mdatagen metadata.yaml
7+
68
import (
79
"context"
810
"fmt"

0 commit comments

Comments
 (0)