Skip to content

Release v3.6.0

Compare
Choose a tag to compare
@newrelic-eheinlein newrelic-eheinlein released this 09 Jun 21:11
· 1251 commits to master since this release

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 using Config.Attributes.Exclude or disabled from Span
    Events specifically using Config.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 the request.uri and the request.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 and error.message from the root Span Event. This issue has
    now been fixed. These attributes can now be excluded from all Span Events
    using Config.Attributes.Exclude or Config.SpanEvents.Attributes.Exclude.

  • Fixed an issue that caused Go's data race warnings to trigger in certain situations
    when using the newrelic.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!