Replay data isn't available to tunnel middleware if Sentry tunnel is enabled #569
Replies: 4 comments
-
It hardly looks like a problem with this module. I would guess that Sentry payload doesn't have |
Beta Was this translation helpful? Give feedback.
-
Based on some fix I did in sentry-testkit, maybe a middleware like |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion @rchl. That did seem to get the issue closer to being resolved, but there was still a missing piece that I didn't figure out. Seeing as I'm just evaluating the Session Replay feature, I didn't spend too much time continuing down that road. I found that the setting below solved the issue for now and Session Replay worked using the tunnel as expected. I found this from a similar issue in another repo // nuxt.config.ts
...
clientIntegrations: {
Replay: {
useCompression: false,
... |
Beta Was this translation helpful? Give feedback.
-
As explained by @lforst in the linked issue:
I would suggest trying Something like this might work: modules: [
'@nuxtjs/proxy',
'@nuxtjs/sentry',
],
proxy: {
'/tunnel/sentry': {
target: 'https://[xxx].ingest.sentry.io/api/[projectId]/envelope/',
ignorePath: true,
},
},
// ...
} Of course the (This setup is not as dynamic as the one suggested by Sentry where Sentry origin and project ID is parsed automatically from the request URL but it might be good enough.) |
Beta Was this translation helpful? Give feedback.
-
Version
@nuxtjs/sentry: 7.2.1
nuxt: 2.16.1
Sentry configuration
Sentry server middleware
Steps to reproduce
src/server-middleware/sentry.tunnel.ts
abovemounted()
function in order to trigger a Sentry errorreq.body
is just an empty objectWhat is Expected?
There should be some kind of data representing the replay event in
req.body
in the tunnel middleware to forward to SentryWhat is actually happening?
req.body
is just an empty object in the tunnel middleware, so there's no replay data to forward to SentryBeta Was this translation helpful? Give feedback.
All reactions