Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit d237975

Browse files
authored
chore(ci): instrument push_all.sh commands in honeycomb (#63350)
So I can measure the impact of changes on the individual `bazel run` invocations ## Test plan main dry-run and seeing the output https://ui.honeycomb.io/sourcegraph/datasets/buildkite-pushall/result/bCLzgquaSdV?hideCompare ## Changelog
1 parent 76a1c65 commit d237975

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

dev/ci/push_all.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ if $push_prod; then
163163
done
164164
fi
165165

166+
honeyvent=$(bazel "${bazelrc[@]}" build //dev/tools:honeyvent 2>/dev/null && bazel "${bazelrc[@]}" cquery //dev/tools:honeyvent --output=files 2>/dev/null)
167+
166168
images=$(bazel "${bazelrc[@]}" query 'kind("oci_push rule", //...)')
167169

168170
job_file=$(mktemp)
@@ -204,6 +206,15 @@ while read -r line; do
204206
else
205207
echo "--- :docker::arrow_heading_up: $target ${duration}s: failed with $exitcode) :red_circle:"
206208
fi
209+
210+
$honeyvent -k "$CI_HONEYCOMB_API_KEY" -d "buildkite-pushall" \
211+
-n "exit_code" -v "$exitcode" \
212+
-n "duration" -v "$duration" \
213+
-n "target" -v "$target" \
214+
-n "commit" -v "$BUILDKITE_COMMIT" \
215+
-n "build_number" -v "$BUILDKITE_BUILD_NUMBER" \
216+
-n "branch" -v "$BUILDKITE_BRANCH" \
217+
-n "label" -v "$BUILDKITE_LABEL"s
207218
fi
208219
done <"$log_file"
209220

dev/tool_deps.bzl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,17 @@ def tool_deps():
374374
url = "https://playwright.azureedge.net/builds/chromium/1117/chromium-linux.zip",
375375
build_file_content = CHROMIUM_BUILDFILE.format("chrome-linux/chrome"),
376376
)
377+
378+
http_file(
379+
name = "honeyvent-linux-x86_64",
380+
url = "https://github.com/honeycombio/honeyvent/releases/download/v1.1.3/honeyvent-linux-amd64",
381+
sha256 = "3810ad6d70836d5b4f2ef5de27c3c8a3ed4f35bb331635137d44223e285d6fc5",
382+
executable = True,
383+
)
384+
385+
http_file(
386+
name = "honeyvent-darwin-x86_64",
387+
url = "https://github.com/honeycombio/honeyvent/releases/download/v1.1.3/honeyvent-darwin-amd64",
388+
sha256 = "c9acaab8a48aa3345fd323c4315c8aaca52b2f6ce4c6f83b6fa162cd4c516725",
389+
executable = True,
390+
)

dev/tools/BUILD.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,12 @@ alias(
119119
}),
120120
visibility = ["//visibility:public"],
121121
)
122+
123+
tool(
124+
name = "honeyvent",
125+
src = select({
126+
"@bazel_tools//src/conditions:linux_x86_64": ["@honeyvent-linux-x86_64//file:downloaded"],
127+
"@bazel_tools//src/conditions:darwin_x86_64": ["@honeyvent-darwin-x86_64//file:downloaded"],
128+
"@bazel_tools//src/conditions:darwin_arm64": ["@honeyvent-darwin-x86_64//file:downloaded"],
129+
}),
130+
)

0 commit comments

Comments
 (0)