Skip to content

Commit

Permalink
sentry: enable spotlight (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity authored May 9, 2024
1 parent c909de5 commit 06c61b7
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 101 deletions.
2 changes: 1 addition & 1 deletion packages/ui/docs-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@fern-ui/core-utils": "workspace:*",
"@fern-ui/fdr-utils": "workspace:*",
"@fern-ui/ui": "workspace:*",
"@sentry/nextjs": "^7.105.0",
"@sentry/nextjs": "^7.112.2",
"@vercel/edge-config": "^1.1.0",
"@workos-inc/node": "^6.1.0",
"cssnano": "^6.0.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/docs-bundle/sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ Sentry.init({
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
environment: sentryEnv,

spotlight: process.env.NODE_ENV === "development",
});
7 changes: 6 additions & 1 deletion packages/ui/docs-bundle/src/pages/_error.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GetServerSideProps } from "next";
import type { GetServerSideProps } from "next";
import Error, { ErrorProps } from "next/error";
import { ReactElement } from "react";

Expand Down Expand Up @@ -35,3 +35,8 @@ export const getServerSideProps: GetServerSideProps<ErrorProps> = async ({ req,
export default function Page(props: ErrorProps): ReactElement {
return <Error {...props} />;
}

// TODO: Uncomment this code to enable Sentry error tracking
// Page.getInitialProps = async (contextData: NextPageContext) => {
// await Sentry.captureUnderscoreErrorException(contextData);
// };
Loading

0 comments on commit 06c61b7

Please sign in to comment.