Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Instrumentation Authors Guide #946

Merged
merged 21 commits into from
May 13, 2024

Conversation

arielvalentin
Copy link
Collaborator

Provides explicit guidance for instrumentation authors to reduce friction when submitting contributions

Provides explicit guidance for instrumentation authors to reduce friction when submitting contributions
@arielvalentin arielvalentin marked this pull request as ready for review April 28, 2024 16:56
Copy link

@marcotc marcotc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not an official approver, but this is awesome work @arielvalentin! 🙇

arielvalentin and others added 4 commits April 29, 2024 13:00
Co-authored-by: Marco Costa <mmarcottulio@gmail.com>
Co-authored-by: Marco Costa <mmarcottulio@gmail.com>
Co-authored-by: Marco Costa <mmarcottulio@gmail.com>
Co-authored-by: Marco Costa <mmarcottulio@gmail.com>
@arielvalentin arielvalentin requested a review from marcotc May 1, 2024 16:30
Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙇 Thank you for writing this. I think this will become an invaluable resource for current and future instrumentation authors.

CONTRIBUTING.md Show resolved Hide resolved
instrumentation/CONTRIBUTING.md Outdated Show resolved Hide resolved
instrumentation/CONTRIBUTING.md Outdated Show resolved Hide resolved
instrumentation/CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
instrumentation/CONTRIBUTING.md Outdated Show resolved Hide resolved

The `instrumentation_generator` will create a `README.md` file for your instrumentation. Please ensure that the `README` is up-to-date and contains the following:

1. The span names, events, and semantic attributes that are emitted by the instrumentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. The span names, events, and semantic attributes that are emitted by the instrumentation
1. The span names, events, and semantic attributes emitted by the instrumentation

The `instrumentation_generator` will create a `README.md` file for your instrumentation. Please ensure that the `README` is up-to-date and contains the following:

1. The span names, events, and semantic attributes that are emitted by the instrumentation
2. The configuration options that are available
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. The configuration options that are available
2. The configuration options available

Comment on lines 401 to 403
In addition to that, there should also be redundant `yardoc` comments in the entrypoint of your gem, i.e. the subclass `OpenTelemetry::Instrumentation::Base`.

> :information_source: See the `ActiveJob` instrumentation [`README`](./active_job/README.md) for a comprehensive example.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In addition to that, there should also be redundant `yardoc` comments in the entrypoint of your gem, i.e. the subclass `OpenTelemetry::Instrumentation::Base`.
> :information_source: See the `ActiveJob` instrumentation [`README`](./active_job/README.md) for a comprehensive example.
> :information_source: See the `ActiveJob` instrumentation [`README`](./active_job/README.md) for a comprehensive example.
In addition to that, there should also be redundant `yardoc` comments in the entrypoint of your gem, i.e. the subclass `OpenTelemetry::Instrumentation::Base`.
> :information_source: See the `Sidekiq::Instrumentation` [class description](./sidekiq/lib/opentelemetry/instrumentation/sidekiq/instrumentation.rb) for a comprehensive example.


You are encouraged to submit a `draft` pull request early in the development process to get feedback from the maintainers, run your tests via CI, and ensure that your changes are in line with the project's goals.

The `CODEOWNERS` is used to notify the instrumentation authors a pull request is opened. Please add yourself to the `instrumentation` section of the `CODEOWNERS` file, e.g.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `CODEOWNERS` is used to notify the instrumentation authors a pull request is opened. Please add yourself to the `instrumentation` section of the `CODEOWNERS` file, e.g.
The `CODEOWNERS` is used to notify instrumentation authors when a pull request is opened. Please add yourself to the `instrumentation` section of the `CODEOWNERS` file, e.g.

Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
Copy link
Contributor

@ericmustin ericmustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have 5 free minutes so approving preemptively for whenever this gets brought up to date with main. Nice work y'all

Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
instrumentation/CONTRIBUTING.md Show resolved Hide resolved
instrumentation/CONTRIBUTING.md Show resolved Hide resolved
instrumentation/CONTRIBUTING.md Outdated Show resolved Hide resolved

The original design and implementation of this project was heavily influenced by Datadog's `dd-trace-rb` project. You may refer to the [Datadog Porting Guide](datadog-porting-guide.md) as a reference for implementing instrumentations, however the following guidelines are specific to OpenTelemetry Ruby:

* Use `OpenTelemetry::Instrumentation::Base`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, I forgot the links were automatically generated! So it would be linking whatever the auto-generated value is for the heading to the bullet with the same heading:

* [Use `OpenTelemetry::Instrumentation::Base`](#anchor-link-to-Use-OpenTelemetry-Instrumentation-Base-heading)

@arielvalentin arielvalentin merged commit 96cbf91 into open-telemetry:main May 13, 2024
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants