Skip to content

Commit

Permalink
Add instructions in CONTRIBUTING.md on how to contribute new metrics (o…
Browse files Browse the repository at this point in the history
…pen-telemetry#11043)

* Add Instructions For New Metrics

Added detailed steps to add new metrics for receiver.

* Apply suggestions from code review

Co-authored-by: Alex Boten <[email protected]>

* Add note that these change only applies to existing receivers

* Update CONTRIBUTING.md

Co-authored-by: Alex Boten <[email protected]>

* add links to  what we already have

Co-authored-by: Alex Boten <[email protected]>
  • Loading branch information
singku and codeboten committed Jun 17, 2022
1 parent 3dfc7ad commit 2f9acf4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ The following GitHub users are the currently available sponsors, either by being
* [@djaglowski](https://github.com/djaglowski)

Whenever a sponsor is picked from the top of this list, please move them to the bottom.

## Adding metrics to existing receivers
Following these steps for contributing additional metrics to existing receivers.
- Read instructions [here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#fork) on how to
fork, build and create PRs. The only difference is to change repository name from `opentelemetry-collector` to `opentelemetry-collector-contrib`
- Edit `metadata.yaml` of your metrics receiver to add new metrics, e.g.: `redisreceiver/metadata.yaml`
- To generate new metrics on top of this updated YAML file.
- Run `cd receiver/redisreceiver`
- Run `go generate ./...`
- Review the changed files and merge the changes into your forked repo.
- Create PR from Github web console following the instructions above.

## General Recommendations
Below are some recommendations that apply to typical components. These are not rigid rules and there are exceptions but
in general try to follow them.
Expand Down

0 comments on commit 2f9acf4

Please sign in to comment.