Add service ping settings options to orbit

What does this MR do and why?

Exposes Service Ping settings on the internal Orbit endpoint (GET /api/v4/internal/orbit/instance) so Orbit can follow the instance's Service Ping configuration, not only the product usage data setting.

This adds three new fields under settings:

  • service_ping_enabled - whether Service Ping is enabled and consented
  • service_ping_generation_enabled - whether Service Ping generation is enabled
  • service_ping_optional_metrics_enabled - whether optional metrics are enabled

These use the same helpers Rails' own Service Ping uses (ServicePing::ServicePingSettings.enabled_and_consented?, usage_ping_generation_enabled?, usage_ping_features_enabled?), ensuring Orbit can't drift from Rails' behavior.

This is Part A of the related issue. Part B (adding "Orbit is turned on" metric to Rails Service Ping) will be handled separately.

How it works with existing test coverage:

Setting gitlab.yml locks it off Online customer_service_enabled? license Offline cloud license Tests
service_ping_enabled false forced to true, even when gitlab.yml is off (still false if consent is pending) no effect CE, EE
service_ping_generation_enabled follows the generation checkbox no effect* no effect* model
service_ping_optional_metrics_enabled false no effect*, stays false unless Service Ping is on in gitlab.yml and the admin settings no effect* gitlab.yml off, DB and EE options

References

Related to https://gitlab.com/gitlab-org/analytics-section/analytics-instrumentation/internal/-/work_items/993

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Nwanna Isong

Merge request reports

Loading
Loading