Sha256: 6d5f0a64094d6e4e9b517dcf5daf3d36e42d69656cbb9e21ff8e78e8a5d3ffaa

Contents?: true

Size: 743 Bytes

Versions: 4

Compression:

Stored size: 743 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, source = *event.name.split(".")

        {
          "source" => "plain_apm",
          "name" => "manual",
          "backtrace" => filtered_backtrace,
          "started_at" => event.time,
          "finished_at" => event.end,
          "allocations" => event.allocations,
          "thread_allocations" => event.thread_allocations,
          "payload_name" => name,
          "payload" => event.payload
        }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
plain_apm-0.6.5 lib/plain_apm/hooks/manual.rb
plain_apm-0.6.4 lib/plain_apm/hooks/manual.rb
plain_apm-0.6.3 lib/plain_apm/hooks/manual.rb
plain_apm-0.6.2 lib/plain_apm/hooks/manual.rb