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: patch both trace/tracer.js files #222

Closed
wants to merge 1 commit into from

Conversation

dario-piotrowicz
Copy link
Contributor

fixes #219


Currently we patch the .open-next/.next/standalone/node_modules/next/dist/server/lib/trace/tracer.js file but it turns out that we get another copy of the tracer.js file at .open-next/server-functions/defaults/node_modules/next/dist/server/lib/trace/tracer.js (from copyTracedFiles) that needs patching.

So this PR is making sure that both files do get patched.


TODO

  • test this if possible (thus far I haven't even yet managed to get a minimal repro for the issue 😓)
  • understand and document clearly why we get the two tracer files and if that can be amended instead of patching both files (without a huge refactoring)

Copy link

changeset-bot bot commented Jan 3, 2025

⚠️ No Changeset found

Latest commit: 3b7ea49

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

pkg-pr-new bot commented Jan 3, 2025

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/cloudflare@222

commit: 3b7ea49

@dario-piotrowicz dario-piotrowicz force-pushed the dario/219/opentelemetry branch from 34b0296 to 3b7ea49 Compare January 3, 2025 11:06
@dario-piotrowicz
Copy link
Contributor Author

This doesn't actually seem to be enough, as @opentelemetry/api can be required from various different files 😓

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.

[BUG][@opentelemetry] Could not resolve "../platform"
1 participant