Skip to content

Commit

Permalink
Adding new relic log to the test error page
Browse files Browse the repository at this point in the history
  • Loading branch information
7emansell committed Dec 20, 2024
1 parent 994902d commit 00ef8ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/test-error/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { useEffect } from "react";

export default function TestError() {
useEffect(() => {
// Send error to New Relic
if ((window as any).newrelic) {
(window as any).newrelic.log("Test error", { level: "warn" });
}
throw new Error("Test error");
}, []);
}

0 comments on commit 00ef8ad

Please sign in to comment.