Skip to content

fix: telemetry in opennext cloudflare #12327

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

Merged
merged 1 commit into from
May 20, 2025

Conversation

conico974
Copy link
Contributor

What?

This PR help to fix an issue you'll encounter while running payload in OpenNext on cloudflare

Why?

Sending telemetry event will create an infinite loop because it won't be able to find a package.json

How?

Putting the whole logic of sendEvent behind config.telemetry allows to disable it and thus, make it work on cloudflare

See this comment for more info : opennextjs/opennextjs-cloudflare#263 (comment)

@vicb
Copy link

vicb commented May 20, 2025

Would somebody from Payload be able to take a look at this?
Thanks!

@paulpopus
Copy link
Contributor

Thank you so much for these PRs! We'll get these merged soon!

@paulpopus paulpopus merged commit 2ab8e2e into payloadcms:main May 20, 2025
81 checks passed
Copy link
Contributor

🚀 This is included in version v3.39.0

paulpopus pushed a commit that referenced this pull request May 23, 2025
### What?
Fixes an infinite loop that may occur when invoking the findUp() utility
to search for a file by name and no result is found.

### Why?
If triggered, the infinite loop will hang the entire application. For
example, this occurs when trying to boot Payload from a Cloudflare
Worker, as reported in #12327

### How?
By checking whether it has reached the root directory before analysing
the parent folder
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.

3 participants