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/browser
SDK Version
7.55.2
Framework Version
Nuxt.js: 2.15.8, @apollo/client: 3.5.8
Link to Sentry event
No response
SDK Setup
initErrorTracker(username: string): void {
if (this.isInitializedSentry) return;
this.sentry.init({
dsn: "******************",
environment: "development",
release: "",
integrations: [new this.sentry.BrowserTracing()],
ignoreErrors: [/some error message/],
tracesSampleRate: 0.01,
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1
});
this.sentry.configureScope(scope => scope.setUser({ id: username }));
this.isInitializedSentry = true;
this.log('sentry initialized.');
}
initSessionReplay(username: string): void {
if (this.replay) return;
const replay = new this.sentry.Replay({
maskAllText: false,
maskAllInputs: false,
blockAllMedia: false,
networkDetailAllowUrls: [/.*/],
networkCaptureBodies: true
});
this.sentry.configureScope(scope => scope.setUser({ id: username }));
this.sentry.getCurrentHub().getClient()?.addIntegration?.(replay);
this.replay = replay;
this.log('sentry replay initialized.');
}
Steps to Reproduce
When replaying a Sentry session in this environment, the Network response body is undefined.
This problem only occurs for response bodies of API requests using the apollo client response bodies for fetch api requests can be retrieved.
Note that the networkDetailAllowUrls above is a sample, and in my environment, I have set the regular expression to allow only specific APIs to pass through. I have confirmed that the regular expression is correct.
Also, Content-Type of response is application/json.
Expected Result
In the Network tab of the sentry session replay, the response body should be visible.
Actual Result
Response body is undefined in the Network tab of sentry session replay. Response size has been retrieved.
Metadata
Metadata
Assignees
Type
Projects
Status