38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/new_relic/agent/serverless_handler.rb', line 38
def invoke_lambda_function_with_new_relic(event:, context:, method_name:, namespace: nil)
NewRelic::Agent.increment_metric(SUPPORTABILITY_METRIC)
@event, @context = event, context
NewRelic::Agent::Tracer.in_transaction(category: category, name: function_name) do
prep_transaction
process_response(NewRelic::LanguageSupport.constantize(namespace)
.send(method_name, event: event, context: context))
end
ensure
harvest!
write_output
reset!
end
|