1 # Contributing to opentelemetry-cpp
3 The OpenTelemetry C/C++ special interest group (SIG) meets regularly. See the
4 OpenTelemetry [community](https://github.com/open-telemetry/community#cc-sdk)
5 repo for information on this and other language SIGs.
7 See the [public meeting
8 notes](https://docs.google.com/document/d/1i1E4-_y4uJ083lCutKGDhkpi3n4_e774SBLi9hPLocw/edit)
9 for a summary description of past meetings. To request edit access, join the
10 meeting or get in touch on
11 [Slack](https://cloud-native.slack.com/archives/C01N3AT62SJ).
13 See the [community membership
14 document](https://github.com/open-telemetry/community/blob/main/community-membership.md)
16 [**Member**](https://github.com/open-telemetry/community/blob/main/community-membership.md#member),
17 [**Approver**](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
19 [**Maintainer**](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).
23 OpenTelemetry C++ uses the [Google naming
24 convention](https://google.github.io/styleguide/cppguide.html#Naming).
26 Code is formatted automatically and enforced by CI.
28 ### Build and Run Code Examples
30 Note: these instructions apply to examples configured with Bazel, see
31 example-specific documentation for other build automation tools.
33 Install the latest bazel version by following the steps listed
34 [here](https://docs.bazel.build/versions/master/install.html).
36 Select an example of interest from the [examples
37 folder](https://github.com/open-telemetry/opentelemetry-cpp/tree/main/examples).
38 Inside each example directory is a `BUILD` file containing instructions for
39 Bazel. Find the binary name of your example by inspecting the contents of this
42 Build the example from the root of the opentelemetry-cpp directory using Bazel.
43 Replace `<binary name>` with the identifier found in the previous step:
46 bazel build //examples/<example directory name>:<binary name>
49 Run the resulting executable to see telemetry from the application as it calls
50 the instrumented library: </li>
53 bazel-bin/examples/<example directory name>/<binary name>
56 For instance, building and running the `simple` example can be done as follows:
59 bazel build //examples/simple:example_simple
60 bazel-bin/examples/simple/example_simple
65 ### How to Send Pull Requests
67 Everyone is welcome to contribute code to `opentelemetry-cpp` via GitHub pull
70 To create a new PR, fork the project in GitHub and clone the upstream repo:
73 git clone --recursive https://github.com/open-telemetry/opentelemetry-cpp.git
76 Add your fork as a remote:
79 git remote add fork https://github.com/YOUR_GITHUB_USERNAME/opentelemetry-cpp.git
82 If you haven't, make sure you are loading the submodules required to build
90 Check out a new branch, make modifications and push the branch to your fork:
93 git checkout -b feature
100 If you made changes to the Markdown documents (`*.md` files), install the latest
101 [`markdownlint-cli`](https://github.com/igorshubovych/markdownlint-cli) and run:
107 Open a pull request against the main `opentelemetry-cpp` repo.
109 To run tests locally, please read the [CI instructions](ci/README.md).
111 ### How to Receive Comments
113 * If the PR is not ready for review, please put `[WIP]` in the title, tag it as
114 `work-in-progress`, or mark it as
115 [`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
116 * Make sure [CLA](https://identity.linuxfoundation.org/projects/cncf) is signed
118 * For non-trivial changes, please update the [CHANGELOG](./CHANGELOG.md).
120 ### How to Get PRs Merged
122 A PR is considered to be **ready to merge** when:
124 * It has received two approvals with at least one approval from
125 [Approver](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
127 [Maintainer](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer)
128 (at different company).
129 * A pull request opened by an Approver / Maintainer can be merged with only one
130 approval from Approver / Maintainer (at different company).
131 * Major feedback items/points are resolved.
132 * It has been open for review for at least one working day. This gives people
133 reasonable time to review.
134 * Trivial changes (typo, cosmetic, doc, etc.) don't have to wait for one day.
135 * Urgent fixes can take exceptions as long as it has been actively communicated.
137 Any Maintainer can merge the PR once it is **ready to merge**. Maintainer can
138 make conscious judgement to merge pull requests which have not strictly met
139 above mentioned requirements.
141 If a PR has been stuck (e.g. there are lots of debates and people couldn't agree
142 on each other), the owner should try to get people aligned by:
144 * Consolidating the perspectives and putting a summary in the PR. It is
145 recommended to add a link into the PR description, which points to a comment
146 with a summary in the PR conversation
147 * Stepping back to see if it makes sense to narrow down the scope of the PR or
150 If none of the above worked and the PR has been stuck for more than 2 weeks, the
151 owner should bring it to the OpenTelemetry C++ SIG meeting. See
152 [README.md](README.md#contributing) for the meeting link.
156 As with other OpenTelemetry clients, opentelemetry-cpp follows the
157 [opentelemetry-specification](https://github.com/open-telemetry/opentelemetry-specification).
159 It's especially valuable to read through the [library
160 guidelines](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/library-guidelines.md).
164 Hi! If you’re looking at this document, these resources will provide you the
165 knowledge to get started as a newcomer to the OpenTelemetry project. They will
166 help you understand the OpenTelemetry Project, its components, and specifically
169 ### Reading Resources
172 [article](https://medium.com/opentelemetry/how-to-start-contributing-to-opentelemetry-b23991ad91f4)
173 (October 2019) on how to start contributing to the OpenTelemetry project.
175 [article](https://medium.com/opentelemetry/opentelemetry-beyond-getting-started-5ac43cd0fe26)
176 (January 2020) describing the overarching goals and use cases for
179 ### Relevant Documentation
182 Specification](https://github.com/open-telemetry/opentelemetry-specification)
183 * The OpenTelemetry Specification describes the requirements and expectations
184 of for all OpenTelemetry implementations.
186 * Read through the OpenTelemetry C++ documentation
188 [API](https://opentelemetry-cpp.readthedocs.io/en/latest/api/api.html)
190 [SDK](https://opentelemetry-cpp.readthedocs.io/en/latest/sdk/sdk.html)
191 documentation provides a lot of information on what the classes and their
192 functions are used for.
194 Please contribute! You’re welcome to add more information if you come across any