Module: Datadog::AppSec::Contrib::GraphQL::AppSecTrace

Defined in:
lib/datadog/appsec/contrib/graphql/appsec_trace.rb

Overview

These methods will be called by the GraphQL runtime to send the variables to the WAF. We actually don’t need to create any span/trace.

Instance Method Summary collapse

Instance Method Details

#execute_multiplex(multiplex:) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/datadog/appsec/contrib/graphql/appsec_trace.rb', line 14

def execute_multiplex(multiplex:)
  return super unless Datadog::AppSec.enabled?

  gateway_multiplex = Gateway::Multiplex.new(multiplex)

  multiplex_return, _gateway_multiplex = Instrumentation.gateway.push('graphql.multiplex', gateway_multiplex) do
    super
  end

  multiplex_return
end