I am using NextJS version 12 and Newrelic 8.7.1, from my package.json
"newrelic": "^8.7.1",
"next": "12",
const isProd = process.env.APP_ENV === 'production';
if (isProd) {
require('newrelic');
}
This is working great and I can see events under Transaction
in newrelic.
I want to add more custom parameters now, for example
- app_version which I have under process.env.APP_VERSION
- x_request_id which I receive only via some AJAX calls
- user_id when logged in from the session
…etc
Can I achieve this without ejecting/using custom nextjs server ?
If the answer is no, please point me to any solution on how to do this.
This is crucial for accurate monitoring.
Thank you in advance