Move Prometheus initialization after preloading the remaining app
This commit is contained in:
@ -34,5 +34,10 @@ module CodeOcean
|
||||
config.action_cable.mount_path = '/cable'
|
||||
|
||||
config.telegraf.tags = { application: 'codeocean' }
|
||||
|
||||
config.after_initialize do
|
||||
# Initialize the counters according to the db
|
||||
Prometheus::Controller.initialize_metrics
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -6,5 +6,4 @@ return if %w[db: assets:].any? { |task| Rake.application.top_level_tasks.to_s.in
|
||||
# Add metric callbacks to all models
|
||||
ApplicationRecord.include Prometheus::Record
|
||||
|
||||
# Initialize the counters according to the db
|
||||
Prometheus::Controller.initialize_metrics
|
||||
# Initialization is performed in config/application.rb
|
||||
|
Reference in New Issue
Block a user