Parallelize initial Prometheus metric collection
This commit is contained in:
@ -11,8 +11,15 @@ module Prometheus
|
|||||||
class << self
|
class << self
|
||||||
def initialize_metrics
|
def initialize_metrics
|
||||||
register_metrics
|
register_metrics
|
||||||
initialize_instance_count
|
|
||||||
initialize_rfc_metrics
|
Thread.new do
|
||||||
|
initialize_instance_count
|
||||||
|
initialize_rfc_metrics
|
||||||
|
rescue StandardError => e
|
||||||
|
Sentry.capture_exception(e)
|
||||||
|
ensure
|
||||||
|
ActiveRecord::Base.connection_pool.release_connection
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def register_metrics
|
def register_metrics
|
||||||
|
Reference in New Issue
Block a user