buildx/build
Jonathan A. Sternberg bda968ad5d
metrics: add build command duration metric
This adds a build duration metric for the build command with attributes
related to the buildx driver, the error type (if any), and which options
were used to perform the build from a subset of the options.

This also refactors some of the utility methods used by the git tool to
determine filepaths into its own separate package so they can be reused
in another place.

Also adds a test to ensure the resource is initialized correctly and
doesn't error. The otel handler logging message is suppressed on buildx
invocations so we never see the error if there's a problem with the
schema url. It's so easy to mess up the schema url when upgrading OTEL
that we need a proper test to make sure we haven't broken the
functionality.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2024-02-14 15:58:52 -06:00
..
build.go metrics: add build command duration metric 2024-02-14 15:58:52 -06:00
dial.go Add dial-stdio command 2024-02-08 22:16:00 +00:00
driver.go build: move solveOpt to local struct type 2023-12-11 19:53:05 +01:00
driver_test.go build: infer platform from first node if none set 2023-11-28 11:55:47 +01:00
git.go metrics: add build command duration metric 2024-02-14 15:58:52 -06:00
git_test.go build: set local dirs as frontend attributes 2023-12-21 11:38:11 +01:00
invoke.go build: rename ResultContext to ResultHandle 2023-05-31 09:50:46 +01:00
localstate.go build: support local state group 2023-09-30 01:08:06 +02:00
result.go controller: return original error to preserve stacktrace 2023-10-13 12:09:35 +09:00
url.go build: set remote bake def and remote dockerfile as internal solve 2023-07-19 04:18:28 +02:00
utils.go metrics: add build command duration metric 2024-02-14 15:58:52 -06:00
utils_test.go Permit '=' separator and '[ipv6]' in --add-host 2023-11-22 10:52:14 +00:00