Skip to content

Commit

Permalink
Ignore production builds
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonrobot committed Sep 29, 2023
1 parent 4fdb751 commit 637aa16
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/next/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import { Inter } from 'next/font/google';

const inter = Inter({ subsets: ['latin'] });

import { enableTracing } from '@envyjs/nextjs';
enableTracing({ serviceName: 'example-nextjs', ignoreRSC: true, filter: request => request.host !== 'dog.ceo' });
if (process.env.NODE_ENV !== 'production') {
import('@envyjs/nextjs').then(({ enableTracing }) => {
enableTracing({ serviceName: 'example-nextjs', ignoreRSC: true, debug: true });
});
}

export const metadata: Metadata = {
title: 'Create Next App',
Expand Down

0 comments on commit 637aa16

Please sign in to comment.