Skip to content

Add spans #3

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

Merged
merged 6 commits into from
Mar 23, 2023
Merged

Add spans #3

merged 6 commits into from
Mar 23, 2023

Conversation

muripic
Copy link

@muripic muripic commented Mar 7, 2023

I like to write PR descriptions but there's no reasonable description I could write to capture all the context needed here 😅

I'll still give it a shot:

Description

The goal of this PR is to implement the Grape instrumentation for OpenTelemetry. It borrows (or steals) a lot from the Datadog implementation but also differs in some substantial aspects that I tried to explain in comments throughout the PR.

This PR completes the changes made in the add-grape-instrumentation branch. That branch had the autogenerated files with some basic changes. This branch contains the "meat" of the implementation and the goal is to merge it into add-grape-instrumentation to have a complete PR we can send upstream.

Last but not least, remember that this will still go through code review by the maintainers so if we can't choose among alternatives or have uncertainties, we can still raise them up to them and ask for comments or advice.

@muripic muripic changed the base branch from main to add-grape-instrumentation March 7, 2023 16:11
@muripic muripic marked this pull request as draft March 7, 2023 16:12
@muripic muripic force-pushed the add-grape-instrumentation branch from 9ef4f61 to 6543d8b Compare March 7, 2023 16:17
@muripic muripic force-pushed the add-spans branch 3 times, most recently from f4972eb to 708cc90 Compare March 14, 2023 09:59
@muripic muripic force-pushed the add-grape-instrumentation branch from 6543d8b to 5826715 Compare March 20, 2023 13:02
@muripic muripic self-assigned this Mar 20, 2023
@muripic muripic marked this pull request as ready for review March 20, 2023 14:40
@muripic muripic requested review from dhruvCW, pablomg92z and b-n March 20, 2023 14:41
Copy link
Collaborator

@dhruvCW dhruvCW left a comment

Choose a reason for hiding this comment

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

some minor nitpicks (like really nitpicky) but this is beautifully written, kudos 🍻

for me the instrumentation seems to be on point, the only addition I would say is the context is missing i.e. the request parameters and the user session information. These can of course be something added with a future PR. They will also need us to implement a filtering mechanism so as not to leak PII info (especially for the session info).

Copy link

@b-n b-n left a comment

Choose a reason for hiding this comment

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

I've put some changes here I think that are needed for clarity. Some I think might be a bit too verbose, but others that I think help to understand what's going on (especially with handle_error).

@muripic muripic requested review from b-n and dhruvCW March 22, 2023 08:25
Copy link

@b-n b-n left a comment

Choose a reason for hiding this comment

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

IMO, Ready to PR upstream!

Lets gooooooo

@@ -41,11 +34,12 @@ def gem_version
end

def require_dependencies
require_relative 'handler'
require_relative 'subscriber'
require_relative 'event_handler'
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could also move this into subscriber

Copy link
Author

Choose a reason for hiding this comment

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

done 😄

@muripic
Copy link
Author

muripic commented Mar 23, 2023

I'll merge it into add-grape-instrumentation, clean up history, add you as co-authors, add explanatory comments, and tomorrow I'll send it upstream 🚀

@muripic muripic merged commit 3468923 into add-grape-instrumentation Mar 23, 2023
@muripic muripic deleted the add-spans branch April 26, 2023 13:09
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.

3 participants