Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sentry: enable spotlight #832

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading