• /
  • EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

Go agent v3.18.0

August 1, 2022Download

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.
Copyright © 2024 New Relic株式会社。

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