Method: Atatus::Subscriber#start

Defined in:
lib/atatus/subscriber.rb

#start(name, id, payload) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/atatus/subscriber.rb', line 49

def start(name, id, payload)
  return unless (transaction = @agent.current_transaction)

  normalized = @normalizers.normalize(transaction, name, payload)

  span =
    if normalized == :skip
      nil
    else
      name, type, subtype, action, context = normalized

      @agent.start_span(
        name,
        type,
        subtype: subtype,
        action: action,
        context: context
      )
    end

  transaction.notifications << Notification.new(id, span)
end