Skip to content

Commit

Permalink
Safety check in instrumentation render_in_with_tracing that identifie…
Browse files Browse the repository at this point in the history
…r to self.class
  • Loading branch information
navidemad committed Sep 28, 2024
1 parent 2897f32 commit df71498
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ def render_in_with_tracing(*args)

begin
segment = NewRelic::Agent::Tracer.start_segment(
name: metric_name(self.class.identifier, self.class.name)
name: metric_name(
self.class.respond_to?(:identifier) ? self.class.identifier : nil,
self.class.name
)
)
yield
rescue => e
Expand Down

0 comments on commit df71498

Please sign in to comment.