Sha256: dcf2c13c6fd1d702be26e60faa62b337e2deea8d528921d18750a177aecd7e7a

Contents?: true

Size: 971 Bytes

Versions: 45

Compression:

Stored size: 971 Bytes

Contents

# frozen_string_literal: true

module GraphQL
  module Tracing
    class AppsignalTracing < PlatformTracing
      self.platform_keys = {
        "lex" => "lex.graphql",
        "parse" => "parse.graphql",
        "validate" => "validate.graphql",
        "analyze_query" => "analyze.graphql",
        "analyze_multiplex" => "analyze.graphql",
        "execute_multiplex" => "execute.graphql",
        "execute_query" => "execute.graphql",
        "execute_query_lazy" => "execute.graphql",
      }

      def platform_trace(platform_key, key, data)
        Appsignal.instrument(platform_key) do
          yield
        end
      end

      def platform_field_key(type, field)
        "#{type.graphql_name}.#{field.graphql_name}.graphql"
      end

      def platform_authorized_key(type)
        "#{type.graphql_name}.authorized.graphql"
      end

      def platform_resolve_type_key(type)
        "#{type.graphql_name}.resolve_type.graphql"
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
graphql-1.11.10 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.11.9 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.17 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.16 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.15 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.14 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.13 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.12 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.11 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.10 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.9 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.8 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.7 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.6 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.5 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.11.8 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.4 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.3 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.2 lib/graphql/tracing/appsignal_tracing.rb
graphql-1.12.1 lib/graphql/tracing/appsignal_tracing.rb