• EnglishEspañol日本語한국어Português
  • Log inStart now

Go agent release notesRSS

January 11, 2021
Go agent v3.10.0

3.10.0

New Features

Changes

  • Updated the locations of our license files so that Go docs https://pkg.go.dev will display our agent. Thanks @tydavis for your PR to fix this! #254
  • Added an Open Source repo linter GitHub action that runs on push. #262
  • Updated the README.md file to correctly show the support resources from New Relic. #255

Support statement

  • New Relic recommends that you upgrade the agent regularly and at a minimum every 3 months. As of this release, the oldest supported version is 2.2.0.

September 3, 2020
Go agent v3.9.0

3.9.0

Changes

  • When sending Serverless telemetry using the nrlambda integration, support an externally-managed named pipe.

The articles below provide additional instructions on support for an externally-managed named pipe in lambdas:

July 15, 2020
Go agent v3.8.1

3.8.1

Bug Fixes

  • Fixed an issue that could cause orphaned Distributed Trace spans when using SQL instrumentation like nrmysql.

July 1, 2020
Go agent v3.8.0

3.8.0

Changes

  • When marking a transaction as a web transaction using Transaction.SetWebRequest, it is now possible to include a Host field in the WebRequest struct, which defaults to the empty string.

Bug Fixes

  • The Host header is now being correctly captured and recorded in the request.headers.host attribute, as described here.
  • Previously, the timestamps on Spans and Transactions were being written using different data types, which sometimes caused rounding errors that could cause spans to be offset incorrectly in the UI. This has been fixed.

June 18, 2020
Go agent v3.7.0

3.7.0

Changes

  • When Config.Transport is nil, no longer use the http.DefaultTransport when communicating with the New Relic backend. This addresses an issue with shared transports as described in golang/go#33006.
  • If a timeout occurs when attempting to send data to the New Relic backend, instead of dropping the data, we save it and attempt to send it with the next harvest. Note data retention limits still apply and the agent will still start to drop data when these limits are reached. We attempt to keep the highest priority events and traces.

June 9, 2020
Go agent v3.6.0

3.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 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 spans 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 spans 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. This issue has now been fixed. These attributes can now be excluded from all spans 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!

May 20, 2020
Go agent v3.5.0

3.5.0

New Features

  • Added support for Infinite Tracing on New Relic Edge.

    Infinite Tracing observes 100% of your distributed traces and provides visualizations for the most actionable data so you have the examples of errors and long-running traces so you can better diagnose and troubleshoot your systems.

    You configure your agent to send traces to a trace observer in New Relic Edge. You view your distributed traces through the New Relic’s UI. There is no need to install a collector on your network.

    Infinite Tracing is currently available on a sign-up basis. If you would like to participate, please contact your sales representative.

Changes

  • nrgin.Middleware uses Context.FullPath() for transaction names when using Gin version 1.5.0 or greater. Gin transactions were formerly named after the Context.HandlerName(), which uses reflection. This change improves transaction naming and reduces overhead. Please note that because your transaction names will change, you may have to update any related dashboards and alerts to match the new name. If you wish to continue using Context.HandlerName() for your transaction names, use nrgin.MiddlewareHandlerTxnNames instead.

    // Transactions previously named
    "GET main.handleGetUsers"
    // will be change to something like this match the full path
    "GET /user/:id"

    Note: As part of agent release v3.4.0, a v2.0.0 tag was added to the nrgin package. When using go modules however, it was impossible to install this latest version of nrgin. The v2.0.0 tag has been removed and replaced with v1.1.0.

March 23, 2020
Go agent v3.4.0

3.4.0

New Features

  • Attribute http.statusCode has been added to external span events representing the status code on an http response. This attribute will be included when added to an ExternalSegment in one of these three ways:

    1. Using NewRoundTripper with your http.Client
    2. Including the http.Response as a field on your ExternalSegment
    3. Using the new ExternalSegment.SetStatusCode API to set the status code directly

    To exclude the http.statusCode attribute from span events, update your agent configuration like so, where cfg is your newrelic.Config object.

    cfg.SpanEvents.Attributes.Exclude = append(cfg.SpanEvents.Attributes.Exclude, newrelic.SpanAttributeHTTPStatusCode)
  • Error attributes error.class and error.message are now included on the span event in which the error was noticed, or on the root span if an error occurs in a transaction with no segments (no chid spans). Only the most recent error information is added to the attributes; prior errors on the same span are overwritten.

    To exclude the error.class and/or error.message attributes from span events, update your agent configuration like so, where cfg is your newrelic.Config object.

    cfg.SpanEvents.Attributes.Exclude = append(cfg.SpanEvents.Attributes.Exclude, newrelic.newrelic.SpanAttributeErrorClass, newrelic.SpanAttributeErrorMessage)

Changes

  • Use Context.FullPath() for transaction names when using Gin version 1.5.0 or greater. Gin transactions were formerly named after the Context.HandlerName(), which uses reflection. This change improves transaction naming and reduces overhead. Please note that because your transaction names will change, you may have to update any related dashboards and alerts to match the new name.

    // Transactions previously named
    "GET main.handleGetUsers"
    // will be change to something like this match the full path
    "GET /user/:id"

February 11, 2020
Go agent v3.3.0

3.3.0

New Features

Changes

  • When using newrelic.StartExternalSegment or newrelic.NewRoundTripper, if existing cross application tracing or distributed tracing headers are present on the request, they will be replaced instead of added.
  • The FromContext API which allows you to pull a Transaction from a context.Context will no longer panic if the provided context is nil. In this case, a nil is returned.

Known Issues and Workarounds

If a .NET agent is initiating distributed traces as the root service, you must update that .NET agent to version 8.24 or later before upgrading your downstream Go New Relic agents to this agent release.

January 27, 2020
Go agent v3.2.0

3.2.0

New Features

Changes

  • Updated Gorilla instrumentation to include request time spent in middlewares. Added new nrgorilla.Middleware and deprecated nrgorilla.InstrumentRoutes. Register the new middleware as your first middleware using Router.Use. See the godocs examples for more details.

    r := mux.NewRouter()
    // Always register the nrgorilla.Middleware first.
    r.Use(nrgorilla.Middleware(app))
    // All handlers and custom middlewares will be instrumented. The
    // transaction will be available in the Request's context.
    r.Use(MyCustomMiddleware)
    r.Handle("/", makeHandler("index"))
    // The NotFoundHandler and MethodNotAllowedHandler must be instrumented
    // separately using newrelic.WrapHandle. The second argument to
    // newrelic.WrapHandle is used as the transaction name; the string returned
    // from newrelic.WrapHandle should be ignored.
    _, r.NotFoundHandler = newrelic.WrapHandle(app, "NotFoundHandler", makeHandler("not found"))
    _, r.MethodNotAllowedHandler = newrelic.WrapHandle(app, "MethodNotAllowedHandler", makeHandler("method not allowed"))
    http.ListenAndServe(":8000", r)

Known Issues and Workarounds

If a .NET agent is initiating distributed traces as the root service, you must update that .NET agent to version 8.24 or later before upgrading your downstream Go New Relic agents to this agent release.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.