Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

eliottness
Copy link
Contributor

@eliottness eliottness commented Jan 6, 2025

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

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
158 of 160 checks passed
@eliottness eliottness deleted the eliottness/fix-the-fix-of-otel branch January 6, 2025 15:34
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