debian-mirror-gitlab/app/controllers/projects/ci/prometheus_metrics/histograms_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
592 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
module Projects
module Ci
module PrometheusMetrics
class HistogramsController < Projects::ApplicationController
2023-05-27 22:25:52 +05:30
feature_category :pipeline_composition
2021-03-11 19:13:27 +05:30
respond_to :json, only: [:create]
def create
result = ::Ci::PrometheusMetrics::ObserveHistogramsService.new(project, permitted_params).execute
render json: result.payload, status: result.http_status
end
private
def permitted_params
params.permit(histograms: [:name, :value])
end
end
end
end
end