Ship CI to Observability - Part 1
What does this MR do and why?
Ship CI to Observability - Part 1
This is the first part of the series of commits to ship CI to Observability. This commit initiates the export of CI data to the GitLab o11y service.
A user can enable the export of CI data to the GitLab o11y service by
setting the GITLAB_OBSERVABILITY_EXPORT CI variable in their pipeline.
variables:
GITLAB_OBSERVABILITY_EXPORT: "traces,metrics,logs"
The variable accepts a comma-separated list of data types to export:
-
traces- Export pipeline and job data as OpenTelemetry traces -
metrics- Export duration and status metrics -
logs- Export pipeline events as structured logs
A user can export any combination:
-
"traces"- Only traces -
"traces,metrics"- Traces and metrics -
"traces,metrics,logs"- Everything (recommended)
The export is triggered by the Ci::Pipelines::HookService when a
pipeline is created. The Ci::Observability::ExportService is
responsible for building the data and sending it to the GitLab o11y
service.
The Gitlab::Observability::OtelExporter is responsible for sending the
data to the GitLab o11y service.
References
Enable CI/CD Pipeline Data Export to OpenTelemetry Endpoints
Screenshots or screen recordings
No UI changes
How to set up and validate locally
Enable runners loc
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.