Sha256: fa884aaa327e01f5ff4a560f34ad45a115c0d7876aa21ed41e1858fd849178bd

Contents?: true

Size: 759 Bytes

Versions: 3

Compression:

Stored size: 759 Bytes

Contents

# frozen_string_literal: true

require "active_support"
require "benchmark"
require "yabeda"
require "rabbit_messaging"

require "yabeda/rabbit_messaging/job_patch"
require "yabeda/rabbit_messaging/version"

if defined?(Yabeda)
  Yabeda.configure do
    counter :rabbit_messages_total do
      comment "A counter of the total number of messages by exchange."
      tags %i[exchange routing_key success]
    end

    histogram :rabbit_messages_duration do
      comment "A histogram of the messages latency."
      buckets [0.1, 0.25, 0.5, 1, 2.5, 5, 10, 30, 60]
      tags %i[exchange routing_key success]
      unit :seconds
    end
  end

  if defined?(Rabbit::Receiving::Job)
    Rabbit::Receiving::Job.prepend(Yabeda::RabbitMessaging::JobPatch)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yabeda-rabbit_messaging-0.0.3 lib/yabeda/rabbit_messaging.rb
yabeda-rabbit_messaging-0.0.2 lib/yabeda/rabbit_messaging.rb
yabeda-rabbit_messaging-0.0.1 lib/yabeda/rabbit_messaging.rb