[chore][fileprovider] Add README file (#12506)

<!--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 file 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.
This commit is contained in:
Evan Bradley 2025-02-27 07:44:11 -05:00 committed by GitHub
parent de6a7d1549
commit 1c683a1da1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 38 additions and 2 deletions

View File

@ -0,0 +1,27 @@
# File Provider
<!-- status autogenerated section -->
| Status | |
| ------------- |-----------|
| Stability | [stable] |
| Distributions | [core], [contrib], [k8s], [otlp] |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector?query=is%3Aissue%20is%3Aopen%20label%3Aprovider%2Ffileprovider%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aopen+is%3Aissue+label%3Aprovider%2Ffileprovider) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector?query=is%3Aissue%20is%3Aclosed%20label%3Aprovider%2Ffileprovider%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aclosed+is%3Aissue+label%3Aprovider%2Ffileprovider) |
[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 -->
## Overview
The File Provider takes paths to files and reads their contents as YAML to provide configuration to the Collector.
## Usage
The scheme for this provider is `file`. Usage looks like the following:
```text
file:/path/to/file.yaml
```

View File

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

View File

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

View File

@ -1,6 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
//go:generate mdatagen metadata.yaml
package fileprovider // import "go.opentelemetry.io/collector/confmap/provider/fileprovider"
import (