[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 tracespan_parent_id— the Railsjob_runningspan ID for this job. The Runner uses this to parent itsjob_executionspan underjob_running, producing the hierarchyjob_lifecycle→job_running→job_execution. For child pipeline jobs, the Railsjob_lifecyclespan itself is a child of the trigger (bridge) job's span — this nesting is handled internally by Rails span emission, not viaspan_parent_idin the payload.otel_endpoints— array of endpoint objects withurland optionalauthconfiguration. For MVC, this is a single entry: GitLab's Collector (configured via theci_telemetry_otel_endpointRails 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.