Skip to content

Commit 17da025

Browse files
authored
Revert sentry (#222)
* Revert "adding log because no idea (#221)" This reverts commit 2ac342e. * Revert "trying workflow stuff (#220)" This reverts commit ce897ac. * Revert "add release to main_push workflow (#219)" This reverts commit 8b10ac7. * Revert "Zoe/poc sentry (#218)" This reverts commit 7fa5323.
1 parent 2ac342e commit 17da025

File tree

18 files changed

+39
-303
lines changed

18 files changed

+39
-303
lines changed

.github/workflows/build_and_deploy.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ jobs:
5959
with:
6060
install_components: beta
6161

62-
- name: Create Sentry release
63-
uses: getsentry/action-release@v1
64-
env:
65-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
66-
SENTRY_ORG: 'checkmarble'
67-
SENTRY_PROJECT: 'marble-frontend'
68-
with:
69-
environment: staging
70-
7162
- name: Deploy server
7263
run: |
7364
gcloud run deploy marble-frontend \

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,4 @@ Thumbs.db
4444

4545
# Firebase
4646
firebase-debug.log
47-
ui-debug.log
48-
# Sentry Config File
49-
.sentryclirc
47+
ui-debug.log

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN pnpm install --prod --frozen-lockfile
1212
FROM base AS build
1313
# RUN --mount=type=cache,id=pnpm,target=$PNPM_HOME/store pnpm install --frozen-lockfile
1414
RUN pnpm install --frozen-lockfile
15-
RUN pnpm run -r build-with-sourcemaps
15+
RUN pnpm run -r build
1616

1717
FROM base AS app-builder
1818
ENV NODE_ENV=production
@@ -27,3 +27,4 @@ COPY --from=build /app/packages/app-builder/public /app/packages/app-builder/pub
2727
WORKDIR /app/packages/app-builder
2828
EXPOSE 8080
2929
CMD [ "pnpm", "exec", "remix-serve", "build"]
30+

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373
"@remix-run/node": "^1.19.3",
7474
"@remix-run/react": "^1.19.3",
7575
"@remix-run/serve": "^1.19.3",
76-
"@sentry/cli": "^2.21.2",
77-
"@sentry/remix": "^7.74.0",
7876
"@tanstack/react-table": "^8.10.6",
7977
"@tanstack/react-virtual": "3.0.0-beta.61",
8078
"clsx": "^1.2.1",

packages/app-builder/.env.local

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ SESSION_SECRET=SESSION_SECRET
55
SESSION_MAX_AGE=43200
66

77
MARBLE_API_DOMAIN=http://127.0.0.1:8080
8-
MARBLE_APP_DOMAIN=http://127.0.0.1:3000
98

109
FIREBASE_AUTH_EMULATOR=true
1110
FIREBASE_AUTH_EMULATOR_HOST=http://localhost:9099
@@ -15,8 +14,4 @@ FIREBASE_AUTH_DOMAIN=tokyo-country-381508.firebaseapp.com
1514
FIREBASE_PROJECT_ID=tokyo-country-381508
1615
FIREBASE_STORAGE_BUCKET=tokyo-country-381508.appspot.com
1716
FIREBASE_MESSAGING_SENDER_ID=1047691849054
18-
FIREBASE_APP_ID=1:1047691849054:web:a5b69dd2ac584c1160b3cf
19-
20-
SENTRY_AUTH_TOKEN=dummy
21-
SENTRY_DSN=dummy
22-
SENTRY_ENVIRONMENT=development
17+
FIREBASE_APP_ID=1:1047691849054:web:a5b69dd2ac584c1160b3cf

packages/app-builder/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"type-check": "npx tsc --noEmit",
1616
"dev": "dotenv -e .env.local -- remix dev",
1717
"build": "remix build",
18-
"build-with-sourcemaps": "remix build --sourcemap && sentry-upload-sourcemaps --org checkmarble --project marble-frontend --log-level=debug",
1918
"start": "remix start",
2019
"generate-routes": "source scripts/generateRoutes.sh"
2120
},
Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import { RemixBrowser, useLocation, useMatches } from '@remix-run/react';
2-
import * as Sentry from '@sentry/remix';
3-
import { startTransition, StrictMode, useEffect } from 'react';
1+
import { RemixBrowser } from '@remix-run/react';
2+
import { startTransition, StrictMode } from 'react';
43
import { hydrateRoot } from 'react-dom/client';
54
import { I18nextProvider } from 'react-i18next';
65

76
import { clientServices } from './services/init.client';
8-
import { getClientEnv } from './utils/environment.client';
97

108
async function hydrate() {
119
const { i18nextClientService } = clientServices;
@@ -32,35 +30,3 @@ if (window.requestIdleCallback) {
3230
// eslint-disable-next-line @typescript-eslint/no-misused-promises
3331
window.setTimeout(hydrate, 1);
3432
}
35-
36-
Sentry.init({
37-
dsn: getClientEnv('SENTRY_DSN'),
38-
environment: getClientEnv('SENTRY_ENVIRONMENT'),
39-
integrations: [
40-
new Sentry.BrowserTracing({
41-
routingInstrumentation: Sentry.remixRouterInstrumentation(
42-
useEffect,
43-
useLocation,
44-
useMatches
45-
),
46-
}),
47-
// Replay is only available in the client
48-
new Sentry.Replay(),
49-
],
50-
51-
// Set tracesSampleRate to 1.0 to capture 100%
52-
// of transactions for performance monitoring.
53-
// We recommend adjusting this value in production
54-
tracesSampleRate: 1.0,
55-
56-
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
57-
tracePropagationTargets: [
58-
getClientEnv('MARBLE_APP_DOMAIN'),
59-
getClientEnv('MARBLE_API_DOMAIN'),
60-
],
61-
62-
// Capture Replay for 10% of all sessions,
63-
// plus for 100% of sessions with an error
64-
replaysSessionSampleRate: 0.1,
65-
replaysOnErrorSampleRate: 1.0,
66-
});

packages/app-builder/src/entry.server.tsx

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
import {
2-
type DataFunctionArgs,
3-
type EntryContext,
4-
Response,
5-
} from '@remix-run/node';
1+
import { type EntryContext, Response } from '@remix-run/node';
62
import { RemixServer } from '@remix-run/react';
7-
import * as Sentry from '@sentry/remix';
83
import isbot from 'isbot';
94
import { renderToPipeableStream } from 'react-dom/server';
105
import { I18nextProvider } from 'react-i18next';
116
import { PassThrough } from 'stream';
127

138
import { serverServices } from './services/init.server';
14-
import { getServerEnv } from './utils/environment.server';
159

1610
const ABORT_DELAY = 5000;
1711

@@ -111,24 +105,3 @@ function handleBrowserRequest(
111105
setTimeout(abort, ABORT_DELAY);
112106
});
113107
}
114-
115-
Sentry.init({
116-
dsn: getServerEnv('SENTRY_DSN'),
117-
environment: getServerEnv('SENTRY_ENVIRONMENT'),
118-
// Set tracesSampleRate to 1.0 to capture 100%
119-
// of transactions for performance monitoring.
120-
// We recommend adjusting this value in production
121-
tracesSampleRate: 1.0,
122-
});
123-
124-
export async function handleError(
125-
error: unknown,
126-
{ request }: DataFunctionArgs
127-
) {
128-
if (error instanceof Error) {
129-
await Sentry.captureRemixServerException(error, 'remix.server', request);
130-
} else {
131-
// Optionally capture non-Error objects
132-
Sentry.captureException(error);
133-
}
134-
}

packages/app-builder/src/root.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
useLoaderData,
1515
useRouteError,
1616
} from '@remix-run/react';
17-
import { captureRemixErrorBoundaryError, withSentry } from '@sentry/remix';
1817
import { Tooltip } from '@ui-design-system';
1918
import { LogoStandard } from '@ui-icons';
2019
import { type Namespace } from 'i18next';
@@ -102,7 +101,6 @@ export const meta: V2_MetaFunction = () => [
102101

103102
export function ErrorBoundary() {
104103
const error = useRouteError();
105-
captureRemixErrorBoundaryError(error);
106104

107105
return (
108106
<html lang="en">
@@ -137,7 +135,7 @@ export function ErrorBoundary() {
137135
);
138136
}
139137

140-
function App() {
138+
export default function App() {
141139
const { locale, ENV, toastMessage, csrf } = useLoaderData<typeof loader>();
142140

143141
const { i18n } = useTranslation(handle.i18n);
@@ -171,5 +169,3 @@ function App() {
171169
</html>
172170
);
173171
}
174-
175-
export default withSentry(App);

packages/app-builder/src/routes/__builder/decisions.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
import { DecisionsPage } from '@app-builder/components/Decisions';
77
import { getRoute } from '@app-builder/utils/routes';
88
import { Outlet, useRouteError } from '@remix-run/react';
9-
import { captureRemixErrorBoundaryError } from '@sentry/remix';
109
import { Decision } from '@ui-icons';
1110
import { type Namespace } from 'i18next';
1211
import { useTranslation } from 'react-i18next';
@@ -53,8 +52,5 @@ export default function DecisionsLayout() {
5352
}
5453

5554
export function ErrorBoundary() {
56-
const error = useRouteError();
57-
captureRemixErrorBoundaryError(error);
58-
59-
return <ErrorComponent error={error} />;
55+
return <ErrorComponent error={useRouteError()} />;
6056
}

0 commit comments

Comments
 (0)