Draft: POC for tracing a pipeline
What does this MR do and why?
Describe in detail what your merge request does and why.
Tracing a pipeline gives us data about the amount of time that each part of the pipeline takes.
Note that this can be used to trace any pipeline, not just the deployment pipelines.
Test this on a local machine
-
Switch your release-tools repo to the following branch:
rp/trace-pipeline
. -
Start a collector on your local system. Command taken from https://opentelemetry.io/docs/instrumentation/ruby/getting-started/#exporting-traces.
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 git clone git@github.com:open-telemetry/opentelemetry-ruby.git; \ cd opentelemetry-ruby/examples/otel-collector; \ docker-compose up -d
-
Run the rake task with:
RELEASE_BOT_DEV_TOKEN='' RELEASE_BOT_OPS_TOKEN='' OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 be rake 'release:trace[https://ops.gitlab.net/gitlab-org/release/tools/-/pipelines/1147161]'
-
Once the rake task completes, open http://localhost:16686/ to view the Jaeger UI.
When searching for traces, make sure to:
- For the
Service
field, selectRelease-Tools
from the dropdown. - Set the
Lookback
field based on when your pipeline was executed. If the pipeline you are tracing was executed 1 week back, set theLookback
to a custom time range that includes the date when the pipeline was executed.
- For the
Example of a traced pipeline viewed using the Jaeger UI:
gitlab-com/gl-infra/delivery#2345 (closed)
Author Check-list
-
Has documentation been updated?
Edited by Reuben Pereira