Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
reverted providing example of injecting browser agent in versioned te…
Browse files Browse the repository at this point in the history
…st sample app. updated the readme to link our offcial Next.js example app
  • Loading branch information
bizob2828 committed Sep 13, 2022
1 parent 383c91f commit 619e5a8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 77 deletions.
32 changes: 1 addition & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,37 +164,7 @@ npm run versioned
```

## Example project

The versioned tests referenced above use an example project that lives within `test/versioned/app`. It also contains a component that gets injected to connect the Browser and Node.js agent.

### Build example project

```sh
npm i
cd tests/versioned
npx next build app
```

### Test example project
**Note**: You must have a New Relic account setup with license key. Also you need to configure the [browser agent](https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent/).

The following command will start the example app and load the New Relic Next.js plugin.

```sh
NEW_RELIC_APP_NAME=my-next-example NEW_RELIC_LICENSE_KEY=<NR license key> NODE_OPTIONS='-r ../../index' npx next start app
```

You can now explore the app and see transactions, segments/spans, and browser events occurring. Here are a few URLs to request to get a good sampling of data:

```sh
curl http://localhost:3000/ssr/people
curl http://localhost:3000/ssr/dynamic/person/2
curl http://localhost:3000/person/1
curl http://127.0.0.1:3000/person/1
curl http://localhost:3000/invalid/page
curl http://localhost:3000/api/hello
curl http://localhost:3000/static/standard
```
[Click here](https://github.com/newrelic-experimental/newrelic-nextjs-integration) for our official Next.js example project that integrates both the New Relic Next.js plugin and the browser agent.

## Support

Expand Down
46 changes: 0 additions & 46 deletions tests/versioned/app/pages/_document.js

This file was deleted.

0 comments on commit 619e5a8

Please sign in to comment.