Understand pull request retry patterns with OpenTelemetry
Understand PR retry patterns in your existing observability tool, without joining webhook data. Buildkite's server-side OpenTelemetry traces include PR metadata, including for GitHub merge-queue builds, and job retry metadata to compare manual and automatic retries and follow attempts.
See how often PRs need retries and which repositories have the most retry activity. Comparing those patterns over time can help you decide where to investigate recurring CI failures and track whether changes reduce retries.
Server-side OpenTelemetry tracing is available only on Enterprise plans. These additions don't change agent-native spans.
Try it with your agent
In [observability tool], what percentage of observed Buildkite PRs
had a manual job retry in the last 7 days?
Write a query using resource attributes buildkite.pipeline.repo and
buildkite.build.pull_request.number, and job span attribute
buildkite.job.retry_source.retry_type = "manual".
Divide distinct PRs with a manual retry by all distinct PRs in the
same dataset and time window, deduplicating by repository + PR number.
Check the tool's attribute mapping and query syntax.
Return the counts and percentage, explaining coverage limitations
and that manual includes API/automation retries. Without data access,
provide runnable steps instead of results.What's in the traces
- PR resource attributes:
buildkite.build.pull_request.number(string) andbuildkite.build.pull_request.url(provider URL). Both are omitted without a PR; the URL is omitted when unavailable. - Job span attributes:
buildkite.job.retries_countcounts preceding manual and automatic retries (0for originals,1for first retries).buildkite.job.retry_source.job_idlinks to the preceding job's UUID;buildkite.job.retry_source.retry_typeidentifies the incoming retry asmanualorautomatic. Both source attributes are omitted for originals or unavailable predecessors.
Results reflect the traces your tool receives and retains, not every retry; attempts that never started aren't included.
For setup and integration details, see the OpenTelemetry docs.
Buildkite
Start turning complexity into an advantage
Create an account to get started for free.