Skip to content
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

Next.js client monitoring not working in EU region #11559

Closed
jkytomak opened this issue Apr 11, 2024 · 27 comments
Closed

Next.js client monitoring not working in EU region #11559

jkytomak opened this issue Apr 11, 2024 · 27 comments

Comments

@jkytomak
Copy link

jkytomak commented Apr 11, 2024

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Install sentry:
"@sentry/nextjs": "^7.109.0",
and create organization in EU region and point it there.

Next version in use is:
"next": "^12.3.4",

Expected Result

Client can send Sentry events via server to Sentry EU.

Actual Result

Server monitoring works fine, but client gets from /api/monitoring requests this response:

403 Forbidden
{"detail":"event submission rejected with_reason: ProjectId"}

If I change the client dsn to old US one, client monitoring works.

Product Area

Replays and Issues

Link

ORG_SLUG: humbol

DSN

No response

Version

No response

@getsantry
Copy link

getsantry bot commented Apr 11, 2024

Assigning to @getsentry/support for routing ⏲️

@jkytomak jkytomak changed the title Next.js client (non Vercel) monitoring not working in EU region Next.js client monitoring not working in EU region Apr 11, 2024
@InterstellarStella InterstellarStella transferred this issue from getsentry/sentry Apr 11, 2024
@lforst
Copy link
Member

lforst commented Apr 12, 2024

I assume you are using the tunnelRoute option. Can you double check whether you are indeed on version 7.109.0 and maybe share one of these requests from the network tab? Thank you!

@jkytomak
Copy link
Author

jkytomak commented Apr 12, 2024

Yes, we are using tunnelRoute: '/api/monitoring',

Here is request:

{"sent_at":"2024-04-12T07:26:44.933Z","sdk":{"name":"sentry.javascript.nextjs","version":"7.109.0"},"dsn":"https://603274cecaa62d8b2824d81d1ab8dc43@o4507050875748352.ingest.de.sentry.io/4507051030282320"}
{"type":"session"}
{"sid":"8680b5846b0e4cc7ac08cd0dfa0c3838","init":false,"started":"2024-04-12T07:26:31.872Z","timestamp":"2024-04-12T07:26:44.933Z","status":"exited","errors":0,"did":"f97c6f00-0b7b-4375-819d-f0ceee97f284","attrs":{"release":"v2024.4.11-3-jyri-29_add_client_monitoring","environment":"qa.humbol.app","user_agent":"Mozilla/5.0 
(Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0"}}

Second one:

{"sent_at":"2024-04-12T07:26:44.933Z","sdk":{"name":"sentry.javascript.nextjs","version":"7.109.0"},"dsn":"https://603274cecaa62d8b2824d81d1ab8dc43@o4507050875748352.ingest.de.sentry.io/4507051030282320"}
{"type":"session"}
{"sid":"1fd6db503b724711a6541ba26ca0bd9a","init":true,"started":"2024-04-12T07:26:44.933Z","timestamp":"2024-04-12T07:26:44.933Z","status":"ok","errors":0,"did":"f97c6f00-0b7b-4375-819d-f0ceee97f284","attrs":{"release":"v2024.4.11-3-jyri-29_add_client_monitoring","environment":"qa.humbol.app","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0"}}

Skipped ones return 200 from our server:

{"dsn":"https://603274cecaa62d8b2824d81d1ab8dc43@o4507050875748352.ingest.de.sentry.io/4507051030282320"}
{"type":"client_report"}
{"timestamp":1712906791.743,"discarded_events":[{"reason":"sample_rate","category":"transaction","quantity":2}]}

PS. you can try yourself from our QA env. Note: Sentry is not all the time there, because it's not yet merged to master.

Yes, we have 7.109.0:

$ grep sentry yarn.lock 
"@sentry-internal/feedback@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.109.0.tgz#4657d7f36a1de3be466f42735d295e212b7eca11"
    "@sentry/core" "7.109.0"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
"@sentry-internal/replay-canvas@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.109.0.tgz#9a00857994a9487428296feed4a9ddf2d62bab84"
    "@sentry/core" "7.109.0"
    "@sentry/replay" "7.109.0"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
"@sentry-internal/tracing@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.109.0.tgz#3effaa132c41a65378fa98146aea61228d528953"
    "@sentry/core" "7.109.0"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
"@sentry/browser@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.109.0.tgz#13b2623f43047f292cf7d6070128a7501e008693"
    "@sentry-internal/feedback" "7.109.0"
    "@sentry-internal/replay-canvas" "7.109.0"
    "@sentry-internal/tracing" "7.109.0"
    "@sentry/core" "7.109.0"
    "@sentry/replay" "7.109.0"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
"@sentry/cli@^1.77.1":
  resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.77.3.tgz#c40b4d09b0878d6565d42a915855add99db4fec3"
"@sentry/core@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.109.0.tgz#7a02f4af4a676950f6555f552a2a232d4458fcd5"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
"@sentry/integrations@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.109.0.tgz#36f8233f55e6b0d4bdb7e7466714575a1d65f3cf"
    "@sentry/core" "7.109.0"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
"@sentry/nextjs@^7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-7.109.0.tgz#f29c62e5a7581ee20f9add73b1de7c2cd3667b3b"
    "@sentry/core" "7.109.0"
    "@sentry/integrations" "7.109.0"
    "@sentry/node" "7.109.0"
    "@sentry/react" "7.109.0"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
    "@sentry/vercel-edge" "7.109.0"
    "@sentry/webpack-plugin" "1.21.0"
"@sentry/node@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.109.0.tgz#dbf152212e42a9b1648ff758ec5bffcb6bb0fa49"
    "@sentry-internal/tracing" "7.109.0"
    "@sentry/core" "7.109.0"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
"@sentry/react@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.109.0.tgz#ae8a2950d2022e83f1bccd8b994f0096f3dd1682"
    "@sentry/browser" "7.109.0"
    "@sentry/core" "7.109.0"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
"@sentry/replay@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.109.0.tgz#f50fb0140c81fce660c44cc93c35988898b8348b"
    "@sentry-internal/tracing" "7.109.0"
    "@sentry/core" "7.109.0"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
"@sentry/types@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.109.0.tgz#d8778358114ed05be734661cc9e1e261f4494947"
"@sentry/utils@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.109.0.tgz#7078e1400197abc1b0c436679bef980639500a86"
    "@sentry/types" "7.109.0"
"@sentry/vercel-edge@7.109.0":
  resolved "https://registry.yarnpkg.com/@sentry/vercel-edge/-/vercel-edge-7.109.0.tgz#4e3e1fd5b05be3a59ddc6d6b40407dd929f75b3d"
    "@sentry-internal/tracing" "7.109.0"
    "@sentry/core" "7.109.0"
    "@sentry/types" "7.109.0"
    "@sentry/utils" "7.109.0"
"@sentry/webpack-plugin@1.21.0":
  resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-1.21.0.tgz#bbe7cb293751f80246a4a56f9a7dd6de00f14b58"
    "@sentry/cli" "^1.77.1"

@lforst
Copy link
Member

lforst commented Apr 12, 2024

Interesting. These seem to be Session event payloads. If you trigger an error event, does it also get the 403 response?

Also, can you try removing the tunnelRoute option as a workaround?

@lforst
Copy link
Member

lforst commented Apr 12, 2024

It seems like it's working on your page (even with the DE dsn)?

Screenshot 2024-04-12 at 10 04 27

Screenshot 2024-04-12 at 10 04 46

@jkytomak
Copy link
Author

jkytomak commented Apr 12, 2024

Yeah, looks like only sessions return 403.
I tried error. It returned ok, but anyhow no issues or replays are visible from https://humbol.sentry.io/issues/
. The whole qa web client environment is missing also from dropdown too, so no issues from browser have ever come through there.

Request:

{"event_id":"87e3ffc420774c928b3b75b93e936ce7","sent_at":"2024-04-12T08:17:14.616Z","sdk":{"name":"sentry.javascript.nextjs","version":"7.109.0"},"dsn":"https://603274cecaa62d8b2824d81d1ab8dc43@o4507050875748352.ingest.de.sentry.io/4507051030282320","trace":{"environment":"qa.humbol.app","release":"v2024.4.11-3-jyri-29_add_client_monitoring","public_key":"603274cecaa62d8b2824d81d1ab8dc43","trace_id":"4011a314a14b4b38b06fe3a203d4e23a","transaction":"/interactions/[interactionUuid]","sampled":"false"}}
{"type":"event"}
{"exception":{"values":[{"type":"AxiosError","value":"Request failed with status code 404","stacktrace":{"frames":[{"filename":"app:///_next/static/chunks/main-06094b8242670179.js","function":"60932/t.Z/<","in_app":false,"lineno":1,"colno":1027},{"filename":"app:///_next/static/chunks/main-06094b8242670179.js","function":"60932/t.Z/</<","in_app":false,"lineno":1,"colno":1147},{"filename":"app:///_next/static/chunks/main-06094b8242670179.js","function":"u","in_app":false,"lineno":1,"colno":1088},{"filename":"app:///_next/static/chunks/main-06094b8242670179.js","function":"r","in_app":false,"lineno":1,"colno":882},{"filename":"app:///_next/static/chunks/main-06094b8242670179.js","function":"20414/f/u/<","in_app":false,"lineno":1,"colno":12002},{"filename":"app:///_next/static/chunks/main-06094b8242670179.js","function":"20414/f/u/</<","in_app":false,"lineno":1,"colno":11897},{"filename":"app:///_next/static/chunks/main-06094b8242670179.js","function":"77339/ue/ue</<","in_app":false,"lineno":1,"colno":29256},{"filename":"app:///_next/static/chunks/main-06094b8242670179.js","function":"oe","in_app":false,"lineno":1,"colno":28942},{"filename":"app:///_next/static/chunks/main-06094b8242670179.js","function":"77339/oe/<","in_app":false,"lineno":1,"colno":28908},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"64448/t.hydrate","in_app":false,"lineno":1,"colno":117972},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"os","in_app":false,"lineno":1,"colno":110576},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"ki","in_app":false,"lineno":1,"colno":96092},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"64448/os/<","in_app":false,"lineno":1,"colno":110591},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"es","in_app":false,"lineno":1,"colno":109201},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"hi","in_app":false,"lineno":1,"colno":93062},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"bi","in_app":false,"lineno":1,"colno":95714},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Pi","in_app":false,"lineno":1,"colno":98748},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Ni","in_app":false,"lineno":1,"colno":98887},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Li","in_app":false,"lineno":1,"colno":98959},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Ku","in_app":false,"lineno":1,"colno":111716},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"oo","in_app":false,"lineno":1,"colno":59416},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"E","in_app":true,"lineno":1,"colno":613388},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"promise callback*T","in_app":true,"lineno":1,"colno":612612},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"39455/T/<","in_app":true,"lineno":1,"colno":612637},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"zo","in_app":false,"lineno":1,"colno":64743},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"hi","in_app":false,"lineno":1,"colno":93091},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Kl","in_app":false,"lineno":1,"colno":45088},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Yl","in_app":false,"lineno":1,"colno":45155},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Ql","in_app":false,"lineno":1,"colno":44985},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"60053/t.unstable_runWithPriority","in_app":false,"lineno":1,"colno":129354},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"64448/Yl/<","in_app":false,"lineno":1,"colno":45208},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"bi","in_app":false,"lineno":1,"colno":95714},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Pi","in_app":false,"lineno":1,"colno":98748},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Ni","in_app":false,"lineno":1,"colno":98887},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Li","in_app":false,"lineno":1,"colno":98959},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Ku","in_app":false,"lineno":1,"colno":112707},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"Wo","in_app":false,"lineno":1,"colno":68983},{"filename":"app:///_next/static/chunks/framework-bb5c596eafb42b22.js","function":"oo","in_app":false,"lineno":1,"colno":59416},{"filename":"app:///_next/static/chunks/414-54447272ffa155d0.js","function":"47881/t.default","in_app":true,"lineno":1,"colno":26812},{"filename":"app:///_next/static/chunks/414-54447272ffa155d0.js","function":"ie","in_app":true,"lineno":1,"colno":19771},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"5121/i/<","in_app":true,"lineno":1,"colno":1549885},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"5121/</Fe.prototype[e]","in_app":true,"lineno":1,"colno":1576395},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"request","in_app":true,"lineno":1,"colno":1574640},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"_request","in_app":true,"lineno":1,"colno":1576100},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"Ne","in_app":true,"lineno":1,"colno":1572162},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"5121/Ae.xhr<","in_app":true,"lineno":1,"colno":1568163},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"EventHandlerNonNull*5121/Ae.xhr</<","in_app":true,"lineno":1,"colno":1569475},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"f","in_app":true,"lineno":1,"colno":1569185},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"5121/Ae.xhr</</f/<","in_app":true,"lineno":1,"colno":1569040},{"filename":"app:///_next/static/chunks/pages/_app-604d1edde64d25ec.js","function":"U","in_app":true,"lineno":1,"colno":1555119}]},"mechanism":{"type":"generic","handled":true}}]},"level":"error","event_id":"87e3ffc420774c928b3b75b93e936ce7","platform":"javascript","request":{"url":"https://qa.humbol.app/interactions/203fb1c2-4c4d-4a75-a046-3db0276dc08e","headers":{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0"}},"timestamp":1712909834.615,"environment":"qa.humbol.app","release":"v2024.4.11-3-jyri-29_add_client_monitoring","sdk":{"integrations":["InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","HttpContext","RewriteFrames","BrowserTracing","Replay"],"name":"sentry.javascript.nextjs","version":"7.109.0","packages":[{"name":"npm:@sentry/nextjs","version":"7.109.0"},{"name":"npm:@sentry/react","version":"7.109.0"}]},"extra":{"message":"Failed to fetch interactions"},"tags":{"transaction":"/interactions/[interactionUuid]","runtime":"browser","sessionId":"f01d53b7346b29094d85c4b1470702502124b0a3","serverVersion":"v2024.4.11-3-jyri-29_add_client_monitoring","activeOrganization":"22372cc7-3711-4a8f-98bb-dc53f75fe74e","replayId":"8a1ccb6ec3044e729a429566c19dd85e"},"user":{"id":"f97c6f00-0b7b-4375-819d-f0ceee97f284"},"contexts":{"trace":{"data":{"sentry.origin":"auto.pageload.nextjs.pages_router_instrumentation","sentry.op":"pageload"},"op":"pageload","parent_span_id":"b4494476551e9002","span_id":"82bea65097608475","tags":{"routing.instrumentation":"next-pages-router"},"trace_id":"4011a314a14b4b38b06fe3a203d4e23a","origin":"auto.pageload.nextjs.pages_router_instrumentation"}},"breadcrumbs":[{"timestamp":1712909834.347,"category":"navigation","data":{"from":"/interactions/203fb1c2-4c4d-4a75-a046-3db0276dc08e","to":"/interactions/203fb1c2-4c4d-4a75-a046-3db0276dc08e"}},{"timestamp":1712909834.353,"message":"Reloading session f01d53b7346b29094d85c4b1470702502124b0a3 for account f97c6f00-0b7b-4375-819d-f0ceee97f284 in organization 22372cc7-3711-4a8f-98bb-dc53f75fe74e","category":"info","level":"info","data":{}},{"timestamp":1712909834.471,"category":"xhr","data":{"method":"GET","url":"/api/login/token?requestedOrganization=22372cc7-3711-4a8f-98bb-dc53f75fe74e","status_code":200,"response_body_size":2694},"type":"http"},{"timestamp":1712909834.472,"message":"Reloading session","category":"info","level":"info","data":{"sessionId":"f01d53b7346b29094d85c4b1470702502124b0a3","serverVersion":"v2024.4.11-3-jyri-29_add_client_monitoring","environment":"qa","account":{"uuid":"f97c6f00-0b7b-4375-819d-f0ceee97f284","email":"jyri@humbol.app","firstName":"Jyri","lastName":"Kytömäki","language":"en","applicationLanguage":"fi","status":"active","changed":"2024-02-22T16:49:11.154Z","photoUrl":"https://qa-images.humbol.app/accounts/f97c6f00-0b7b-4375-819d-f0ceee97f284.jpg"},"activeOrganizationRole":{"role":"admin","startTime":"2021-04-14T09:10:55.808Z","changer":"f97c6f00-0b7b-4375-819d-f0ceee97f284","account":"f97c6f00-0b7b-4375-819d-f0ceee97f284","organization":"22372cc7-3711-4a8f-98bb-dc53f75fe74e","organizationName":"QA Test","previousLogin":"2024-04-12T08:17:14.032Z"},"organizationRoles":[{"role":"admin","startTime":"2021-02-15T08:22:36.485Z","changer":"f97c6f00-0b7b-4375-819d-f0ceee97f284","account":"f97c6f00-0b7b-4375-819d-f0ceee97f284","organization":"d94717cf-dd79-4343-9147-b7caf08308fb","organizationName":"Humbol","previousLogin":"2024-04-12T08:05:49.569Z"},{"role":"external-admin","startTime":"2023-07-13T15:10:48.445Z","changer":"f97c6f00-0b7b-4375-819d-f0ceee97f284","account":"f97c6f00-0b7b-4375-819d-f0ceee97f284","organization":"74547583-fa73-4e61-abe4-ac0f67883a1f","organizationName":"QA E2E-tests","previousLogin":"2023-12-21T15:29:53.768Z"},{"role":"admin","startTime":"2021-04-14T09:10:55.808Z","changer":"f97c6f00-0b7b-4375-819d-f0ceee97f284","account":"f97c6f00-0b7b-4375-819d-f0ceee97f284","organization":"22372cc7-3711-4a8f-98bb-dc53f75fe74e","organizationName":"QA Test","previousLogin":"2024-04-12T08:17:14.032Z"},{"role":"admin","startTime":"2023-08-17T11:54:35.174Z","changer":"49fa9ad2-44a8-4a28-947d-bffcad0ce6dd","account":"f97c6f00-0b7b-4375-819d-f0ceee97f284","organization":"83e02e15-1a1e-43fd-a457-6b0b527ef97f","organizationName":"QA Test ICal","previousLogin":"2024-04-05T11:59:57.491Z"},{"role":"external-admin","startTime":"2022-07-05T10:42:25.393Z","changer":"f97c6f00-0b7b-4375-819d-f0ceee97f284","account":"f97c6f00-0b7b-4375-819d-f0ceee97f284","organization":"2dfd300d-5680-400c-841f-461d1f5f62f2","organizationName":"QA Test Sec","previousLogin":"2024-04-05T11:59:54.506Z"},{"role":"admin","startTime":"2021-04-14T09:10:25.813Z","changer":"f97c6f00-0b7b-4375-819d-f0ceee97f284","account":"f97c6f00-0b7b-4375-819d-f0ceee97f284","organization":"2ceeb5ed-9890-4ce8-81d2-40c38424d952","organizationName":"System","previousLogin":"2024-03-11T08:44:13.575Z"}],"externalAccountProvider":"microsoft","externalAccountId":"1fe5dfad-f585-428b-bf1e-fad0049f3551","externalCalendarOfflineListeningUntil":"2024-06-14T21:00:00.000Z","externalAccountOfflineTokenValid":true}},{"timestamp":1712909834.473,"message":"Fetching interaction","category":"info","level":"info","data":{}},{"timestamp":1712909834.479,"message":"Fetching organization 22372cc7-3711-4a8f-98bb-dc53f75fe74e","category":"info","level":"info","data":{}},{"timestamp":1712909834.48,"message":"Fetching organization","category":"info","level":"info","data":{}},{"timestamp":1712909834.611,"category":"xhr","data":{"method":"GET","url":"/api/interactions/203fb1c2-4c4d-4a75-a046-3db0276dc08e","status_code":404,"response_body_size":2},"type":"http"}]}

@lforst
Copy link
Member

lforst commented Apr 12, 2024

@jkytomak In my previous message, I shared a screenshot of it working. Is it still broken for you?

@lforst
Copy link
Member

lforst commented Apr 12, 2024

Ok now it stopped working for me again. Odd.

@lforst
Copy link
Member

lforst commented Apr 12, 2024

Screenshot 2024-04-12 at 10 32 16

Can you check whether it is your infrastructure denying the requests?

@jkytomak
Copy link
Author

jkytomak commented Apr 12, 2024

Yes, looks like only about 1/7 goes through.
I think the error response body event submission rejected with_reason: ProjectId is from your serverside library so the request is not blocked by Cloudfront?
And as said no "qa.humbol.app" environment is available in SaaS, so no requests has ever come there from browser (but qa server environment and requests are there so connection from servers to sentry should work).
sentry_requests

@jkytomak
Copy link
Author

jkytomak commented Apr 12, 2024

Note: the same problem happens also on localhost. So should not be related to any aws infra.

@lforst
Copy link
Member

lforst commented Apr 12, 2024

I forwarded this internally. I think I ruled out any SDK causes so it might be our infra or ingest pipeline.

@jkytomak
Copy link
Author

jkytomak commented Apr 12, 2024

Tested locally without tunneling. It works fine (got first browser issue and replay to our DE org).
So looks like this is a tunnelRoute problem.

@jjbayer
Copy link
Member

jjbayer commented Apr 12, 2024

@jkytomak the requests go to /api/monitoring, could it be that this proxy endpoint is set up to connect to sentry.io, not de.sentry.io (even though you pass r=de)?

As for the sporadic 200 responses: The sentry point-of-presence server responds with status 200 opportunistically if it does not have information about the current project in its cache.

@jkytomak
Copy link
Author

We have sentry url configured only in dsn value of sentry.client.config.ts and sentry.server.config.ts.

Here is whole withSentryConfig part of our next.config.js:

// eslint-disable-next-line no-undef
module.exports = withSentryConfig(
  nextConfig,
  {
    // For all available options, see:
    // https://github.com/getsentry/sentry-webpack-plugin#options

    org: 'humbol',
    project: 'humbol-app',

    release: version,

    // Suppresses source map uploading logs during build
    silent: false,
  },
  {
    // For all available options, see:
    // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

    // Upload a larger set of source maps for prettier stack traces (increases build time)
    widenClientFileUpload: true,

    // Transpiles SDK to be compatible with IE11 (increases bundle size)
    transpileClientSDK: false,

    // Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
    tunnelRoute: '/api/monitoring',

    // Hides source maps from generated client bundles
    hideSourceMaps: true,

    // Automatically tree-shake Sentry logger statements to reduce bundle size
    disableLogger: true,
  },
)

@jkytomak
Copy link
Author

jkytomak commented Apr 12, 2024

Added this to sentry-webpack-plugin options:
url: 'https://de.sentry.io/',
it did not help. According to https://github.com/getsentry/sentry-webpack-plugin#options default is https://sentry.io/ .

Note https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ says:

// Additional config options for the Sentry webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, configFile, stripPrefix, urlPrefix, include, ignore

@lforst
Copy link
Member

lforst commented Apr 12, 2024

I think we found the culprit. The matching logic based on the r query param was applied wrongly and we don't send to the localized DSN.

Fix is up here: #11577

@lforst
Copy link
Member

lforst commented Apr 12, 2024

@jkytomak Please disable tunnelRoute for now as a workaround until we have the fix released. Afterwards you can upgrade and the issue should be resolved. Thanks for reporting this and sticking with us. I'll make sure the release goes out on Monday first thing.

@billypap1
Copy link

I have the same issue using @sentry/browser. I migrated my projects from US to EU and it doesn't capture Web Vitals. The performance score is always 0.

@johnrobeds
Copy link

I have the same issue on 7.110.0, although it seems to be an ephemeral issue. I have seen it working in a small number of sessions.

@lforst
Copy link
Member

lforst commented Apr 16, 2024

Hi again, yesterday we released version 7.110.1 which should fix this issue. Would you mind trying it out? Thank you!

@jkytomak
Copy link
Author

Works for us now. Thank you.

@johnrobeds
Copy link

Works for us now too. Thank you

@andreamaiolo
Copy link

Hi, we are experiencing a similar problem using the @sentry/browser package. We have the tunnel option enabled and have had no issues so far. However, the data for the INP parameter is not being sent, even though our express server receives the envelope correctly, as it does for other events. By disabling the tunnel option, the INP parameter is available on the Sentry dashboard. Do you have any clue? Thanks

@AbhiPrasad
Copy link
Member

@andreamaiolo could you open a new GH issue? We can investigate it from there, thanks!

@lforst
Copy link
Member

lforst commented Apr 17, 2024

@andreamaiolo I think your particular problem relates to this issue getsentry/sentry#69089 posted by @billypap1 and not the one in this thread.

@andreamaiolo
Copy link

Thank you both, I have opened this separate issue: #11646

We only encounter the problem when using the tunnel option. By deactivating it we see the INP parameter on the dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

7 participants