Sha256: aa9be96213d81b132963c2e12f7cce4dabd0f8484d903e754b80ee0dae6b3275

Contents?: true

Size: 539 Bytes

Versions: 8

Compression:

Stored size: 539 Bytes

Contents

# frozen_string_literal: true

module PlainApm
  module Hooks
    class Manual < ActiveSupportSubscriber
      NOTIFICATION_PATTERN = /\A[^!]\w+\.manual_plain_apm\Z/.freeze

      private

      def notification_pattern
        NOTIFICATION_PATTERN
      end

      def payload(event)
        name, base = attributes_from_notification(event)

        base.tap do |o|
          o[:source] = "user"
          o[:name] = "manual"
          o[:payload_name] = name
          o[:payload] = event.payload
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
plain_apm-0.10.2 lib/plain_apm/hooks/manual.rb
plain_apm-0.10.0 lib/plain_apm/hooks/manual.rb
plain_apm-0.9.8 lib/plain_apm/hooks/manual.rb
plain_apm-0.9.7 lib/plain_apm/hooks/manual.rb
plain_apm-0.9.6 lib/plain_apm/hooks/manual.rb
plain_apm-0.9.5 lib/plain_apm/hooks/manual.rb
plain_apm-0.9.4 lib/plain_apm/hooks/manual.rb
plain_apm-0.9.3 lib/plain_apm/hooks/manual.rb