mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Update sentry-javascript monorepo to v6 (#41991)
* Update sentry-javascript monorepo to v6 * Pass fetch implementation to FetchTransport and stub in unit tests * kick drone Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
@@ -13,7 +13,10 @@ import { GrafanaEdition } from '@grafana/data/src/types/config';
|
||||
jest.mock('@sentry/browser');
|
||||
|
||||
describe('SentryEchoBackend', () => {
|
||||
beforeEach(() => jest.resetAllMocks());
|
||||
beforeEach(() => {
|
||||
jest.resetAllMocks();
|
||||
window.fetch = jest.fn();
|
||||
});
|
||||
|
||||
const buildInfo: BuildInfo = {
|
||||
version: '1.0',
|
||||
|
||||
@@ -21,7 +21,7 @@ export class SentryEchoBackend implements EchoBackend<SentryEchoEvent, SentryEch
|
||||
// set up transports to post events to grafana backend and/or Sentry
|
||||
this.transports = [];
|
||||
if (options.dsn) {
|
||||
this.transports.push(new FetchTransport({ dsn: options.dsn }));
|
||||
this.transports.push(new FetchTransport({ dsn: options.dsn }, fetch));
|
||||
}
|
||||
if (options.customEndpoint) {
|
||||
this.transports.push(new CustomEndpointTransport({ endpoint: options.customEndpoint }));
|
||||
|
||||
Reference in New Issue
Block a user