Skip to content

feat: add agent metadata to OTEL trace attributes#3587

Merged
DrJosh9000 merged 1 commit into
buildkite:mainfrom
pyrocat101:add-agent-metadata-otel-attributes
Nov 20, 2025
Merged

feat: add agent metadata to OTEL trace attributes#3587
DrJosh9000 merged 1 commit into
buildkite:mainfrom
pyrocat101:add-agent-metadata-otel-attributes

Conversation

@pyrocat101

@pyrocat101 pyrocat101 commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Add agent registration tags as OTEL trace attributes with the prefix buildkite.agent.metadata.*
  • Reads from existing BUILDKITE_AGENT_META_DATA_* environment variables from the API's Job.Env response
  • Example: BUILDKITE_AGENT_META_DATA_QUEUE=defaultbuildkite.agent.metadata.queue=default

Test plan

  • Verify build compiles successfully
  • Register agent with tags, run a job, and verify OTEL trace attributes include buildkite.agent.metadata.* entries

🤖 Generated with Claude Code

Add agent registration tags as OTEL trace attributes with the prefix
`buildkite.agent.metadata.*`. The tags are read from existing
BUILDKITE_AGENT_META_DATA_* environment variables that come from the
API's Job.Env response.

Example: BUILDKITE_AGENT_META_DATA_QUEUE=default becomes
buildkite.agent.metadata.queue=default

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

@DrJosh9000 DrJosh9000 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pyrocat101, LGTM

@DrJosh9000 DrJosh9000 merged commit d5cbe2d into buildkite:main Nov 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants