Logpush / Cloudflare Pages / SvelteKit
I'm testing out Logpush. I have an R2 bucket set up but I'm not sure how to get logs sent to it. The docs mention creating and configuring a wrangler.toml file, but I don't think my SvelteKit projects even use that wrangler.toml file. Any insight on this?
5 Replies
Pages doesn't support Workers Trace Events/logpush at the moment
When it does, like all other Pages Functions settings, it'd be under Settings -> Functions. Pages doesn't use the wrangler toml at all (except in
wrangler pages dev
, which it kind of shouldn't, but it doesn't use it in prod)Ok thanks. Does anything exist today to debug or look into performance for my Cloudflare Pages apps? All I see is the "Functions metrics" page which is a very high level overview (e.g. I can't even see what routes are taking what amount of time)
I don't have too much experience with that sort of stuff with Pages. With Workers there's an open source otel library, Sentry integration, etc, but not sure if worker's otel library works on Pages. https://github.com/evanderkoogh/otel-cf-workers
It looks like there is Pages Plugins for Honeycomb for tracing and Sentry for errors, etc: https://developers.cloudflare.com/pages/platform/functions/plugins/honeycomb/
https://developers.cloudflare.com/pages/platform/functions/plugins/sentry/
Thank you I'll look into these a bit more. I did try Sentry but the SvelteKit SDK uses Node 🙄 so it doesn't work on CF. Appreciate the help!
Look for toucan-js to hook up sentry on CF 👍🏼 (uses it on remix/pages)