-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: workaround for otel agent dependency causes orchestrion failure
Moved the blank import of `go.opentelemetry.io/collector/pdata/pprofile`` which was introduced to avoid `go mod tidy` from failing to resolve a coherent dependency closure into a new file guarded by a build tag so that it is not present in builds uder normal circumstances. This removes a dependency cycle caused by the `pprofile` package having a transitive dependency on `net/http`, while the `gopkg.in/DataDog/dd-trace-go.v1/internal` package is imported some code that is injected by orchestrion into `net/http` itself (resulting in a cycle, breaking builds).
- Loading branch information
1 parent
4f54e4f
commit a256d2b
Showing
3 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2022 Datadog, Inc. | ||
|
||
//go:build otel_workaround | ||
|
||
package internal | ||
|
||
import ( | ||
// OTel did a breaking change to the module go.opentelemetry.io/collector/pdata which is imported by the agent | ||
// and go.opentelemetry.io/collector/pdata/pprofile depends on it and is breaking because of it | ||
// For some reason the dependency closure won't let use upgrade this module past the point where it does not break anymore | ||
// So we are forced to add a blank import of this module to give us back the control over its version | ||
// | ||
// TODO: remove this once github.com/datadog-agent/pkg/trace has upgraded both modules past the breaking change | ||
_ "go.opentelemetry.io/collector/pdata/pprofile" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters