Class: MetricsController
- Inherits:
-
BaseActionController
- Object
- ActionController::Base
- BaseActionController
- MetricsController
- Includes:
- RequiresAllowlistedMonitoringClient
- Defined in:
- app/controllers/metrics_controller.rb
Instance Method Summary collapse
Methods inherited from BaseActionController
#append_to_content_security_policy
Methods included from ContentSecurityPolicyPatch
#content_security_policy_with_context
Methods included from CurrentOrganization
Instance Method Details
#index ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/metrics_controller.rb', line 8 def index response = if Gitlab::Metrics.prometheus_metrics_enabled? metrics_service.metrics_text else help_page = help_page_url( 'administration/monitoring/prometheus/gitlab_metrics.md') "# Metrics are disabled, see: #{help_page}\n" end render plain: response, content_type: 'text/plain; version=0.0.4' end |
#system ⇒ Object
20 21 22 |
# File 'app/controllers/metrics_controller.rb', line 20 def system render json: system_metrics end |