feat: Add os and arch to the meta.* data sent #200
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
We live in a multiarch world now! I'm currently thinking about migrating a bunch of CI runners over from x86->arm64, and I can see a few uses for having machine architecture in my buildevents data.
What parts of my CI runs are on an x86 vs arm executor? What's been migrated, which spots are still to be done? (I expect this to be a gradual migration as various dependencies - mostly docker images - become available for arm.)
Performance improvements - can we compare run time of one arch versus another?
Both of these will be easily answered by buildevents data if these fields are present.
Short description of the changes
Takes runtime.{GOOS,GOARCH}, and puts those values into
meta.os
andmeta.arch
. I believe performance impact will be negligible - both of these are constants set by the golang runtime on startup.