Release v3.6.0
New Features
-
Added support for adding custom attributes directly to
spans.
These attributes will be visible when looking at spans in the Distributed
Tracing UI.Example:
txn := newrelic.FromContext(r.Context()) sgmt := txn.StartSegment("segment1") defer sgmt.End() sgmt.AddAttribute("mySpanString", "hello") sgmt.AddAttribute("mySpanInt", 123)
-
Custom attributes added to the transaction with
txn.AddAttribute
are now
also added to the root Span Event and will be visible when looking at the
span in the Distributed Tracing UI. These custom attributes can be disabled
from all destinations usingConfig.Attributes.Exclude
or disabled from Span
Events specifically usingConfig.SpanEvents.Attributes.Exclude
. -
Agent attributes added to the transaction are now also added to the root Span
Event and will be visible when looking at the span in the Distributed Tracing
UI. These attributes include therequest.uri
and therequest.method
along
with all other attributes listed in the attributes section of our
godocs.
These agent attributes can be disabled from all destinations using
Config.Attributes.Exclude
or disabled from Span Events specifically using
Config.SpanEvents.Attributes.Exclude
.
Bug Fixes
-
Fixed an issue where it was impossible to exclude the attributes
error.class
anderror.message
from the root Span Event. This issue has
now been fixed. These attributes can now be excluded from all Span Events
usingConfig.Attributes.Exclude
orConfig.SpanEvents.Attributes.Exclude
. -
Fixed an issue that caused Go's data race warnings to trigger in certain situations
when using thenewrelic.NewRoundTripper
. There were no reports of actual data corruption,
but now the warnings should be resolved. Thank you to @blixt for bringing this to our
attention!