Class: Gitlab::Metrics::Dashboard::Stages::MetricEndpointInserter

Inherits:
BaseStage
  • Object
show all
Defined in:
lib/gitlab/metrics/dashboard/stages/metric_endpoint_inserter.rb

Constant Summary

Constants included from Defaults

Defaults::DEFAULT_PANEL_TYPE

Instance Attribute Summary

Attributes inherited from BaseStage

#dashboard, #params, #project

Instance Method Summary collapse

Methods inherited from BaseStage

#initialize

Constructor Details

This class inherits a constructor from Gitlab::Metrics::Dashboard::Stages::BaseStage

Instance Method Details

#transform!Object


8
9
10
11
12
13
14
# File 'lib/gitlab/metrics/dashboard/stages/metric_endpoint_inserter.rb', line 8

def transform!
  raise Errors::DashboardProcessingError, _('Environment is required for Stages::MetricEndpointInserter') unless params[:environment]

  for_metrics do |metric|
    metric[:prometheus_endpoint_path] = endpoint_for_metric(metric)
  end
end