newrelic_rpm 9.20.0 → 9.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7534628f5d1c53ceff110ad76f2c63a3773d32f7f13d7146ff4c7da72ecef143
4
- data.tar.gz: aeacda7d6851268da1e67d61376088902e9fa6080d184d91ea1bdbda632af889
3
+ metadata.gz: 002be7971239046fa416e4760bcf3032c7494fd74b5600eec63e0c1d9b8a1a6b
4
+ data.tar.gz: 603a67f73b504580e3a5db28e046b914f4b957a50b9eaab29fe4aee87c92822b
5
5
  SHA512:
6
- metadata.gz: fa3dfb1d4971a14c83e57b2de5fc20298f95e7e75dbba07631ec7e70c962e263f8c10f046ed5f067d3b38ec629ebc57e5cad502679468f8a0245b0bddc1d7061
7
- data.tar.gz: 95f05672fffa1af08da58e1d470cf40d9d0587aa2d2fa1a2db162a46b0bd11abd290e5150ef98de29dd43517ebeb2df1aaa836ae13a33f7835ef76534f14807c
6
+ metadata.gz: 4fca3a0ad0b86891bdb6bf0c306d9ce55e4c6fc215e74fc943178d8ed5116ab781ea2d879e7b78918b73313e460c5e876e714ab47828f4315b8894c35845eae2
7
+ data.tar.gz: 51a42bdb53145e747ebb91c6492e0710cc8d4a272929dd316e48deb5e8e0c70a185292d6185eeb531e776721dd05aef444131c8c3bb9e08988ad353a5c682a68
data/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # New Relic Ruby Agent Release Notes
2
2
 
3
+ ## v9.22.0
4
+
5
+ - **Feature: One-step instrumentation for Kubernetes**
6
+
7
+ The Kubernetes APM auto-attach automatically instruments applications and manages agent upgrades within Kubernetes deployments. This feature has exited preview and is now generally avaliable. Learn more about [Kubernetes auto-attach](https://docs.newrelic.com/docs/kubernetes-pixie/kubernetes-integration/installation/k8s-agent-operator/). [PR#2635](https://github.com/newrelic/newrelic-ruby-agent/pull/2635) [PR#3287](https://github.com/newrelic/newrelic-ruby-agent/pull/3287)
8
+
9
+ - **Feature: Deprecation notice for Ruby 2.4 and Ruby 2.5**
10
+
11
+ Ruby agent support for Ruby versions 2.4 and 2.5 is deprecated and will be removed in agent version 10.0.0. The new miniumum required Ruby version will become Ruby 2.6 and we will stop testing with Ruby 2.4 and 2.5. [PR#3288](https://github.com/newrelic/newrelic-ruby-agent/pull/3288)
12
+
13
+ - **Feature: Deprecation notice for the `newrelic deployments` command**
14
+
15
+ Support for recording deployments using the `newrelic deployments` command is now deprecated and will be removed in agent version 10.0.0.
16
+
17
+ Going forward, there are a number of automated and manual ways ways to record changes in New Relic. Please see our guide to [Change Tracking](https://docs.newrelic.com/docs/change-tracking/change-tracking-introduction/) for a list of available options. [PR#3262](https://github.com/newrelic/newrelic-ruby-agent/pull/3262)
18
+
19
+ - **Feature: Deprecation reminder for cross application tracing**
20
+
21
+ Cross application tracing has been deprecated since major version 8.0.0 of the Ruby agent. We will remove support for it entirely in version 10.0.0 of the agent. [PR#3288](https://github.com/newrelic/newrelic-ruby-agent/pull/3288)
22
+
23
+ - **Feature: Ensure compatibility with Ruby 3.5 change to Method#source_location**
24
+
25
+ Updated the agent to correctly parse the return value of Method#source_location, which is changing in Ruby 3.5 from a two-element to a five-element array. This change maintains support for older Ruby versions while adding support for the future release. [PR#3257](https://github.com/newrelic/newrelic-ruby-agent/pull/3257)
26
+
27
+ ## v9.21.0
28
+
29
+ - **Feature: In Serverless APM mode, use event source name as transaction name prefix**
30
+
31
+ The agent will now use the event source name as a prefix for the transaction name in Serverless APM mode. This will help to better identify the source of the transaction in the New Relic UI. [PR#3245](https://github.com/newrelic/newrelic-ruby-agent/pull/3245)
32
+
33
+ - **Bugfix: Revert changed logic for how we track the thread the span starts in**
34
+
35
+ This change restores the previous behavior of tracking the thread the span starts in, addressing issues that arose from the updated logic. Thank you [@david-zw-liu](https://github.com/david-zw-liu) for bringing this to our attention. [PR#3248](https://github.com/newrelic/newrelic-ruby-agent/pull/3248)
36
+
3
37
  ## v9.20.0
4
38
 
5
39
  - **Feature: Add ECS Docker ID for Fargate**
data/lib/boot/strap.rb CHANGED
@@ -5,8 +5,6 @@
5
5
  # This file is designed to bootstrap a `Bundler.require`-based Ruby app (such as
6
6
  # a Ruby on Rails app) so the app can be instrumented and observed by the
7
7
  # New Relic Ruby agent without the agent being added to the app as a dependency.
8
- # NOTE: introducing the agent into your application via bootstrap is in beta.
9
- # Use at your own risk.
10
8
  #
11
9
  # Given a production-ready Ruby app that optionally has a pre-packaged "frozen"
12
10
  # or "deployment"–gem bundle, the New Relic Ruby agent can be introduced
@@ -428,7 +428,7 @@ module NewRelic
428
428
  :type => String,
429
429
  :allowed_from_server => false,
430
430
  :exclude_from_reported_settings => true,
431
- :description => 'Your New Relic <InlinePopover type="userKey" />. Required when using the New Relic REST API v2 to record deployments using the `newrelic deployments` command.'
431
+ :description => '# DEPRECATED: The `api_key` config setting is now deprecated. Its only use was for the `newrelic deployments` command, which is being removed in agent version 10.0.0.'
432
432
  },
433
433
  :backport_fast_active_record_connection_lookup => {
434
434
  :default => false,
@@ -50,8 +50,8 @@ module NewRelic
50
50
  return ::NewRelic::EMPTY_HASH if info.empty?
51
51
 
52
52
  namespace, location, is_class_method = info
53
- @code_information[cache_key] = {filepath: location.first,
54
- lineno: location.last,
53
+ @code_information[cache_key] = {filepath: location[0],
54
+ lineno: location[1],
55
55
  function: "#{'self.' if is_class_method}#{method_name}",
56
56
  namespace: namespace}.freeze
57
57
  rescue StandardError => e
@@ -40,7 +40,13 @@ module NewRelic
40
40
 
41
41
  @event, @context = event, context
42
42
 
43
- NewRelic::Agent::Tracer.in_transaction(category: category, name: function_name) do
43
+ txn_name = function_name
44
+ if ENV['NEW_RELIC_APM_LAMBDA_MODE'] == 'true'
45
+ source = event_source_event_info['name'] if event_source_event_info
46
+ txn_name = "#{source.upcase} #{txn_name}" if source
47
+ end
48
+
49
+ NewRelic::Agent::Tracer.in_transaction(category: category, name: txn_name) do
44
50
  prep_transaction
45
51
 
46
52
  process_response(NewRelic::LanguageSupport.constantize(namespace)
@@ -42,7 +42,8 @@ module NewRelic
42
42
  def thread_starting_span
43
43
  # if the previous current segment was in another thread, use the thread local parent
44
44
  if ThreadLocalStorage[:newrelic_thread_span_parent] &&
45
- current_segment&.starting_segment_key != NewRelic::Agent::Tracer.current_segment_key
45
+ current_segment &&
46
+ current_segment.starting_segment_key != NewRelic::Agent::Tracer.current_segment_key
46
47
 
47
48
  ThreadLocalStorage[:newrelic_thread_span_parent]
48
49
  end
@@ -15,6 +15,19 @@ require 'new_relic/agent/hostname'
15
15
  require 'new_relic/control' unless defined? NewRelic::Control
16
16
 
17
17
  class NewRelic::Cli::Deployments < NewRelic::Cli::Command
18
+ # DEPRECATION NOTICE (Effective September 2025)
19
+ #
20
+ # The entire `NewRelic::Cli::Deployments` class and its associated
21
+ # `newrelic deployments` command are deprecated and will be removed in
22
+ # agent version 10.0.0.
23
+ #
24
+ # Users should migrate to recording deployments directly via New Relic's
25
+ # APIs. For more information, please see the official Change Tracking
26
+ # documentation: https://docs.newrelic.com/docs/change-tracking/change-tracking-introduction/
27
+ #
28
+ # @api public
29
+ #
30
+
18
31
  attr_reader :control
19
32
  def self.command; 'deployments'; end
20
33
 
@@ -64,6 +77,12 @@ class NewRelic::Cli::Deployments < NewRelic::Cli::Command
64
77
  # Run the Deployment upload in New Relic via Active Resource.
65
78
  # Will possibly print errors and exit the VM
66
79
  def run
80
+ msg = <<~TEXT
81
+ DEPRECATED: The `newrelic deployments` command will be removed in v10.0.0. Learn more about the alternate options: https://docs.newrelic.com/docs/change-tracking/change-tracking-introduction/
82
+ TEXT
83
+ NewRelic::Agent.logger.log_once(:warn, 'newrelic_deployments'.to_sym, msg)
84
+ warn msg
85
+
67
86
  begin
68
87
  @description = nil if @description && @description.strip.empty?
69
88
 
@@ -6,7 +6,7 @@
6
6
  module NewRelic
7
7
  module VERSION # :nodoc:
8
8
  MAJOR = 9
9
- MINOR = 20
9
+ MINOR = 22
10
10
  TINY = 0
11
11
 
12
12
  STRING = "#{MAJOR}.#{MINOR}.#{TINY}"
data/newrelic.yml CHANGED
@@ -52,8 +52,9 @@ common: &default_settings
52
52
  # If true, enables capture of all HTTP request headers for all destinations.
53
53
  # allow_all_headers: false
54
54
 
55
- # Your New Relic userKey. Required when using the New Relic REST API v2 to
56
- # record deployments using the newrelic deployments command.
55
+ # # DEPRECATED: The api_key config setting is now deprecated. Its only use was
56
+ # for the newrelic deployments command, which is being removed in agent version
57
+ # 10.0.0.
57
58
  # api_key: ""
58
59
 
59
60
  # If true, enables log decoration and the collection of log events and metrics.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.20.0
4
+ version: 9.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanna McClure
@@ -787,7 +787,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
787
787
  - !ruby/object:Gem::Version
788
788
  version: 1.3.1
789
789
  requirements: []
790
- rubygems_version: 3.6.7
790
+ rubygems_version: 3.6.9
791
791
  specification_version: 4
792
792
  summary: New Relic Ruby Agent
793
793
  test_files: []