Help us learn about your current experience with the documentation. Take the survey.

Show CI/CD pipeline telemetry for Observability

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed
  • Status: Experiment

When enabled, GitLab Observability automatically instruments your CI/CD pipelines, providing visibility into pipeline performance, job durations, and execution flow without any code changes.

  • Visibility into which jobs are slowing down your pipelines.
  • How pipeline performance changes over time.
  • Bottlenecks in your deployment process.

Enable pipeline instrumentation

To enable automatic pipeline instrumentation, add the GITLAB_OBSERVABILITY_EXPORT CI/CD variable to your project or group:

  1. In the top bar, select Search or go to and find your project or group.
  2. In the left sidebar, select Settings > CI/CD.
  3. Expand Variables.
  4. Select Add variable.
  5. Configure the variable:
    • Key: GITLAB_OBSERVABILITY_EXPORT
    • Value: One or more of traces, metrics, logs (comma-separated for multiple values)
    • Type: Variable
    • Environment scope: All (or specific environments)
  6. Select Add variable.

Authenticate exported data (optional)

If your GitLab Observability instance requires bearer-token authorization on its OTLP endpoint, provide the token through the GITLAB_OBSERVABILITY_TOKEN CI/CD variable. When set, GitLab sends it as an Authorization: Bearer <token> header with the exported telemetry. When the variable is not set, GitLab exports the data without an Authorization header, exactly as before.

  1. In the top bar, select Search or go to and find your project or group.
  2. In the left sidebar, select Settings > CI/CD.
  3. Expand Variables.
  4. Select Add variable.
  5. Configure the variable:
    • Key: GITLAB_OBSERVABILITY_TOKEN
    • Value: The token generated in your GitLab Observability instance.
    • Type: Variable
    • Flags: Select Mask variable so the token is not exposed in job logs.
  6. Select Add variable.

Instrumentation types

The GITLAB_OBSERVABILITY_EXPORT variable accepts the following values:

  • traces: Exports distributed traces showing pipeline execution flow, job dependencies, and timing
  • metrics: Exports metrics about pipeline duration, job success rates, and resource usage
  • logs: Exports structured logs from pipeline execution

You can enable multiple types by separating them with commas:

traces,metrics,logs

Exported data

GitLab exports each signal type as OpenTelemetry Protocol (OTLP) data. Every attribute is emitted under both a legacy GitLab namespace (pipeline.*, job.*, gitlab.*) and, where one exists, the equivalent OpenTelemetry CI/CD semantic convention namespace (cicd.*, vcs.*).

Traces

Each pipeline is exported as a single resource span containing one pipeline span and one job span for each job or bridge in the pipeline.

The resource carries the following attributes:

AttributeDescription
service.nameThe configured service name, or the project name if not configured.
service.versionThe static value 1.0.0.
deployment.environmentThe configured environment, or production if not configured.
vcs.provider.nameThe static value gitlab.
vcs.repository.nameThe name of the project.
gitlab.vcs.repository.idThe ID of the project.
vcs.repository.url.fullThe web URL of the project.
vcs.owner.nameThe namespace that owns the project.

The pipeline span carries the following attributes:

AttributeDescription
pipeline.idThe ID of the pipeline.
pipeline.iidThe project-scoped internal ID of the pipeline, if available.
pipeline.nameThe name of the pipeline.
pipeline.refThe branch or tag the pipeline ran on.
pipeline.shaThe commit SHA the pipeline ran against.
pipeline.statusThe pipeline status, for example success or failed.
pipeline.detailed_statusThe detailed status text shown in the UI.
pipeline.durationThe pipeline duration in milliseconds.
pipeline.queued_durationThe time the pipeline spent queued, in milliseconds.
pipeline.protected_refWhether the pipeline ran on a protected branch or tag.
pipeline.urlThe URL of the pipeline.
pipeline.tagWhether the pipeline ran on a tag, if this information is available.
pipeline.before_shaThe commit SHA before the pipeline ran, if available.
pipeline.stagesAn array of the pipeline’s stage names, if available.
pipeline.user.idThe ID of the user who triggered the pipeline, if available.
pipeline.user.usernameThe username of the user who triggered the pipeline, if available.
pipeline.commit.idThe SHA of the commit associated with the pipeline, if available.
pipeline.commit.messageThe message of the commit associated with the pipeline, if available.
pipeline.merge_request.idThe ID of the associated merge request, if the pipeline ran for one.
pipeline.merge_request.iidThe internal ID of the associated merge request, if the pipeline ran for one.
pipeline.source_pipeline.pipeline_idThe ID of the parent pipeline, for child or multi-project pipelines.
cicd.pipeline.nameThe name of the pipeline.
cicd.pipeline.resultThe pipeline result. See Attribute value mapping.
cicd.pipeline.run.idThe ID of the pipeline, as a string.
cicd.pipeline.run.stateThe pipeline run state. See Attribute value mapping.
cicd.pipeline.run.url.fullThe URL of the pipeline.
vcs.ref.head.nameThe branch or tag the pipeline ran on.
vcs.ref.head.revisionThe commit SHA the pipeline ran against.
vcs.ref.head.typeEither tag or branch.
vcs.ref.base.revisionThe commit SHA before the pipeline ran, if available.
vcs.change.idThe internal ID of the associated merge request, as a string, if the pipeline ran for one.
vcs.change.titleThe title of the associated merge request, if the pipeline ran for one.
vcs.change.stateThe state of the associated merge request. See Attribute value mapping.
vcs.ref.base.nameThe target branch of the associated merge request, if the pipeline ran for one.
gitlab.vcs.ref.head.revision.messageThe message of the commit associated with the pipeline, if available.
gitlab.cicd.pipeline.run.durationThe pipeline duration in milliseconds.
gitlab.cicd.pipeline.run.queued_durationThe time the pipeline spent queued, in milliseconds.
gitlab.cicd.pipeline.source_pipeline.idThe ID of the parent pipeline, for child or multi-project pipelines.
gitlab.cicd.pipeline.stagesAn array of the pipeline’s stage names, if available.
gitlab.cicd.pipeline.trigger.typeThe event that triggered the pipeline, for example push or schedule.
gitlab.cicd.pipeline.user.idThe ID of the user who triggered the pipeline, if available.
gitlab.cicd.pipeline.user.usernameThe username of the user who triggered the pipeline, if available.
gitlab.vcs.ref.head.protectedWhether the pipeline ran on a protected branch or tag.

The job span carries the following attributes for each job or bridge:

AttributeDescription
job.idThe ID of the job.
job.nameThe name of the job.
job.stageThe stage the job belongs to.
job.statusThe job status, for example success or failed.
job.durationThe job duration in milliseconds.
job.queued_durationThe time the job spent queued, in milliseconds.
job.manualWhether the job requires manual action to run.
job.allow_failureWhether the job is allowed to fail without affecting the pipeline result.
job.failure_reasonThe reason the job failed, if it failed.
job.typeThe value bridge for jobs that trigger downstream pipelines.
job.created_atThe time the job was created, in Unix nanoseconds.
job.whenThe rules or when keyword value that determined whether the job ran, if available.
job.user.idThe ID of the user associated with the job, if available.
job.user.usernameThe username of the user associated with the job, if available.
job.artifacts.filenameThe filename of the job’s artifacts archive, if the job produced one.
job.artifacts.sizeThe size of the job’s artifacts archive in bytes, if the job produced one.
job.runner.idThe ID of the runner that ran the job, if the job has a runner.
job.runner.descriptionThe description of the runner that ran the job, if the job has a runner.
job.runner.tagsThe tags of the runner that ran the job, if the job has a runner.
job.runner.typeThe runner type, for example instance_type or project_type, if available.
job.runner.activeWhether the runner is active, if available.
job.runner.is_sharedWhether the runner is shared across projects, if available.
job.environment.nameThe name of the environment the job deploys to, if the job has an environment.
job.environment.actionThe deployment action, for example start or stop, if the job has an environment.
job.environment.deployment_tierThe deployment tier of the environment, if available.
cicd.pipeline.task.nameThe name of the job.
cicd.pipeline.task.run.idThe ID of the job, as a string.
cicd.pipeline.task.run.resultThe job result. See Attribute value mapping.
cicd.pipeline.task.run.stateThe job run state. See Attribute value mapping.
cicd.pipeline.task.run.url.fullThe URL of the job.
cicd.pipeline.task.typeThe stage the job belongs to.
gitlab.cicd.pipeline.task.allow_failureWhether the job is allowed to fail without affecting the pipeline result.
gitlab.cicd.pipeline.task.kindThe value bridge for jobs that trigger downstream pipelines.
gitlab.cicd.pipeline.task.run.created_atThe time the job was created, in Unix nanoseconds.
gitlab.cicd.pipeline.task.run.durationThe job duration in milliseconds.
gitlab.cicd.pipeline.task.run.failure_reasonThe reason the job failed, if it failed.
gitlab.cicd.pipeline.task.run.queued_durationThe time the job spent queued, in milliseconds.
gitlab.cicd.pipeline.task.run.whenThe rules or when keyword value that determined whether the job ran, if available.
gitlab.cicd.pipeline.task.trigger.typeThe event that triggered the pipeline, for example push or schedule.
gitlab.cicd.pipeline.task.artifacts.filenameThe filename of the job’s artifacts archive, if the job produced one.
gitlab.cicd.pipeline.task.artifacts.sizeThe size of the job’s artifacts archive in bytes, if the job produced one.
gitlab.cicd.pipeline.task.environment.actionThe deployment action, for example start or stop, if the job has an environment.
gitlab.cicd.pipeline.task.environment.deployment_tierThe deployment tier of the environment, if available.
gitlab.cicd.pipeline.task.environment.nameThe name of the environment the job deploys to, if the job has an environment.
gitlab.cicd.pipeline.task.user.idThe ID of the user associated with the job, if available.
gitlab.cicd.pipeline.task.user.usernameThe username of the user associated with the job, if available.
cicd.worker.idThe ID of the runner that ran the job, as a string, if the job has a runner.
cicd.worker.nameThe description of the runner that ran the job, if the job has a runner.
cicd.worker.stateThe runner state. See Attribute value mapping.
gitlab.cicd.runner.is_sharedWhether the runner is shared across projects, if available.
gitlab.cicd.worker.tagsThe tags of the runner that ran the job, if the job has a runner.
gitlab.cicd.worker.typeThe runner type, for example instance_type or project_type, if available.

For child pipelines triggered by a bridge job, GitLab links the child pipeline’s trace to the triggering job’s span. The parent and child pipelines then appear as a single connected trace.

Metrics

GitLab exports the following metrics for each pipeline:

MetricTypeDescription
pipeline.duration_secondsGaugeThe pipeline duration in seconds. Emitted only when the pipeline has a duration.
cicd.pipeline.run.durationHistogramThe pipeline run duration in seconds. Emitted only when the pipeline has a duration.
pipeline.status_totalCounterThe count of pipeline status changes.
cicd.pipeline.run.countCounterThe count of pipeline runs.
pipeline.jobs_totalGaugeThe number of jobs in the pipeline.
cicd.pipeline.task.totalGaugeThe number of jobs in the pipeline.
job.duration_secondsHistogramThe job duration in seconds, grouped by stage. Emitted only when the pipeline has jobs.
cicd.pipeline.task.durationHistogramThe job duration in seconds, grouped by stage. Emitted only when the pipeline has jobs.
pipeline.queue_duration_secondsGaugeThe time the pipeline spent queued, in seconds. Emitted only when the pipeline was queued.
gitlab.cicd.pipeline.run.queued_durationGaugeThe time the pipeline spent queued, in seconds. Emitted only when the pipeline was queued.
cicd.pipeline.run.errorsCounterThe count of pipeline errors. Emitted only when the pipeline result is failure.

Metric data points carry attributes such as pipeline.status, pipeline.ref, cicd.pipeline.name, cicd.pipeline.result, gitlab.cicd.pipeline.trigger.type, and vcs.ref.head.type. The job.duration_seconds and cicd.pipeline.task.duration histograms carry a job.stage attribute for each data point. The resource for metric data also carries a gitlab.cicd.pipeline.trace_id attribute so metrics can be correlated with the pipeline’s trace. The cicd.pipeline.run.errors data point carries an error.type attribute.

Logs

GitLab exports one log record for the pipeline and one log record for each job. Each log record has the following fields:

FieldDescription
severityNumber and severityTextMapped from the pipeline or job status. See Attribute value mapping.
bodyA human-readable summary, for example Pipeline success: my-pipeline or Job failed: test-job (test).
log.levelThe same value as severityText.
log.sourceEither pipeline or job.
Remaining attributesThe same attribute families as the trace spans: pipeline or job identity, the cicd.* and vcs.* semantic convention attributes, and runner, environment, and artifact attributes when available.

Attribute value mapping

GitLab maps its internal status values to the enum values defined by the OpenTelemetry CI/CD semantic conventions.

Pipeline and job result (cicd.pipeline.result, cicd.pipeline.task.run.result):

GitLab statusOpenTelemetry result
successsuccess
failedfailure
canceledcancellation
skippedskip

Pipeline and job run state (cicd.pipeline.run.state, cicd.pipeline.task.run.state):

GitLab statusOpenTelemetry run state
pendingpending
waiting_for_resourcepending
preparingpending
runningexecuting

Runner state (cicd.worker.state):

Runner active attributeOpenTelemetry worker state
trueavailable
falseoffline

How it works

Once the variable is set, GitLab automatically:

  1. Captures pipeline execution data after each pipeline completes
  2. Converts the data to OpenTelemetry format based on your configuration
  3. Exports the telemetry data to your GitLab Observability instance
  4. Makes the data available in your observability dashboards

No changes to your .gitlab-ci.yml file are required. The instrumentation happens automatically in the background.

View pipeline telemetry

After running pipelines with instrumentation enabled:

  1. In the top bar, select Search or go to and find your group or project.
  2. In the left sidebar, select Observe > Services.
  3. Select your gitlab-ci service to view traces, metrics, and logs from your pipeline executions.

The CI/CD dashboard template from GitLab Observability Templates provides pre-built visualizations for pipeline performance analysis.