Buildkite is a continuous integration and deployment platform that allows you to run builds on your own infrastructure, providing you with full control over security and customizing your build environment while managing orchestration in the cloud.
Set up tracing on Buildkite to optimize your resource usage, reduce overhead, and improve the speed and quality of your software development lifecycle.
Custom tags can be added to Buildkite traces by using the buildkite-agent meta-data set command.
Any metadata tags with a key starting with dd_tags. are added to the job and pipeline spans. These
tags can be used to create string facets to search and organize the pipelines.
The YAML below illustrates a simple pipeline where tags for the team name and the Go version have
been set.
steps:- command:buildkite-agent meta-data set "dd_tags.team" "backend"- command:go version | buildkite-agent meta-data set "dd_tags.go.version"label:Go version- commands:go test ./...label:Run tests
The following tags are shown in the root span as well as the relevant job span in Datadog.
team: backend
go.version: go version go1.17 darwin/amd64 (output depends on the runner)
The resulting pipeline looks like the following:
Any metadata with a key starting with dd-measures. and containing a numerical value will be set as
a metric tag that can be used to create numerical measures.
You can use the buildkite-agent meta-data set command to create these tags.
For example, you can measure the binary size in a pipeline with this command:
steps:- commands:- go build -o dst/binary .- ls -l dst/binary | awk '{print \$5}' | tr -d '\n' | buildkite-agent meta-data set "dd_measures.binary_size"label:Go build
The resulting pipeline will have the tags shown below in the pipeline span:
binary_size: 502 (output depends on the file size)
In this example, you can use the value of binary_size to plot the change in the binary size over time.
If you are using Buildkite agents, you can correlate jobs with the infrastructure that is running them.
For this feature to work, install the Datadog Agent in the hosts running the Buildkite agents.