Class: Appsignal::Hooks::SidekiqProbe Private

Inherits:
Object
  • Object
show all
Defined in:
lib/appsignal/hooks/sidekiq.rb

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config = {}) ⇒ SidekiqProbe

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.

Returns a new instance of SidekiqProbe.



32
33
34
35
36
37
38
# File 'lib/appsignal/hooks/sidekiq.rb', line 32

def initialize(config = {})
  @config = config
  @cache = {}
  config_string = " with config: #{config}" unless config.empty?
  Appsignal.logger.debug("Initializing Sidekiq probe#{config_string}")
  require "sidekiq/api"
end

Instance Attribute Details

#configObject (readonly)

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.



26
27
28
# File 'lib/appsignal/hooks/sidekiq.rb', line 26

def config
  @config
end

Class Method Details

.dependencies_present?Boolean

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.

Returns:

  • (Boolean)


28
29
30
# File 'lib/appsignal/hooks/sidekiq.rb', line 28

def self.dependencies_present?
  Gem::Version.new(::Redis::VERSION) >= Gem::Version.new("3.3.5")
end

Instance Method Details

#callObject

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.



40
41
42
43
44
# File 'lib/appsignal/hooks/sidekiq.rb', line 40

def call
  track_redis_info
  track_stats
  track_queues
end