[FF] `ci_job_telemetry` -- Enables job telemetry feature negotiation in CI job requests

Summary

This issue is to roll out the feature on production, that is currently behind the ci_job_telemetry feature flag.

Owners

  • Most appropriate Slack channel to reach out to: #g_ci-platform
  • Best individual to reach out to: @pedropombeiro

Expectations

What are we expecting to happen?

When the ci_job_telemetry feature flag is enabled for a project, the /api/v4/jobs/request endpoint will include a tracing object inside the features object of the job payload response. The tracing object contains:

  • trace_id — derived deterministically from the root pipeline ID, so all jobs across parent and child pipelines share the same trace
  • span_parent_id — the Rails job_running span ID for this job. The Runner uses this to parent its job_execution span under job_running, producing the hierarchy job_lifecyclejob_runningjob_execution. For child pipeline jobs, the Rails job_lifecycle span itself is a child of the trigger (bridge) job's span — this nesting is handled internally by Rails span emission, not via span_parent_id in the payload.
  • otel_endpoints — array of endpoint objects with url and optional auth configuration. For MVC, this is a single entry: GitLab's Collector (configured via the ci_telemetry_otel_endpoint Rails application setting, see #591941 (closed)). BYO OTLP destinations are deferred to future work. See endpoint auth schema.

The presence of features.tracing signals to the GitLab Runner that the pipeline was sampled and it should emit OTLP telemetry data (traces) for CI jobs.

The initial rollout targets DevEx Customer0 projects on hosted runners (i.e. gitlab-org/gitlab and related projects). Sampling is handled at the Rails level using a global application setting (ci_job_telemetry_sampling_rate, see #593834 (closed)) combined with a deterministic hash of the root pipeline ID — features.tracing is only included for sampled pipelines. The OTEL Collector endpoint configuration is provided from Rails via features.tracing.otel_endpoints, so runners receive the endpoint dynamically without static config.toml configuration.

This is a prerequisite for the parent CI Job Telemetry epic, which tracks the full MVC scope including runner instrumentation and the telemetry ingestion pipeline. The product-facing ci_job_telemetry_traces Materialized View is deferred to Phase 3.

Edited by Pedro Pombeiro