Closed
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
Package + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other:
Version:
5.14.2
Description
I'm working on setting up Sentry in a React application and extending the FetchTransport to add a metric on the response of the request sentry.io. Debugging through the application shows my promise being invoked twice for each sendEvent call of the transport. A simplified version of my transport that still displays this is as follows:
import * as Sentry from '@sentry/browser';
export class WrappedFetchTransport extends Sentry.Transports.FetchTransport {
public sendEvent(event: Sentry.Event): PromiseLike<Sentry.Response> {
const promise = super.sendEvent(event);
promise.then(
(resp: any) => {
console.log(resp);
},
(reason: any) => {
console.log("error");
}
);
return promise;
}
}
Metadata
Metadata
Assignees
Labels
No labels