Skip to content

Commit 0ac1f13

Browse files
elskwidfbogsany
authored andcommitted
Add CONTRIBUTING (#104)
Adds initial contributing guide.
1 parent 374ae0d commit 0ac1f13

File tree

1 file changed

+120
-0
lines changed

1 file changed

+120
-0
lines changed

CONTRIBUTING.md

+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Contributing
2+
3+
We welcome your contributions to this project!
4+
5+
Please read the [OpenTelemetry Contributor Guide][otel-contributor-guide]
6+
for general information on how to contribute including signing the Contributor License Agreement, the Code of Conduct, and Community Expectations.
7+
8+
## Before you begin
9+
10+
### Specifications / Guidelines
11+
12+
As with other OpenTelemetry clients, opentelemetry-ruby follows the
13+
[opentelemetry-specification][otel-specification] and the
14+
[library guidelines][otel-lib-guidelines].
15+
16+
### Focus on Capabilities, Not Structure Compliance
17+
18+
OpenTelemetry is an evolving specification, one where the desires and
19+
use cases are clear, but the method to satisfy those uses cases are not.
20+
21+
As such, Contributions should provide functionality and behavior that
22+
conforms to the specification, but the interface and structure are flexible.
23+
24+
It is preferable to have contributions follow the idioms of the language
25+
rather than conform to specific API names or argument patterns in the spec.
26+
27+
For a deeper discussion, see: https://github.com/open-telemetry/opentelemetry-specification/issues/165
28+
29+
## Getting started
30+
31+
Everyone is welcome to contribute code via GitHub Pull Requests (PRs).
32+
33+
### Fork the repo
34+
35+
Fork the project on GitHub by clicking the `Fork` button at the top of the
36+
repository and clone your fork locally:
37+
38+
```sh
39+
git clone git@github.com:YOUR_GITHUB_NAME/opentelemetry-ruby.git
40+
```
41+
42+
or
43+
```sh
44+
git clone https://github.com/YOUR_GITHUB_NAME/opentelemetry-ruby.git
45+
```
46+
47+
It can be helpful to add the `open-telemetry/opentelemetry-ruby` repo as a
48+
remote so you can track changes (we're adding as `upstream` here):
49+
50+
```sh
51+
git remote add upstream git@github.com:open-telemetry/opentelemetry-ruby.git
52+
```
53+
54+
or
55+
56+
```sh
57+
git remote add upstream https://github.com/open-telemetry/opentelemetry-ruby.git
58+
```
59+
60+
For more detailed information on this workflow read the
61+
[GitHub Workflow][otel-github-workflow].
62+
63+
### Run the tests
64+
65+
_Setting up a running Ruby environment is outside the scope of this document._
66+
67+
This repository contains two Ruby gems:
68+
69+
* `opentelemetry-api`: located at `api/opentelemetry-api.gemspec`
70+
* `opentelemetry-sdk`: located at `sdk/opentelemetry-sdk.gemspec`
71+
72+
Each of these gems has its configuration and tests.
73+
74+
For example, to test the `api` you would:
75+
76+
1. Change directory to `api`
77+
2. Run the tests with ```rake test```
78+
79+
### Make your modifications
80+
81+
Always work in a branch from your fork:
82+
83+
```sh
84+
git checkout -b my-feature-branch
85+
```
86+
87+
### Create a Pull Request
88+
89+
You'll need to create a Pull Request once you've finished your work.
90+
The [Kubernetes GitHub Workflow][kube-github-workflow-pr] document has
91+
a significant section on PRs.
92+
93+
Open the PR against the `open-telemetry/opentelemetry-ruby` repository.
94+
95+
Please put `[WIP]` in the title, or create it as a [`Draft`][github-draft] PR
96+
if the PR is not ready for review.
97+
98+
#### Sign the Contributor License Agreement (CLA)
99+
100+
All PRs are automatically checked for a signed CLA. Your first PR fails this
101+
check if you haven't signed the [CNCF CLA][cncf-cla].
102+
103+
The failed check displays a link to `details` which walks you through the
104+
process. Don't worry it's painless!
105+
106+
### Review and feedback
107+
108+
PRs require a review from one or more of the [code owners](CODEOWNERS) before
109+
merge. You'll probably get some feedback from these fine folks which helps to
110+
make the project that much better. Respond to the feedback and work with your
111+
reviewer(s) to resolve any issues.
112+
113+
114+
[cncf-cla]: https://identity.linuxfoundation.org/projects/cncf
115+
[github-draft]: https://github.blog/2019-02-14-introducing-draft-pull-requests/
116+
[kube-github-workflow-pr]: https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md#7-create-a-pull-request
117+
[otel-contributor-guide]: https://github.com/open-telemetry/community/blob/master/CONTRIBUTING.md
118+
[otel-github-workflow]: https://github.com/open-telemetry/community/blob/master/CONTRIBUTING.md#github-workflow
119+
[otel-lib-guidelines]: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/library-guidelines.md
120+
[otel-specification]: https://github.com/open-telemetry/opentelemetry-specification

0 commit comments

Comments
 (0)