Module: SidekiqInsight
- Defined in:
- lib/sidekiq_insight.rb,
lib/sidekiq_insight/engine.rb,
lib/sidekiq_insight/metrics.rb,
lib/sidekiq_insight/storage.rb,
lib/sidekiq_insight/version.rb,
lib/sidekiq_insight/configuration.rb,
lib/sidekiq_insight/leak_detector.rb,
lib/sidekiq_insight/server_middleware.rb,
lib/sidekiq_insight/request_middleware.rb,
app/controllers/sidekiq_insight/base_controller.rb,
app/controllers/sidekiq_insight/graphs_controller.rb,
app/controllers/sidekiq_insight/dashboard_controller.rb
Defined Under Namespace
Modules: Metrics
Classes: BaseController, Configuration, DashboardController, Engine, GraphsController, LeakDetector, RequestMiddleware, ServerMiddleware, Storage
Constant Summary
collapse
- VERSION =
"0.1.2"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
14
15
16
|
# File 'lib/sidekiq_insight.rb', line 14
def configuration
@configuration
end
|
Class Method Details
16
17
18
19
|
# File 'lib/sidekiq_insight.rb', line 16
def configure
self.configuration ||= Configuration.new
yield(configuration) if block_given?
end
|
.detector ⇒ Object
29
30
31
|
# File 'lib/sidekiq_insight.rb', line 29
def detector
@detector ||= LeakDetector.new(storage: storage)
end
|
.redis ⇒ Object
21
22
23
|
# File 'lib/sidekiq_insight.rb', line 21
def redis
@redis ||= Redis.new(url: configuration&.redis_url || ENV['REDIS_URL'] || 'redis://127.0.0.1:6379/0')
end
|
.storage ⇒ Object
25
26
27
|
# File 'lib/sidekiq_insight.rb', line 25
def storage
@storage ||= Storage.new(redis: redis, prefix: configuration&.prefix || 'sidekiq_insight:')
end
|