Class: Datadog::Contrib::Sidekiq::Integration
- Inherits:
-
Object
- Object
- Datadog::Contrib::Sidekiq::Integration
- Includes:
- Integration
- Defined in:
- lib/ddtrace/contrib/sidekiq/integration.rb
Overview
Description of Sidekiq integration
Constant Summary collapse
- MINIMUM_VERSION =
Gem::Version.new('3.5.4')
- MINIMUM_SERVER_INTERNAL_TRACING_VERSION =
Gem::Version.new('5.2.4')
Class Method Summary collapse
- .compatible? ⇒ Boolean
-
.compatible_with_server_internal_tracing? ⇒ Boolean
Only patch server internals on v5.2.4+ because that's when loading of
Sidekiq::Launcher
stabilized. - .loaded? ⇒ Boolean
- .version ⇒ Object
Instance Method Summary collapse
Methods included from Integration
Class Method Details
.compatible? ⇒ Boolean
26 27 28 |
# File 'lib/ddtrace/contrib/sidekiq/integration.rb', line 26 def self.compatible? super && version >= MINIMUM_VERSION end |
.compatible_with_server_internal_tracing? ⇒ Boolean
Only patch server internals on v5.2.4+ because that's when loading of
Sidekiq::Launcher
stabilized. Sidekiq 4+ technically can support our
patches (with minor adjustments), but in order to avoid explicitly
requiring sidekiq/launcher
ourselves (which could affect gem
initialization order), we are limiting this tracing to v5.2.4+.
35 36 37 |
# File 'lib/ddtrace/contrib/sidekiq/integration.rb', line 35 def self.compatible_with_server_internal_tracing? version >= MINIMUM_SERVER_INTERNAL_TRACING_VERSION end |
.loaded? ⇒ Boolean
22 23 24 |
# File 'lib/ddtrace/contrib/sidekiq/integration.rb', line 22 def self.loaded? !defined?(::Sidekiq).nil? end |
.version ⇒ Object
18 19 20 |
# File 'lib/ddtrace/contrib/sidekiq/integration.rb', line 18 def self.version Gem.loaded_specs['sidekiq'] && Gem.loaded_specs['sidekiq'].version end |
Instance Method Details
#default_configuration ⇒ Object
39 40 41 |
# File 'lib/ddtrace/contrib/sidekiq/integration.rb', line 39 def default_configuration Configuration::Settings.new end |
#patcher ⇒ Object
43 44 45 |
# File 'lib/ddtrace/contrib/sidekiq/integration.rb', line 43 def patcher Patcher end |