Skip to content

fix: workaround for otel agent dependency causes orchestrion failure#3066

Merged
eliottness merged 1 commit into
mainfrom
eliottness/fix-the-fix-of-otel
Jan 6, 2025
Merged

fix: workaround for otel agent dependency causes orchestrion failure#3066
eliottness merged 1 commit into
mainfrom
eliottness/fix-the-fix-of-otel

Conversation

@eliottness

@eliottness eliottness commented Jan 6, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

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 under 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).

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
  • For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

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).
@eliottness
eliottness requested review from a team as code owners January 6, 2025 15:02
@datadog-datadog-prod-us1

Copy link
Copy Markdown

Datadog Report

Branch report: eliottness/fix-the-fix-of-otel
Commit report: 7d002ee
Test service: dd-trace-go

✅ 0 Failed, 5121 Passed, 70 Skipped, 2m 53.05s Total Time

@eliottness
eliottness merged commit 5c4d2b5 into main Jan 6, 2025
@eliottness
eliottness deleted the eliottness/fix-the-fix-of-otel branch January 6, 2025 15:34
darccio added a commit that referenced this pull request Jul 16, 2025
@darccio darccio mentioned this pull request Jul 16, 2025
7 tasks
darccio added a commit that referenced this pull request Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants