mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-31 07:06:27 +00:00
Add prometheus metrics at /api/v1/metrics
This commit is contained in:
committed by
Mateusz Bączek
parent
1c0b4205d4
commit
4d410d124f
@@ -26,6 +26,11 @@ module Invidious::Routes::API::V1::Misc
|
||||
end
|
||||
end
|
||||
|
||||
def self.metrics(env)
|
||||
env.response.content_type = "text/plain"
|
||||
return to_prometheus_metrics(Invidious::Jobs::StatisticsRefreshJob::STATISTICS_PROMETHEUS)
|
||||
end
|
||||
|
||||
# APIv1 currently uses the same logic for both
|
||||
# user playlists and Invidious playlists. This means that we can't
|
||||
# reasonably split them yet. This should be addressed in APIv2
|
||||
|
||||
Reference in New Issue
Block a user