Read Observability provisioner settings from instance settings

What does this MR do and why?

Observability::O11yProvisioningClient now reads the provisioner URL and API key from instance settings, using Gitlab::CurrentSettings.o11y_provisioner_url and o11y_provisioner_api_key. The hardcoded values are removed.

If either setting is blank, the client makes no HTTP request and returns Observability provisioner is not configured. CreateGroupO11ySettingWorker logs that as a failed provision. Instances that don't set these values, including Self-Managed and staging, never contact the provisioner.

This is the third of three MRs:

  1. Columns and model: !262321 (merged)
  2. Settings API: !262322 (merged)
  3. Client reads the settings (this MR)

⚠️ Merge only after both settings are set on GitLab.com. Until then, Observability provisioning on GitLab.com fails with "not configured". There's no fallback to the old values, on purpose. Rollout order:

  1. Merge and deploy the columns and API MRs.
  2. Set o11y_provisioner_url and o11y_provisioner_api_key on GitLab.com.
  3. Merge and deploy this MR.

References

Screenshots or screen recordings

Not applicable, no UI changes.

How to set up and validate locally

  1. In the Rails console, with no settings configured:

    Observability::O11yProvisioningClient.new.provision_namespace(Group.first, User.first)
    # => { success: false, error: 'Observability provisioner is not configured' }
  2. Set both values (via PUT /application/settings or the console) to a test endpoint, rerun, and confirm the request goes to the configured URL with the configured X-API-Key.

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.

A maintainer other than the author merges this MR, only after the rollout steps above.

Merge request reports

Loading
Loading