Skip to content

Commit 827bead

Browse files
committed
cmd/docker: remove handling for BuildKit's detect package
see #4698 (comment) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent f8850d6 commit 827bead

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

cmd/docker/docker.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -313,16 +313,8 @@ func runDocker(dockerCli *command.DockerCli) error {
313313
return err
314314
}
315315

316-
// Buildkit's detect package currently follows the old otel spec which defaulted to gRPC.
317-
// Since the spec changed to default to http/protobuf.
318-
// If these env vars are not set then we set them to the new default so detect will give us the expected protocol.
319-
// This is the same as on the dockerd side.
320-
// This can be removed after buildkit's detect package is updated.
321-
if os.Getenv("OTEL_EXPORTER_OTLP_TRACES_PROTOCOL") == "" && os.Getenv("OTEL_EXPORTER_OTLP_PROTOCOL") == "" {
322-
os.Setenv("OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", "http/protobuf")
323-
}
324316
if v := os.Getenv("OTEL_SERVICE_NAME"); v == "" {
325-
os.Setenv("OTEL_SERVICE_NAME", cmd.Root().Name())
317+
_ = os.Setenv("OTEL_SERVICE_NAME", cmd.Root().Name())
326318
}
327319

328320
if err := initializeTracing(cmd.Context()); err != nil {

0 commit comments

Comments
 (0)