-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: sentry for companion app (#599)
* chore: add sentry to companion app * enable source map upload for companion app * use redirect method from react-router * update redirect logic again * adjust code for new route
- Loading branch information
1 parent
5a901fb
commit b11940c
Showing
9 changed files
with
84 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom/client' | ||
import { HydratedRouter } from 'react-router/dom' | ||
import './app.css' | ||
|
||
import * as Sentry from '@sentry/react' | ||
|
||
Sentry.init({ | ||
dsn: 'https://23cb3bbf49ea43ed9bbaf41199c40d1c@o4508675621912576.ingest.us.sentry.io/4508676926078976', | ||
integrations: [Sentry.browserTracingIntegration()], | ||
// Tracing | ||
tracesSampleRate: 1.0, // Capture 100% of the transactions | ||
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled | ||
tracePropagationTargets: [ | ||
'localhost', | ||
/^https:\/\/app\.pilot\.gnosisguild\.org/, | ||
], | ||
}) | ||
|
||
ReactDOM.hydrateRoot( | ||
document, | ||
<React.StrictMode> | ||
<HydratedRouter /> | ||
</React.StrictMode>, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
import { editRoute } from '@/utils' | ||
import { createBlankRoute } from '@zodiac/modules' | ||
import type { Route } from './+types/new-route' | ||
|
||
export const loader = ({ request }: Route.LoaderArgs) => | ||
editRoute(request.url, createBlankRoute()) | ||
export const loader = () => editRoute(createBlankRoute()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
import type { ExecutionRoute } from '@zodiac/schema' | ||
import { redirect } from 'react-router' | ||
|
||
export const editRoute = (currentUrl: string, route: ExecutionRoute) => { | ||
const url = new URL(currentUrl) | ||
|
||
return Response.redirect( | ||
new URL(`/edit-route/${btoa(JSON.stringify(route))}`, url.origin), | ||
) | ||
} | ||
export const editRoute = (route: ExecutionRoute) => | ||
redirect(`/edit-route/${btoa(JSON.stringify(route))}`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.