CI Functions span instrumentation

Summary

Instrument GitLab Runner to emit child spans for CI Functions under the job_execution parent span. This is Phase 3 of Runner instrumentation — builds on built-in build stage spans from Phase 2.

Overview

CI Functions are user-defined reusable pipeline components that execute within a job. Each CI Function invocation should produce a child span under job_execution, alongside the built-in build stage spans from Phase 2.

Requirements

  1. Create a child span for each CI Function invocation under the job_execution span
  2. Include standard CI Function attributes:
    • ci.function.name — the CI Function identifier
    • ci.function.version — the CI Function version
    • ci.function.status (success/failed)
  3. Stream spans to the OTEL Collector as each CI Function completes
  4. Failed CI Functions should set span status to ERROR with a description
  5. CI Function spans should be siblings of built-in build stage spans (not nested under them)

Architecture Reference

  • CI Function types
  • Step-runner telemetry integration

Related

  • Phase 1 (prerequisite): #39232 (closed), #39231
  • Phase 2 (prerequisite): #39230
  • Parent epic: &20633
Assignee Loading
Time tracking Loading