Sha256: 17c2b4bd259197b9d48747fc4e06d3ab1bc47787ad5af120775471e0e27b9bac

Contents?: true

Size: 787 Bytes

Versions: 22

Compression:

Stored size: 787 Bytes

Contents

# frozen_string_literal: true

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

      def platform_trace(platform_key, key, data)
        NewRelic::Agent::MethodTracerHelpers.trace_execution_scoped(platform_key) do
          yield
        end
      end

      def platform_field_key(type, field)
        "GraphQL/#{type.name}/#{field.name}"
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
graphql-1.7.5 lib/graphql/tracing/new_relic_tracing.rb
graphql-1.7.4 lib/graphql/tracing/new_relic_tracing.rb