13
14
15
16
17
18
19
20
21
22
|
# File 'lib/newrelic_security/instrumentation-security/graphql/instrumentation.rb', line 13
def execute_on_enter
NewRelic::Security::Agent.logger.debug "OnEnter : #{self.class}.#{__method__}"
ctxt = NewRelic::Security::Agent::Control::HTTPContext.get_context
ctxt.custom_data_type[STAR_DOT_QUERY] = GRAPHQL_QUERY if query.query_string
ctxt.custom_data_type[STAR_DOT_VARIABLES] = GRAPHQL_VARIABLE if query.instance_variable_get(:@provided_variables)
rescue => exception
NewRelic::Security::Agent.logger.error "Exception in hook in #{self.class}.#{__method__}, #{exception.inspect}, #{exception.backtrace}"
ensure
yield
end
|