mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-20 12:06:04 +01:00
18 lines
317 B
Ruby
18 lines
317 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
require "prometheus/client/formats/text"
|
||
|
|
||
|
class MetricsController < ActionController::API
|
||
|
include ActionController::MimeResponds
|
||
|
|
||
|
def show
|
||
|
render plain: metrics
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def metrics
|
||
|
Prometheus::Client::Formats::Text.marshal(Prometheus::Client.registry)
|
||
|
end
|
||
|
end
|