Skip to content

Commit

Permalink
official NR integration, browser agent integration, errors, logs in c…
Browse files Browse the repository at this point in the history
…ontext
  • Loading branch information
matewilk committed Aug 24, 2022
1 parent 7b13a21 commit ed1a847
Show file tree
Hide file tree
Showing 18 changed files with 8,598 additions and 3,811 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# misc
.DS_Store
*.pem
.vscode
.idea

# debug
npm-debug.log*
Expand Down
32 changes: 32 additions & 0 deletions components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React, { ReactNode } from "react";
import Image from "next/image";

import styles from "../styles/Home.module.css";

type Props = {
children?: ReactNode;
title?: string;
};

const Layout = ({ children, title = "NewRelic NextJs Integration" }: Props) => (
<div className={styles.container}>
<main className={styles.main}>
<h1>New Relic NextJs Integration</h1>
{children}
</main>
<footer className={styles.footer}>
<a
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Powered by{" "}
<span className={styles.logo}>
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
</span>
</a>
</footer>
</div>
);

export default Layout;
7 changes: 7 additions & 0 deletions components/Logger.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const winston = require("winston");

const logger = winston.createLogger({
transports: [new winston.transports.Console()],
});

export { logger };
10 changes: 0 additions & 10 deletions components/NewRelicSnippet.tsx

This file was deleted.

41 changes: 23 additions & 18 deletions newrelic.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict'
"use strict";
/**
* New Relic agent configuration.
*
Expand All @@ -9,11 +9,11 @@ exports.config = {
/**
* Array of application names.
*/
app_name: ['newrelic-nextjs-integration'],
app_name: ["newrelic-nextjs-integration"],
/**
* Your New Relic license key.
*/
license_key: '',
license_key: "",
/**
* This setting controls distributed tracing.
* Distributed tracing lets you see the path that a request takes through your
Expand All @@ -28,15 +28,20 @@ exports.config = {
*
* @env NEW_RELIC_DISTRIBUTED_TRACING_ENABLED
*/
enabled: true
enabled: true,
},
logging: {
/**
* Level at which to log. 'trace' is most useful to New Relic when diagnosing
* issues with the agent, 'info' and higher will impose the least overhead on
* production applications.
*/
level: 'info'
level: "info",
},
application_logging: {
forwarding: {
enabled: true,
},
},
/**
* When true, all request headers except for those listed in attributes.exclude
Expand All @@ -54,16 +59,16 @@ exports.config = {
* @env NEW_RELIC_ATTRIBUTES_EXCLUDE
*/
exclude: [
'request.headers.cookie',
'request.headers.authorization',
'request.headers.proxyAuthorization',
'request.headers.setCookie*',
'request.headers.x*',
'response.headers.cookie',
'response.headers.authorization',
'response.headers.proxyAuthorization',
'response.headers.setCookie*',
'response.headers.x*'
]
}
}
"request.headers.cookie",
"request.headers.authorization",
"request.headers.proxyAuthorization",
"request.headers.setCookie*",
"request.headers.x*",
"response.headers.cookie",
"response.headers.authorization",
"response.headers.proxyAuthorization",
"response.headers.setCookie*",
"response.headers.x*",
],
},
};
7 changes: 0 additions & 7 deletions newrelic/newrelic-browser-agent.js

This file was deleted.

4,664 changes: 4,664 additions & 0 deletions newrelic_agent.log

Large diffs are not rendered by default.

Loading

0 comments on commit ed1a847

Please sign in to comment.