I am using a sentry plugin as middleware

I am using a sentry plugin as middleware and a custom function that responds to form submissions. I'll try removing one or the other to see if it's specific to the middleware, for instance, or just having the directory at all.
12 Replies
IanVS
IanVSOPā€¢2y ago
Sorry, should have created a thread earlier. I narrowed it down to the sentry plugin.
import sentryPlugin from "@cloudflare/pages-plugin-sentry";

export const onRequest: PagesFunction<{
SENTRY_DSN: string;
SENTRY_ENVIRONMENT: "production" | "deploy-preview";
}> = (context) => {
return sentryPlugin({
dsn: context.env.SENTRY_DSN,
environment: context.env.SENTRY_ENVIRONMENT,
})(context);
};
import sentryPlugin from "@cloudflare/pages-plugin-sentry";

export const onRequest: PagesFunction<{
SENTRY_DSN: string;
SENTRY_ENVIRONMENT: "production" | "deploy-preview";
}> = (context) => {
return sentryPlugin({
dsn: context.env.SENTRY_DSN,
environment: context.env.SENTRY_ENVIRONMENT,
})(context);
};
ā–¶ npm ls @cloudflare/pages-plugin-sentry
[email protected] /Users/ianvs/code/defined/www
ā””ā”€ā”€ @cloudflare/[email protected]
ā–¶ npm ls @cloudflare/pages-plugin-sentry
[email protected] /Users/ianvs/code/defined/www
ā””ā”€ā”€ @cloudflare/[email protected]
I don't have any actual errors being tracked into sentry Seems strange to me that this could be causing the behavior we saw earlier. @csirolli do you also use a function middleware, by chance? When watching the function log stream, refreshing the page will show a successful GET to /site.manifest sometimes, but not always. If the page comes up blank, I don't see a log.
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
IanVS
IanVSOPā€¢2y ago
That's what I'm wondering, yeah. @Unsmart | Tech debt is that possible?
Unsmart
Unsmartā€¢2y ago
I have no clue it is possible the middleware is modifying responses that it shouldnt be šŸ¤·
IanVS
IanVSOPā€¢2y ago
OK, I guess I'll create an issue in GitHub and hope that someone sees it. Thanks for your help in troubleshooting. @james090500 out of curiosity, do you also use any middleware? (I opened https://github.com/cloudflare/pages-plugins/issues/23)
james090500
james090500ā€¢2y ago
I don't have the same issue I use vhe Vue* was just attempting to debug
IanVS
IanVSOPā€¢2y ago
OK, I saw you saying something about having a cached response that was empty Oh no that was someone else, haha thanks, sorry for the ping @proatwork, do you use middleware? You had a similar issue to mine.
GregBrimble
GregBrimbleā€¢2y ago
Ah, I'm just away to publish an updated version to all Plugins tomorrow. I'll ping here when I've done that ā€” can you then upgrade and try it for me? I think I'll be included the fix šŸ™‚
IanVS
IanVSOPā€¢2y ago
Absolutely, thanks so much!
Unknown User
Unknown Userā€¢2y ago
Message Not Public
Sign In & Join Server To View
IanVS
IanVSOPā€¢2y ago
Hi @gregbrimble is there anything else you can share about this? I'm holding off on moving to Cloudflare until middleware works correctly, but if it's going to be a lot longer, I can try working around it and use something other than middleware. Thanks, I updated to the latest version of the sentry plugin, and the issue seems to be resolved.
GregBrimble
GregBrimbleā€¢2y ago
šŸŽ‰ Yes, just released the updated versions of all plugins this afternoon. Please give them a try and let me know if there are any problems!
Want results from more Discord servers?
Add your server