Skip to content

Commit

Permalink
Use '@sentry/node' instead of Sentry init
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadorequest committed Jun 24, 2021
1 parent 5e21464 commit 31187da
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 11 deletions.
7 changes: 5 additions & 2 deletions src/layouts/core/components/CoreLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import { GenericObject } from '@/modules/core/data/types/GenericObject';
import DefaultErrorLayout from '@/modules/core/errorHandling/DefaultErrorLayout';
import { createLogger } from '@/modules/core/logging/logger';
import PreviewModeBanner from '@/modules/core/previewMode/components/PreviewModeBanner';
import Sentry from '@/modules/core/sentry/init';
import ErrorPage from '@/pages/_error';
import {
Amplitude,
LogOnMount,
} from '@amplitude/react-amplitude';
import { css, SerializedStyles } from '@emotion/react';
import {
css,
SerializedStyles,
} from '@emotion/react';
import * as Sentry from '@sentry/node';
import classnames from 'classnames';
import {
NextRouter,
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/demo/components/DemoLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { GenericObject } from '@/modules/core/data/types/GenericObject';
import DefaultErrorLayout from '@/modules/core/errorHandling/DefaultErrorLayout';
import { createLogger } from '@/modules/core/logging/logger';
import PreviewModeBanner from '@/modules/core/previewMode/components/PreviewModeBanner';
import Sentry from '@/modules/core/sentry/init';
import ErrorPage from '@/pages/_error';
import {
Amplitude,
LogOnMount,
} from '@amplitude/react-amplitude';
import * as Sentry from '@sentry/node';
import classnames from 'classnames';
import {
NextRouter,
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/quickPreview/components/QuickPreviewLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import Head, { HeadProps } from '@/layouts/core/components/CoreHead';
import { SoftPageProps } from '@/layouts/core/types/SoftPageProps';
import { GenericObject } from '@/modules/core/data/types/GenericObject';
import { createLogger } from '@/modules/core/logging/logger';
import Sentry from '@/modules/core/sentry/init';
import {
Amplitude,
LogOnMount,
} from '@amplitude/react-amplitude';
import { css } from '@emotion/react';
import * as Sentry from '@sentry/node';
import React from 'react';
import { Container } from 'reactstrap';
import QuickPreviewBanner from './QuickPreviewBanner';
Expand Down
2 changes: 0 additions & 2 deletions src/modules/core/sentry/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ if (process.env.SENTRY_DSN) {
scope.setTag('runtimeEngine', isBrowser() ? 'browser' : 'server');
});
}

export default Sentry;
2 changes: 1 addition & 1 deletion src/pages/api/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
AMPLITUDE_EVENTS,
} from '@/modules/core/amplitude/events';
import { createLogger } from '@/modules/core/logging/logger';
import Sentry from '@/modules/core/sentry/init';
import { configureReq } from '@/modules/core/sentry/server';
import { flushSafe } from '@/modules/core/sentry/universal';
import * as Sentry from '@sentry/node';
import {
NextApiRequest,
NextApiResponse,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
} from '@/modules/core/amplitude/events';
import { filterExternalAbsoluteUrl } from '@/modules/core/js/url';
import { createLogger } from '@/modules/core/logging/logger';
import Sentry from '@/modules/core/sentry/init';
import { configureReq } from '@/modules/core/sentry/server';
import { flushSafe } from '@/modules/core/sentry/universal';
import * as Sentry from '@sentry/node';
import appendQueryParameter from 'append-query';
import {
NextApiRequest,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/startVercelDeployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
import dispatchWorkflowByPath from '@/modules/core/githubActions/dispatchWorkflowByPath';
import { createLogger } from '@/modules/core/logging/logger';
import { ALERT_TYPES } from '@/modules/core/sentry/config';
import Sentry from '@/modules/core/sentry/init';
import { configureReq } from '@/modules/core/sentry/server';
import * as Sentry from '@sentry/node';
import size from 'lodash.size';
import {
NextApiRequest,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
AMPLITUDE_EVENTS,
} from '@/modules/core/amplitude/events';
import { createLogger } from '@/modules/core/logging/logger';
import Sentry from '@/modules/core/sentry/init';
import { configureReq } from '@/modules/core/sentry/server';
import { flushSafe } from '@/modules/core/sentry/universal';
import * as Sentry from '@sentry/node';
import {
NextApiRequest,
NextApiResponse,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/webhooks/deploymentCompleted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
import { convertRequestBodyToJSObject } from '@/modules/core/api/convertRequestBodyToJSObject';
import { createLogger } from '@/modules/core/logging/logger';
import { ALERT_TYPES } from '@/modules/core/sentry/config';
import Sentry from '@/modules/core/sentry/init';
import { configureReq } from '@/modules/core/sentry/server';
import { flushSafe } from '@/modules/core/sentry/universal';
import * as Sentry from '@sentry/node';
import {
NextApiRequest,
NextApiResponse,
Expand Down

0 comments on commit 31187da

Please sign in to comment.