getsentry / sentry-ruby

Sentry SDK for Ruby
https://sentry.io/for/ruby
MIT License
927 stars 486 forks source link

Enable automatic graphql tracing with a new `:graphql` patch #2308

Closed sl0thentr0py closed 2 months ago

sl0thentr0py commented 2 months ago

closes #2091

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 80.85106% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 98.66%. Comparing base (d0c9897) to head (7f8dcdd).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2308 +/- ## ========================================== - Coverage 98.73% 98.66% -0.08% ========================================== Files 203 205 +2 Lines 13282 13329 +47 ========================================== + Hits 13114 13151 +37 - Misses 168 178 +10 ``` | [Components](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | Coverage Δ | | |---|---|---| | [sentry-ruby](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `99.03% <80.85%> (-0.09%)` | :arrow_down: | | [sentry-rails](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `97.37% <ø> (ø)` | | | [sentry-sidekiq](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `96.98% <ø> (ø)` | | | [sentry-resque](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `96.76% <ø> (-0.33%)` | :arrow_down: | | [sentry-delayed_job](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `98.91% <ø> (ø)` | | | [sentry-opentelemetry](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `100.00% <ø> (ø)` | | | [Files](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | Coverage Δ | | |---|---|---| | [sentry-ruby/lib/sentry-ruby.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308?src=pr&el=tree&filepath=sentry-ruby%2Flib%2Fsentry-ruby.rb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS1ydWJ5LnJi) | `96.60% <100.00%> (+0.01%)` | :arrow_up: | | [sentry-ruby/lib/sentry/graphql.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308?src=pr&el=tree&filepath=sentry-ruby%2Flib%2Fsentry%2Fgraphql.rb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9ncmFwaHFsLnJi) | `75.00% <75.00%> (ø)` | | | [sentry-ruby/spec/sentry/graphql\_spec.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308?src=pr&el=tree&filepath=sentry-ruby%2Fspec%2Fsentry%2Fgraphql_spec.rb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1Ynkvc3BlYy9zZW50cnkvZ3JhcGhxbF9zcGVjLnJi) | `80.95% <80.95%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2308/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry)
sl0thentr0py commented 2 months ago

ignore the coverage report here because the uncovered lines are covered in older ruby versions which don't report their coverage

sl0thentr0py commented 2 months ago

the gem requirement is just for testing, we only have the error message for better DX

adinauer commented 2 months ago

I assume it won't explode if set_transaction_name isn't a known param yet for old versions, right? Seems to have been added in https://github.com/rmosolgo/graphql-ruby/pull/4853/files which was released in v2.2.11.

sl0thentr0py commented 2 months ago

yes its a keyword arg so its safe