[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.
This commit is contained in:
Evan Bradley 2025-02-27 09:57:55 -05:00 committed by GitHub
parent 273742a419
commit 1a0ccdfa35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 37 additions and 2 deletions

View File

@ -0,0 +1,26 @@
# YAML Provider
<!-- status autogenerated section -->
| Status | |
| ------------- |-----------|
| Stability | [stable] |
| Distributions | [core], [contrib], [k8s] |
| 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) |
[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
<!-- end autogenerated section -->
## Overview
The YAML Provider takes a literal YAML string as Collector configuration.
## Usage
The scheme for this provider is `yaml`. Usage looks like the following passed to the Collector's command line invocation:
```text
--config=yaml:processors::batch::timeout: 2s
```

View File

@ -1,5 +1,4 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
// Code generated by mdatagen. DO NOT EDIT.
package yamlprovider

View File

@ -0,0 +1,8 @@
type: yaml
github_project: open-telemetry/opentelemetry-collector
status:
class: provider
stability:
stable: [provider]
distributions: [core, contrib, k8s]

View File

@ -3,6 +3,8 @@
package yamlprovider // import "go.opentelemetry.io/collector/confmap/provider/yamlprovider"
//go:generate mdatagen metadata.yaml
import (
"context"
"fmt"