Skip to content

Commit

Permalink
Add newrelic snippet for monitoring browser application
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Mar 24, 2024
1 parent 749beb7 commit 75a30ca
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
8 changes: 8 additions & 0 deletions apps/blog/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { SITE_DESCRIPTION, SITE_NAME } from "#constants";
import Footer from "#components/Footer";
import GlobalNavigation from "#components/GlobalNavigation";
import TopButton from "#components/TopButton";
import NewrelicSnippet from "#components/NewrelicSnippet";

export const metadata: Metadata = {
title: SITE_NAME,
Expand All @@ -35,6 +36,13 @@ export const viewport: Viewport = {
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="ko" suppressHydrationWarning>
<head>
<NewrelicSnippet
accountId={process.env.NR_ACCOUNT_ID}
licenseKey={process.env.NR_LICENSE_KEY}
applicationId={process.env.NR_APPLICATION_ID}
/>
</head>
<body>
{/* HACK: Dirty hack for implementing theme toggle */}
<script
Expand Down
30 changes: 30 additions & 0 deletions apps/blog/src/components/NewrelicSnippet/index.tsx

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"NEXT_PUBLIC_BLOG_ORIGIN",
"NEXT_PUBLIC_CDN_URL",
"NEXT_PUBLIC_FILE_CDN_URL",
"NEXT_PUBLIC_API_URL"
"NEXT_PUBLIC_API_URL",
"NR_ACCOUNT_ID",
"NR_LICENSE_KEY",
"NR_APPLICATION_ID"
]
},
"clean": {
Expand Down

0 comments on commit 75a30ca

Please sign in to comment.