buildkite / buildkite/agent

Emit exit_code, signal, and signal_reason as part of opentelemetry traces/spans

Open
#4,043 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.1k
Forks
378
Avg merge
2d 6h
Merged PRs (30d)
74

Description

## Is your feature request related to a problem? Please describe.

A recent updated exposed `signal` and `signal_reason` as part of the REST job object
https://buildkite.com/resources/changelog/369-diagnose-infrastructure-related-job-failures-through-the-rest-api/

It would be really useful to expose these fields in the agent's otel traces/spans so more easily alert on and track down infrastructure related problems.

For example, flaky agent terminations due to infra issues have been relatively difficult to detect and alert on, but being able to query metrics against `agent_stop` will be helpful in closing that gap

## Describe the solution you'd like
Emit exit_code, signal, and signal_reason as part of opentelemetry traces/spans

## Describe alternatives you've considered
N/A

## Affiliation (optional)
notion

## Additional context
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Research direction

Start by locating the OpenTelemetry instrumentation for the agent_stop event and reviewing how existing trace or span attributes are emitted. Add exit_code, signal, and signal_reason to the relevant traces or spans, then verify that infrastructure-related agent terminations expose all three fields for querying and alerting.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
63/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.