mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-30 02:32:45 +00:00
Merge branch 'add-prometheus-metrics-endpoint'
From https://github.com/iv-org/invidious/pull/3576
This commit is contained in:
@@ -198,3 +198,11 @@ def get_playback_statistic
|
||||
|
||||
return tracker.as(Hash(String, Int64 | Float64))
|
||||
end
|
||||
|
||||
def to_prometheus_metrics(metrics_struct : Hash(String, Number)) : String
|
||||
return String.build do |str|
|
||||
metrics_struct.each.each do |key, value|
|
||||
str << key << " " << value << "\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user