Latest advice for usage in an Astro site deployed on Cloudflare? Documentation improvements for that setup? #15097
zemccartney
started this conversation in
Features / New SDKs (Integrations) / Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I recently built a site with the following stack:
output: 'static'
(default) in my astro config)I struggled to integrate Sentry, so I'm wondering: What's the latest recommend approach for using Sentry in Astro on Cloudflare? To identify if this is more an issue of me being a dummy or if I indeed ran into an integration issue
Or more to the point: is the approach documented in https://docs.sentry.io/platforms/javascript/guides/cloudflare/frameworks/astro/ specifically, recommending the
sentryPagesPlugin
approach, still current?Based on what I was able to get working, it seems that, in astro's cloudflare integration, you don't have access to the underlying worker /
onRequest
middleware (I'm not sure this is the case, more wondering if the integration, at least under certain conditions, ignores anyfunctions/_middleware.js
file, as if I understand correctly, that integration outputs its own workers function under the hood), meaning:Sentry.captureException
wasn't sending errors to my account)wrapRequestHandler
API instead" — is the right fit hereSo I'm wondering:
wrapRequestHandler
in my astro middleware the way to go from hereon out?captureException
API: https://github.com/zemccartney/nba-surprise-teams/blob/6f3b952c77cdf562f7e8ba6d4eeab5479be2dad2/src/actions/index.ts#L158I think it's worth calling out in what situations a user might "not have access to the onRequest middleware API," such that it's easier to pinpoint when that approach vs. other sentry cloudflare APIs are better suited for integration
Beta Was this translation helpful? Give feedback.
All reactions