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

Ensure sentry startup #25

Merged
merged 1 commit into from
Jan 28, 2025
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
58 changes: 30 additions & 28 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import "~/styles/global.css";
import layoutStyles from "~/styles/layout.css?url";
import errorStyles from "~/styles/error.css?url";
import { useEffect } from "react";
import { useEffect, useState } from "react";

Check warning on line 24 in app/root.tsx

View workflow job for this annotation

GitHub Actions / lint

'useState' is defined but never used

export const meta: MetaFunction = () => [
{
Expand Down Expand Up @@ -50,32 +50,34 @@
};

const InitializeSentry = (environment: string) => {
Sentry.init({
dsn: "https://c8a47fcd86fce0c2b5913396f6b08533@o4508546853830656.ingest.us.sentry.io/4508546855272448",
tracesSampleRate: 1,
environment,

integrations: [
Sentry.browserTracingIntegration({
useEffect,
useLocation,
useMatches,
}),
Sentry.replayIntegration({
maskAllText: true,
blockAllMedia: true,
}),
],

replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1,
beforeSend(event) {
if (window.location.hostname === "localhost") {
return null;
}
return event;
},
});
if (!Sentry.isInitialized()) {
Sentry.init({
dsn: "https://c8a47fcd86fce0c2b5913396f6b08533@o4508546853830656.ingest.us.sentry.io/4508546855272448",
tracesSampleRate: 1,
environment,

integrations: [
Sentry.browserTracingIntegration({
useEffect,
useLocation,
useMatches,
}),
Sentry.replayIntegration({
maskAllText: true,
blockAllMedia: true,
}),
],

replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1,
beforeSend(event) {
if (window.location.hostname === "localhost") {
return null;
}
return event;
},
});
}
};

function App() {
Expand All @@ -86,7 +88,7 @@

useEffect(() => {
if (!SENTRY_ENVIRONMENT) {
console.error("No sentry environment. Bugs will not be reported.");
console.warn("No sentry environment. Bugs will not be reported.");
return;
}

Expand Down
6 changes: 5 additions & 1 deletion app/routes/project.$projectId/components/ui/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import React from "react";
import "~/styles/footer.css";
import copyright from "~/styles/images/copyright.svg";

export const Footer: React.FC = () => {
return (
<footer>
<div className="fake-copyright">© Parrit 2025</div>
<div className="fake-copyright flex items-center space-x-1">
<img className="h-2 w-2 inline-block" src={copyright} />
<span>Parrit 2025</span>
</div>
<div className="footer-links">
<a
target="_blank"
Expand Down
54 changes: 54 additions & 0 deletions app/styles/images/copyright.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading