New Features
Added new methods to expose
Transactiondetails:Transaction.GetTraceMetadata()returns a TraceMetadata which contains distributed tracing identifiers.Transaction.GetLinkingMetadata()returns a LinkingMetadata which contains the fields needed to link data to a trace or entity.
Added a new plugin for the Logrus logging framework with the new _integrations/logcontext/nrlogrusplugin package. This plugin leverages the new
GetTraceMetadataandGetLinkingMetadataabove to decorate logs.To enable, set your log's formatter to the
nrlogrusplugin.ContextFormatter{}logger := logrus.New()logger.SetFormatter(nrlogrusplugin.ContextFormatter{})The logger will now look for a
newrelic.Transactioninside its context and decorate logs accordingly. Therefore, the Transaction must be added to the context and passed to the logger. For example, this logging calllogger.Info("Hello New Relic!")must be transformed to include the context, such as:
ctx := newrelic.NewContext(context.Background(), txn)logger.WithContext(ctx).Info("Hello New Relic!")Added support for NATS and NATS Streaming monitoring with the new _integrations/nrnats and _integrations/nrstan packages. These packages support instrumentation of publishers and subscribers.
Enables ability to migrate to Configurable Security Policies (CSP) on a per agent basis for accounts already using High-security mode (HSM).
- Previously, if CSP was configured for an account, New Relic would not allow an agent to connect without the
security_policies_token. This led to agents not being able to connect during the period between when CSP was enabled for an account and when each agent is configured with the correct token. - With this change, when both HSM and CSP are enabled for an account, an agent (this version or later) can successfully connect with either
high_security: trueor the appropriatesecurity_policies_tokenconfigured - allowing the agent to continue to connect after CSP is configured on the account but before the appropriatesecurity_policies_tokenis configured for each agent.
- Previously, if CSP was configured for an account, New Relic would not allow an agent to connect without the