Merge commit '3aed93711c0118ab68fa09f4d3ac2635cb3344b8' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2025-06-11 22:52:21 +02:00
65 changed files with 1919 additions and 1198 deletions

View File

@@ -0,0 +1,18 @@
# frozen_string_literal: true
require 'prometheus_exporter/server'
require 'prometheus_exporter/client'
module Mastodon::PrometheusExporter
module LocalServer
mattr_accessor :bind, :port
def self.setup!
server = PrometheusExporter::Server::WebServer.new(bind:, port:)
server.start
# wire up a default local client
PrometheusExporter::Client.default = PrometheusExporter::LocalClient.new(collector: server.collector)
end
end
end