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
  • Loading branch information
eliottness authored Jan 6, 2025
1 parent 4f57a47 commit 5c4d2b5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
18 changes: 18 additions & 0 deletions internal/agent-otel-workaround.go
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"
)
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 5c4d2b5

Please sign in to comment.