Method: NewRelic::Agent::Instrumentation::StripeSubscriber#start_segment

Defined in:
lib/new_relic/agent/instrumentation/stripe_subscriber.rb

#start_segment(event) ⇒ Object

[View source]

15
16
17
18
19
20
21
22
# File 'lib/new_relic/agent/instrumentation/stripe_subscriber.rb', line 15

def start_segment(event)
  return unless is_execution_traced?

  segment = NewRelic::Agent::Tracer.start_segment(name: metric_name(event))
  event.user_data[:newrelic_segment] = segment
rescue => e
  NewRelic::Agent.logger.error("Error starting New Relic Stripe segment: #{e}")
end