Skip to content

Commit

Permalink
Adds sentry profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
a-poor committed Jan 4, 2025
1 parent 57f7a21 commit cb50fb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/entry.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Sentry.init({
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration(),
Sentry.browserProfilingIntegration(),
],
tracesSampleRate: 1.0,
tracePropagationTargets: [
Expand All @@ -16,6 +17,7 @@ Sentry.init({
],
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
profilesSampleRate: 1.0,
});

startTransition(() => {
Expand Down
7 changes: 7 additions & 0 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ export const links: Route.LinksFunction = () => [
{ rel: "sitemap", type: "application/xml", title: "Sitemap", href: "sitemap.xml" },
];

export function headers(_: Route.HeadersArgs) {
return {
'Document-Policy': 'js-profiling',
};
}


export async function loader({ request }: Route.LoaderArgs) {
const cookieData = await themeCookie.parse(request.headers.get("Cookie") ?? "");
let theme: Theme = "system";
Expand Down

0 comments on commit cb50fb5

Please sign in to comment.