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

Go agent release notesRSS

December 14, 2022
Go agent v3.20.2

3.20.2

Important

We recommend updating to the latest agent version as soon as it’s available. If your organization has established practices that prevent you from upgrading to the latest version, ensure that your agents are regularly updated to a version that's at most 90 days old. Read more about keeping your agent up to date.

Added

  • New NoticeExpectedError() method allows you to capture errors that you are expecting to handle, without triggering alerts

    Fixed

  • More defensive harvest cycle code that will avoid crashing even in the event of a panic

  • Update nats-server version to avoid known zip-slip exploit

  • Update labstack/echo version to mitigate known open redirect exploit

November 15, 2022
Go agent v3.20.1

3.20.1

Important

We recommend updating to the latest agent version as soon as it’s available. If your organization has established practices that prevent you from upgrading to the latest version, ensure that your agents are regularly updated to a version at most 90 days old. Read more about keeping your agent up to date.

Added

  • New integration nrpgx5 v1.0.0 to instrument github.com/jackc/pgx/v5.

Changed

  • Changed the following TraceOption function to be consistent with their usage and other related identifier names. The old names remain for backward compatibility, but new code should use the new names.
    • WithIgnoredPrefix -> WithIgnoredPrefixes
    • WithPathPrefix -> WithPathPrefixes
  • Implemented better handling of Code Level Metrics reporting when the data (e.g., function names) are excessively long, so that those attributes are suppressed rather than being reported with truncated names. Specifically:
    • Attributes with values longer than 255 characters are dropped.
    • No CLM attributes at all will be attached to a trace if the code.function attribute is empty or is longer than 255 characters.
    • No CLM attributes at all will be attached to a trace if both code.namespace and code.filepath are longer than 255 characters.

November 2, 2022
Go agent v3.20.0

3.20.0

PLEASE READ these changes, and verify your config settings to ensure your application behaves how you intend it to. This release changes some default behaviors in the go agent.

Added

  • The Module Dependency Metrics feature was added. This collects the list of modules imported into your application, to aid in management of your application dependencies, enabling easier vulnerability detection and response, etc.
    • This feature is enabled by default, but may be disabled by explicitly including ConfigModuleDependencyMetricsEnable(false) in your application, or setting the equivalent environment variable or Config field direclty.
    • Modules may be explicitly excluded from the report via the ConfigModuleDependencyMetricsIgnoredPrefixes option.
    • Excluded module names may be redacted via the ConfigModuleDependencyMetricsRedactIgnoredPrefixes option. This is enabled by default.
  • Application Log Forwarding will now be ENABLED by default
    • Automatic application log forwarding is now enabled by default. This means that logging frameworks wrapped with one of the logcontext-v2 integrations will automatically send enriched application logs to New Relic with this version of the agent. To learn more about this feature, see the APM logs in context documentation. For additional configuration options, see the Go logs in context documentation. To learn about how to toggle log ingestion on or off by account, see our documentation to disable automatic logging via the UI or API.
    • If you are using a logcontext-v2 extension, but don't want the agent to automatically forward logs, please configure ConfigAppLogForwardingEnabled(false) in your application.
    • Environment variables have been added for all application logging config options:
      • NEW_RELIC_APPLICATION_LOGGING_ENABLED
    • NEW_RELIC_APPLICATION_LOGGING_FORWARDING_ENABLED
    • NEW_RELIC_APPLICATION_LOGGING_FORWARDING_MAX_SAMPLES_STORED
    • NEW_RELIC_APPLICATION_LOGGING_METRICS_ENABLED
    • NEW_RELIC_APPLICATION_LOGGING_LOCAL_DECORATING_ENABLED
  • Custom Event Limit Increase

Changed

  • Changed the following names to be consistent with their usage and other related identifier names. The old names remain for backward compatibility, but new code should use the new names.

    • ConfigCodeLevelMetricsIgnoredPrefix -> ConfigCodeLevelMetricsIgnoredPrefixes
    • ConfigCodeLevelMetricsPathPrefix -> ConfigCodeLevelMetricsPathPrefixes
    • NEW_RELIC_CODE_LEVEL_METRICS_PATH_PREFIX -> NEW_RELIC_CODE_LEVEL_METRICS_PATH_PREFIXES
    • NEW_RELIC_CODE_LEVEL_METRICS_IGNORED_PREFIX -> NEW_RELIC_CODE_LEVEL_METRICS_IGNORED_PREFIXES
  • When excluding information reported from CodeLevelMetrics via the IgnoredPrefixes or PathPrefixes configuration fields (e.g., by specifying ConfigCodeLevelMetricsIgnoredPrefixes or ConfigCodeLevelMetricsPathPrefixes), the names of the ignored prefixes and the configured path prefixes may now be redacted from the agent configuration information sent to New Relic.

    • This redaction is enabled by default, but may be disabled by supplying a false value to ConfigCodeLevelMetricsRedactPathPrefixes or ConfigCodeLevelMetricsRedactIgnoredPrefixes, or by setting the corresponding Config fields or environment variables to false.

Fixed

  • #583: fixed a bug in zerologWriter where comma separated fields in log message confused the JSON parser and could cause panics.

Support Statement

New Relic recommends that you upgrade the agent regularly to ensure that you’re getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life.

We also recommend using the latest version of the Go language. At minimum, you should at least be using no version of Go older than what is supported by the Go team themselves.

See the Go Agent EOL Policy for details about supported versions of the Go Agent and third-party components.

September 21, 2022
Go agent v3.19.2

3.19.2

Changed

  • Updated nrgin integration to more accurately report code locations when code level metrics are enabled.
  • The Go Agent and all integrations now require Go version 1.17 or later.
  • Updated minimum versions for third-party modules.
    • nrawssdk-v2, nrecho-v4, nrgrpc, nrmongo, nrmysql, nrnats, and nrstan now require Go Agent 3.18.2 or later
    • the Go Agent now requires protobuf 1.5.2 and grpc 1.49.0
  • Internal dev process and unit test improvements.

Support Statement

New Relic recommends that you upgrade the agent regularly to ensure that you’re getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life.

We also recommend using the latest version of the Go language. At minimum, you should at least be using no version of Go older than what is supported by the Go team themselves.

See the Go Agent EOL Policy for details about supported versions of the Go Agent and third-party components.

September 16, 2022
Go agent v3.19.1

3.19.1 - Hotfix Release

Changed

  • Moved the v3/internal/logcontext/nrwriter module to v3/integrations/logcontext-v2/nrwriter

Support Statement

New Relic recommends that you upgrade the agent regularly to ensure that you’re getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life.

See the Go Agent EOL Policy for details about supported versions of the Go Agent and third-party components.

September 15, 2022
Go agent v3.19.0

3.19.0

Added

  • logcontext-v2/logWriter plugin: a new logs in context plugin that supports the standard library logging package.

  • logcontext-v2/zerologWriter plugin: a new logs in context plugin for zerolog that will replace the old logcontext-v2/zerolog plugin. This plugin is more robust, and will be able to support a richer set of features than the previous plugin.

  • see the updated logs in context documentation for information about configuration and installation.

    Changed

  • the logcontext-v2/zerolog plugin will be deprecated once the 3.17.0 release EOLs.

    Support Statement

    New Relic recommends that you upgrade the agent regularly to ensure that you're getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life.

    See the Go Agent EOL Policy for details about supported versions of the Go Agent and third-party components.

September 7, 2022
Go agent v3.18.2

3.18.2

Added

  • Added WithDefaultFunctionLocation trace option. This allows the caller to indicate a fall-back function to use for CLM in case no other location was found first.
  • Added caching versions of the code-level metrics functions ThisCodeLocation and FunctionLocation , and trace options WithThisCodeLocation and WithFunctionLocation. These improve performance by caching the result of computing the source code location, and reuse that cached result on all subsequent calls.
  • Added a WithCodeLevelMetrics trace option to force the collection of CLM data even if it would have been excluded as being out of the configured scope. (Note that CLM data are never collected if CLM is turned off globally or if the WithoutCodeLevelMetrics option was specified for the same transaction.)
  • Added an exported CodeLevelMetricsScopeLabelToValue function to convert a list of strings describing CLM scopes in the same manner as the NEW_RELIC_CODE_LEVEL_METRICS_SCOPE environment variable (but as individual string parameters), returning the CodeLevelMetricsScope value which corresponds to that set of scopes.
  • Added a new CodeLevelMetricsScopeLabelListToValue function which takes a comma-separated list of scope names exactly as the NEW_RELIC_CODE_LEVEL_METRICS_SCOPE environment variable does, and returns the CodeLevelMetrics value corresponding to that set of scopes.
  • Added text marshaling and unmarshaling for the CodeLevelMetricsScope value, allowing the CodeLevelMetrics field of the configuration struct to be converted to or from JSON or other text-based encoding representations.

Changed

  • The WithPathPrefix trace option now takes any number of string parameters, allowing multiple path prefixes to be recognized rather than just one.
  • The FunctionLocation function now accepts any number of function values instead of just a single one. The first such parameter which indicates a valid function, and for which CLM data are successfully obtained, is the one which will be reported.
  • The configuration struct field PathPrefix is now deprecated with the introduction of a new PathPrefixes field. This allows for multiple path prefixes to be given to the agent instead of only a single one.
  • The NEW_RELIC_CODE_LEVEL_METRICS_SCOPE environment variable now accepts a comma-separated list of pathnames.

Fixed

  • Improved the implementation of CLM internals to improve speed, robustness, and thread safety.
  • Corrected the implementation of the WrapHandle and WrapHandleFunc functions so that they consistently report the function being invoked by the http framework, and improved them to use the new caching functions and ensured they are thread-safe.

This release fixes issue #557.

Compatibility Notice

As of release 3.18.0, the API was extended by allowing custom options to be added to calls to the Application.StartTransaction method and the WrapHandle and WrapHandleFunc functions. They are implemented as variadic functions such that the new option parameters are optional (i.e., zero or more options may be added to the end of the function calls) to be backward-compatible with pre-3.18.0 usage of those functions. This prevents the changes from breaking existing code for typical usage of the agent. However, it does mean those functions' call signatures have changed:

  • StartTransaction(string) -> StartTransaction(string, ...TraceOption)
  • WrapHandle(*Application, string, http.Handler) -> WrapHandle(*Application, string, http.Handler, ...TraceOption)
  • WrapHandleFunc(*Application, string, func(http.ResponseWriter, *http.Request)) -> WrapHandleFunc(*Application, string, func(http.ResponseWriter, *http.Request), ...TraceOption)

If, for example, you created your own custom interface type which includes the StartTransaction method or something that depends on these functions' exact call semantics, that code will need to be updated accordingly before using version 3.18.0 (or later) of the Go Agent.

Support Statement

New Relic recommends that you upgrade the agent regularly to ensure that you’re getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life.

See the Go Agent EOL Policy for details about supported versions of the Go Agent and third-party components.

August 18, 2022
Go agent v3.18.1

3.18.1

Added

  • Extended the IgnoredPrefix configuration value for Code-Level Metrics so that multiple such prefixes may be given instead of a single one. This deprecates the IgnoredPrefix configuration field of Config.CodeLevelMetrics in favor of a new slice field IgnoredPrefixes. The corresponding configuration option-setting functions ConfigCodeLevelMetricsIgnoredPrefix and WithIgnoredPrefix now take any number of string parameters to set these values. Since those functions used to take a single string value, this change is backward-compatible with pre-3.18.1 code. Accordingly, the NEW_RELIC_CODE_LEVEL_METRICS_IGNORED_PREFIX environment variable is now a comma-separated list of prefixes. Fixes Issue #551.

Fixed

  • Corrected some small errors in documentation of package features. Fixes Issue #550

Compatibility Notice

As of release 3.18.0, the API was extended by allowing custom options to be added to calls to the Application.StartTransaction method and the WrapHandle and WrapHandleFunc functions. They are implemented as variadic functions such that the new option parameters are optional (i.e., zero or more options may be added to the end of the function calls) to be backward-compatible with pre-3.18.0 usage of those functions. This prevents the changes from breaking existing code for typical usage of the agent. However, it does mean those functions' call signatures have changed:

  • StartTransaction(string) -> StartTransaction(string, ...TraceOption)
  • WrapHandle(*Application, string, http.Handler) -> WrapHandle(*Application, string, http.Handler, ...TraceOption)
  • WrapHandleFunc(*Application, string, func(http.ResponseWriter, *http.Request)) -> WrapHandleFunc(*Application, string, func(http.ResponseWriter, *http.Request), ...TraceOption)

If, for example, you created your own custom interface type which includes the StartTransaction method or something that depends on these functions' exact call semantics, that code will need to be updated accordingly before using version 3.18.0 (or later) of the Go Agent.

Support Statement

New Relic recommends that you upgrade the agent regularly to ensure that you’re getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life.

See the Go Agent EOL Policy for details about supported versions of the Go Agent and third-party components.

August 1, 2022
Go agent v3.18.0

3.18.0

Added

  • Code-level metrics are now available for instrumented transactions. This is off by default but once enabled via ConfigCodeLevelMetricsEnabled(true) transactions will include information about the location in the source code where StartTransaction was invoked.
    • Adds information about where in your source code transaction traces originated.
    • See the Go agent documentation for details on configuring code-level metrics and how to instrument your code using them.
  • New V2 logs-in-context plugin is available for Logrus, packed with all the features you didn't know you wanted:
    • Automatic log forwarding
    • Log metrics
    • Capture logs anywhere in your code; both inside or outside of a transaction.
    • Use the Logrus formatting package of your choice
    • Local log decorating is now available for the new logcontext-v2/nrlogrus plugin only. This is off by default but can be enabled with ConfigAppLogForwardingEnabled(true).

Fixed

  • Fixed issue with custom event limits and number of distributed tracing spans to more accurately follow configured limits.

Compatibility Notice

This release extends the API by allowing custom options to be added to calls to the Application.StartTransaction method and the WrapHandle and WrapHandleFunc functions. They are implemented as variadic functions such that the new option parameters are optional (i.e., zero or more options may be added to the end of the function calls) to be backward-compatible with pre-3.18.0 usage of those functions. This prevents the changes from breaking existing code for typical usage of the agent. However, it does mean those functions' call signatures have changed:

  • StartTransaction(string) -> StartTransaction(string, ...TraceOption)
  • WrapHandle(*Application, string, http.Handler) -> WrapHandle(*Application, string, http.Handler, ...TraceOption)
  • WrapHandleFunc(*Application, string, func(http.ResponseWriter, *http.Request)) -> WrapHandleFunc(*Application, string, func(http.ResponseWriter, *http.Request), ...TraceOption)

If, for example, you created your own custom interface type which includes the StartTransaction method or something that depends on these functions' exact call semantics, that code will need to be updated accordingly before using version 3.18.0 of the Go Agent.

Support Statement

New Relic recommends that you upgrade the agent regularly to ensure that you’re getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life.

  • Note that the oldest supported version of the Go agent is 2.11.0.

June 29, 2022
Go agent v3.17.0

3.17.0

Added

  • Logs in context now supported for zerolog.
  • This is a quick way to view logs no matter where you are in the platform.
    • Adds support for logging metrics which shows the rate of log messages by severity in the Logs chart in the APM Summary view. This is enabled by default in this release.
    • Adds support for forwarding application logs to New Relic. This automatically sends application logs that have been enriched to power APM logs in context. This is disabled by default in this release. This will be on by default in a future release.
    • To learn more about APM logs in context see the documentation here.
    • Includes the RecordLog function for recording log data from a single log entry
    • An integrated plugin for zerolog to automatically ingest log data with the Go Agent.
    • Resolves issue 178, issue 488, issue 489, issue 490, and issue 491 .
  • Added integration for MS SQL Server (PR 425; thanks @ishahid91!)
    • This introduces the nrmssql integration v1.0.0.
  • Added config function ConfigCustomInsightsEventsMaxSamplesStored for limiting the number of samples stored in a custom insights event. Fixes issue 476

Fixed

  • Improved speed of building distributed trace header JSON payload. Fixes issue 505.
  • Renamed the gRPC attribute names from GrpcStatusLevel, GrpcStatusMessage, and GrpcStatusCode to grpcStatusLevel, grpcStatusMessage, and grpcStatusCode respectively, to conform to existing naming conventions for New Relic agents. Fixes issue 492.
  • Updated go.mod for the nrgin integration to mitigate security issue in 3rd party dependency.
  • Updated go.mod for the nrawssdk-v1 integration to properly reflect its dependency on version 3.16.0 of the Go Agent.
  • Updated go.mod for the nrlambda integration to require aws-lambda-go version 1.20.0. (PR 356; thanks MattWhelan!)

Support Statement

New Relic recommends that you upgrade the agent regularly to ensure that you’re getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life.

  • Note that the oldest supported version of the Go Agent is 2.11.0.

Copyright © 2024 New Relic Inc.

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