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:
- Columns and model: !262321 (merged)
- Settings API: !262322 (merged)
- Client reads the settings (this MR)
- Merge and deploy the columns and API MRs.
- Set
o11y_provisioner_urlando11y_provisioner_api_keyon GitLab.com. - Merge and deploy this MR.
References
- Related issue: https://gitlab.com/gitlab-org/gitlab/-/work_items/633458
Screenshots or screen recordings
Not applicable, no UI changes.
How to set up and validate locally
-
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' } -
Set both values (via
PUT /application/settingsor the console) to a test endpoint, rerun, and confirm the request goes to the configured URL with the configuredX-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.