Skip to content

New Relic set up #26

Description

@sbrudz

Configure New Relic APM.

The New Relic license key and app name should live in environment variables.

Here's the outline of an approach:

Install the newrelic node.js npm package.

Create newrelic-loader.ts

let newrelic: any = {};

if (Object.prototype.hasOwnProperty.call(process.env, "NEWRELIC_LICENSE")) {
    console.log("Enabling New Relic");
	newrelic = require("newrelic"); // tslint:disable-line
}

export default newrelic;

and then in app.ts import the newrelic-loader and use a technique like the one described here https://facebook.github.io/create-react-app/docs/title-and-meta-tags to inject newrelic. getBrowserTimingHeader() into the index.html page

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions