Add application setting for CI telemetry OTEL endpoint URL

What does this MR do and why?

Adds a new ci_telemetry_otel_endpoint application setting that replaces the hardcoded OTEL Collector URL (https://otel-collector.gitlab.net/v1/traces) used for CI job telemetry. This makes the OTEL endpoint configurable by instance administrators.

When the setting is configured and the ci_job_telemetry beta feature flag is enabled, the endpoint URL is included in the features.tracing.otel_endpoints payload in /api/v4/jobs/request responses, allowing runners to push telemetry spans. When the setting is blank/nil or the feature flag is disabled, tracing is omitted from the payload.

Closes #591941

Changes

  • Migration: Adds nullable ci_telemetry_otel_endpoint text column to application_settings (1024 char limit)
  • Model: URL validation (http/https schemes), blank-to-nil normalization via before_validation
  • Build model: Replaces hardcoded OTEL_COLLECTOR_URL constant with Gitlab::CurrentSettings.ci_telemetry_otel_endpoint
  • API: Exposes settings in the application settings entity and accepts it as an optional API parameter
  • Feature flag gating: Entity exposure, controller permitted params, and build features are all gated behind the ci_job_telemetry beta feature flag

No UI/Frontend Changes are in the scope of this MR

How to set up and validate locally

  1. Enable the feature flag:

    Feature.enable(:ci_job_telemetry)
  2. Set the OTEL endpoint via Rails console:

    ApplicationSetting.current.update!(ci_telemetry_otel_endpoint: 'https://otel-collector.example.com/v1/traces')
  3. Register a runner and request a job — verify features.tracing includes the configured endpoint URL.

  4. Clear the setting or disable the feature flag — verify features.tracing is absent from the response.

MR acceptance checklist

  • Tests added for all new/changed functionality
  • Rubocop passes with no offenses
  • OpenAPI docs regenerated
Edited by Narendran

Merge request reports

Loading