This is no longer maintained. The work has been moved to https://github.com/newrelic/newrelic-node-log-extensions/tree/main/packages/winston-log-enricher
Breaking: Moved agent dependency to be a peer dependency. It is now required the leveraging application install 'newrelic' directly.
This prevents attempts to load multiple copies of the agent. Previously, when an application referenced 'newrelic' the formatter would attempt to load a second copy of the agent. The agent protects against this behavior but it is preferred we avoid this. Also, the prior dependency was too restrictive and would have pinned the formatters version to 6.x versions of the agent.
We might also want to consider making winston a peer dep at some point so the versions always match with the customer and they aren't forced into situations where there are two versions sometimes. Did want to go down too many paths right now, though, given my limited bandwidth.
Proposed Release Notes
Breaking: Moved agent dependency to be a peer dependency. It is now required the leveraging application install 'newrelic' directly.
This prevents attempts to load multiple copies of the agent. Previously, when an application referenced 'newrelic' the formatter would attempt to load a second copy of the agent. The agent protects against this behavior but it is preferred we avoid this. Also, the prior dependency was too restrictive and would have pinned the formatters version to 6.x versions of the agent.
Links
Details
We might also want to consider making
winston
a peer dep at some point so the versions always match with the customer and they aren't forced into situations where there are two versions sometimes. Did want to go down too many paths right now, though, given my limited bandwidth.