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

Add Hanami 1.x instrumentation #2230

Merged
merged 12 commits into from
Oct 20, 2022
Merged

Add Hanami 1.x instrumentation #2230

merged 12 commits into from
Oct 20, 2022

Conversation

TonyCTHsu
Copy link
Contributor

@TonyCTHsu TonyCTHsu commented Aug 19, 2022

Setup Guide

Install

in Gemfile

gem 'ddtrace', require: 'ddtrace/auto_instrument'

Configuration

in config/initializers/datadog.rb

Datadog.configure do |c|
  # Do your custom configuration
end

What does this Hanami instrumentation provide?

Instrument Hanami 1.x, internally activating rack to instrument rack, which is usually the root span and could handle distributing tracing.

3 spans are generated by a Hanami instrumentation, which are routing, action, render.

  • routing starts recording from endpoint lookup til the response is returned
  • action covers the time for an action execution, including callbacks such as before and after
  • render describes the duration when an output is provided(from action or rack middleware) to be rendered.

#979

The example flamegraph pattern looks like below

Screenshot 2022-08-22 at 12 24 53

@ivoanjo
Copy link
Member

ivoanjo commented Aug 19, 2022

Since this PR is already big as-is, here's a suggestion: consider doing a separate PR to just add Hanami as a test app (even if it doesn't work until we actually add the instrumentation).

That way we can focus more on the actual changes and how instrumentation looks vs getting lost in the noise of bootstrapping an example Hanami application. 😄

@TonyCTHsu TonyCTHsu changed the base branch from master to feature/hanami-integration-app August 19, 2022 13:43
@TonyCTHsu TonyCTHsu added the do-not-merge/WIP Not ready for merge label Aug 19, 2022
@TonyCTHsu TonyCTHsu changed the title Add Hanami 1.3.x instrumentation Add Hanami 1.x instrumentation Sep 9, 2022
@TonyCTHsu TonyCTHsu removed the do-not-merge/WIP Not ready for merge label Sep 9, 2022
@TonyCTHsu TonyCTHsu marked this pull request as ready for review September 9, 2022 10:38
@TonyCTHsu TonyCTHsu requested a review from a team September 9, 2022 10:38
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (feature/hanami-integration-app@295858e). Click here to learn what that means.
The diff coverage is n/a.

@@                        Coverage Diff                        @@
##             feature/hanami-integration-app    #2230   +/-   ##
=================================================================
  Coverage                                  ?   97.59%           
=================================================================
  Files                                     ?     1106           
  Lines                                     ?    57541           
  Branches                                  ?        0           
=================================================================
  Hits                                      ?    56156           
  Misses                                    ?     1385           
  Partials                                  ?        0           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@TonyCTHsu TonyCTHsu self-assigned this Sep 9, 2022
@TonyCTHsu TonyCTHsu added the integrations Involves tracing integrations label Sep 9, 2022
Base automatically changed from feature/hanami-integration-app to master October 11, 2022 10:32
Copy link
Member

@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.

🚢 !

@TonyCTHsu TonyCTHsu merged commit 1166436 into master Oct 20, 2022
@TonyCTHsu TonyCTHsu deleted the feature/hanami branch October 20, 2022 13:28
@github-actions github-actions bot added this to the 1.6.0 milestone Oct 20, 2022
@TonyCTHsu TonyCTHsu mentioned this pull request Nov 15, 2022
@ivoanjo ivoanjo mentioned this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrations Involves tracing integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants