# typed: strict
module HasPrometheusClient
  extend ActiveSupport::Concern
  extend T::Sig
  extend T::Helpers

  included do
    sig { returns(PrometheusExporter::Client) }
    def prometheus_client
      PrometheusExporter::Client.default
    end

    sig { params(name: String).returns(PrometheusExporter::Metric::Counter) }
    def prom_counter(name)
      PrometheusExporter::Metric::Counter.new(name, {})
    end
  end
end
