Skip to content

Commit

Permalink
fix: workaround for otel agent dependency causes orchestrion failure
Browse files Browse the repository at this point in the history
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
RomainMuller authored and eliottness committed Jan 6, 2025
1 parent d394d77 commit a53ad61
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions internal/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ import (
"os"

"gopkg.in/DataDog/dd-trace-go.v1/internal/log"

// 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"
)

const (
Expand Down

0 comments on commit a53ad61

Please sign in to comment.