mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-31 07:06:27 +00:00
Moved from misused constants to class variables in MetricsCollector, MetricsCollector is no longer initialized as a singleton
This commit is contained in:
committed by
Mateusz Bączek
parent
9db6eb058c
commit
8d4c16c79c
@@ -32,7 +32,7 @@ module Invidious::Routes::API::V1::Misc
|
||||
env.response.content_type = "text/plain"
|
||||
|
||||
return String.build do |str|
|
||||
Metrics::REQUEST_COUNTERS.each do |metric_labels, value|
|
||||
Metrics::RouteMetricsCollector.num_of_request_counters.each do |metric_labels, value|
|
||||
str << "http_requests_total{"
|
||||
str << "method=\"" << metric_labels.request_method << "\" "
|
||||
str << "route=\"" << metric_labels.request_route << "\" "
|
||||
@@ -41,7 +41,7 @@ module Invidious::Routes::API::V1::Misc
|
||||
str << value << "\n"
|
||||
end
|
||||
|
||||
Metrics::REQUEST_DURATION_SECONDS_SUMS.each do |metric_labels, value|
|
||||
Metrics::RouteMetricsCollector.request_duration_seconds_sums.each do |metric_labels, value|
|
||||
str << "http_request_duration_seconds_sum{"
|
||||
str << "method=\"" << metric_labels.request_method << "\" "
|
||||
str << "route=\"" << metric_labels.request_route << "\" "
|
||||
|
||||
Reference in New Issue
Block a user