Skip to content

Commit

Permalink
fix for frozen segment name in action mailer
Browse files Browse the repository at this point in the history
  • Loading branch information
tannalynn committed Jan 24, 2023
1 parent ac8f980 commit 55ed14f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def finish_segment(id, payload)
return unless segment

if segment.name.match?(UNKNOWN_MAILER) && payload.key?(:mailer)
segment.name.sub!(UNKNOWN_MAILER, "#{BASE_NAME}/#{payload[:mailer]}/")
segment.name = segment.name.sub(UNKNOWN_MAILER, "#{BASE_NAME}/#{payload[:mailer]}/")
end

PAYLOAD_KEYS.each do |key|
Expand All @@ -72,6 +72,7 @@ def notice_exception(segment, payload)

def metric_name(name, payload)
mailer = payload[:mailer] || UNKNOWN
# binding.irb if mailer == 'Unknown'
method = method_from_name(name)
"#{BASE_NAME}/#{mailer}/#{method}"
end
Expand Down

0 comments on commit 55ed14f

Please sign in to comment.