Notes
- Updated
getBrowserTimingHeader
to allow the browser agent to be generated even when not in a transaction by addingallowTransactionlessInjection
to function options.allowTransactionlessInjection
is a boolean option, and when set totrue
, will allow injection of the browser agent when not in a transaction. This is intended to be used in frameworks that build Static Site Generation(SSG). Note that if you're using this option, you may need to wait until the Node agent has established a connection before callinggetBrowserTimingHeader
. To wait until the agent is connected, you can add the following check to your code:
if (!newrelic.agent.collector.isConnected()) { await new Promise((resolve) => { newrelic.agent.on('connected', resolve) })}
Support statement:
- New Relic recommends that you upgrade the agent regularly to ensure that you're getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life.