-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/react
SDK Version
9.40.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
- Configure relay to listen to events on my.domain.com.
- Configure the SDK to send events via relay.
- Trigger 5xx errors when sending Fetch or XHR requests to my.domain.com
Expected Result
The SDKs HttpClient integration detects the error and sends via relay. The SDK logs when relay is hosted on a different domain (for example, my.ingest.domain.com):
POST https://my.domain.com/api/v1/.... 500 (Internal Server Error)
Sentry Logger [log]: Captured error event `HTTP Client Error with status code: 500`
Actual Result
The SDK does not send the event to relay when it is hosted in the same domain. The SDK logs do not show the entry Sentry Logger [log]: Captured error event
HTTP Client Error with status code: 500` after the error:
POST https://my.domain.com/api/v1/.... 500 (Internal Server Error)
Sentry Logger [log]: Flushing outcomes...
Sentry Logger [log]: Sending outcomes: [{…}]0: {reason: 'sample_rate', category: 'transaction', quantity: 1}length: 1[[Prototype]]: Array(0)
Fetch finished loading: POST "https://my.domain.com/api/[PROJ_ID]/envelope/?sentry_version=7&sentry_key=[KEY_ID]&sentry_client=sentry.javascript.react%2F9.40.0".
In resume:
Does not work on shared domain name:
- Application domain: my.domain.com
- Sentry relay: my.domain.com/sentry/
or
- Application domain: my.app.domain.com
- Sentry relay: my.app.domain.com/sentry/
Does work on mixed domain names:
- Application domain: my.domain.com
- Sentry relay: my.ingest.domain.com/sentry/
or
- Application domain: my.app.domain.com
- Sentry relay: my.domain.com/sentry/
Metadata
Metadata
Assignees
Type
Projects
Status
No status