mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-20 08:46:06 +01:00
17 lines
317 B
Ruby
17 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
|