Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(Go Agent) release notes 3.18.2 #9155

Merged
merged 2 commits into from
Sep 7, 2022

Conversation

nr-swilloughby
Copy link
Contributor

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.

@nr-swilloughby nr-swilloughby marked this pull request as ready for review September 7, 2022 19:16
@github-actions
Copy link

github-actions bot commented Sep 7, 2022

Hi @nr-swilloughby 👋

Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days.

Gatsby Cloud will automatically generate a preview of your request, and will comment with a link when the preview is ready (usually 20 to 30 minutes).

@gatsby-cloud
Copy link

gatsby-cloud bot commented Sep 7, 2022

✅ docs-website-develop deploy preview ready

akristen
akristen previously approved these changes Sep 7, 2022
Copy link
Contributor

@akristen akristen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these release notes!

@akristen akristen added content requests related to docs site content from_internal Identifies issues/PRs from Relics (except writers) pg_observability labels Sep 7, 2022
@akristen akristen merged commit 9641052 into newrelic:develop Sep 7, 2022
@nr-swilloughby nr-swilloughby deleted the go_agent_release_3_18_2 branch September 7, 2022 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content requests related to docs site content from_internal Identifies issues/PRs from Relics (except writers)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

massive CPU usage at scale with v3.18.0
2 participants