Sha256: 38eb9b3aa1512606491204dbf1eb7ca49743ae5bd6d4626304b83df6d8e045e1

Contents?: true

Size: 506 Bytes

Versions: 8

Compression:

Stored size: 506 Bytes

Contents

# frozen_string_literal: true

Sentry.register_patch(:graphql) do |config|
  if defined?(::GraphQL::Schema) && defined?(::GraphQL::Tracing::SentryTrace) && ::GraphQL::Schema.respond_to?(:trace_with)
    ::GraphQL::Schema.trace_with(::GraphQL::Tracing::SentryTrace, set_transaction_name: true)
  else
    config.logger.warn(Sentry::LOGGER_PROGNAME) { 'You tried to enable the GraphQL integration but no GraphQL gem was detected. Make sure you have the `graphql` gem (>= 2.2.6) in your Gemfile.' }
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
sentry-ruby-core-5.19.0 lib/sentry/graphql.rb
sentry-ruby-5.19.0 lib/sentry/graphql.rb
sentry-ruby-core-5.18.2 lib/sentry/graphql.rb
sentry-ruby-5.18.2 lib/sentry/graphql.rb
sentry-ruby-core-5.18.1 lib/sentry/graphql.rb
sentry-ruby-5.18.1 lib/sentry/graphql.rb
sentry-ruby-5.18.0 lib/sentry/graphql.rb
sentry-ruby-core-5.18.0 lib/sentry/graphql.rb