Method: GraphQL::Tracing::AppOpticsTrace#authorized_lazy

Defined in:
lib/graphql/tracing/appoptics_trace.rb

#authorized_lazy(**data) ⇒ Object

[View source] [View on GitHub]

101
102
103
104
105
106
107
108
109
110
# File 'lib/graphql/tracing/appoptics_trace.rb', line 101

def authorized_lazy(**data)
  return super if !defined?(AppOpticsAPM) || gql_config[:enabled] == false
  layer = @platform_key_cache[AppOpticsTrace].platform_authorized_key_cache[data[:type]]
  kvs = (data, layer)

  ::AppOpticsAPM::SDK.trace(layer, kvs) do
    kvs.clear # we don't have to send them twice
    super
  end
end