Skip to content

Commit 508c62b

Browse files
committed
Merge branch 'v10_0_0' into record_custom_event_raise_on_invalid
2 parents 4dc9b75 + 9613fc9 commit 508c62b

File tree

19 files changed

+17
-1083
lines changed

19 files changed

+17
-1083
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,27 @@
33
## dev
44

55
- **Breaking Change: Remove support for Ruby 2.4 and 2.5**
6+
67
Support for Ruby versions 2.4 and 2.5 has been removed. The new minimum required Ruby version is now 2.6. [PR#3314](https://github.com/newrelic/newrelic-ruby-agent/pull/3314)
78

89
- **Breaking Change: Rename ActiveJob metrics**
10+
911
ActiveJob metrics have been updated to include the job's class name for more specific reporting. This is a breaking change and may require updating custom dashboards or alerts. [PR#3320](https://github.com/newrelic/newrelic-ruby-agent/pull/3320)
1012
- Old format: `Ruby/ActiveJob/<QueueName>/<Method>`
1113
- New format: `Ruby/ActiveJob/<ClassName>/<QueueName>/<Method>`
1214

1315
- **Breaking Change: Rename `bin/newrelic` command to `bin/newrelic_rpm`**
16+
1417
The executable file for the agent's CLI has been renamed from `bin/newrelic` to `bin/newrelic_rpm`. This change resolves a name collision with the standalone New Relic CLI tool. [PR#3323](https://github.com/newrelic/newrelic-ruby-agent/pull/3323)
1518

1619
- **Feature: Add argument validation for the `Agent#record_custom_event` API**
20+
1721
The `Agent#record_custom_event` API now raises an `ArgumentError` when an invalid `event_type` is provided. A valid event type must consist only of alphanumeric characters, underscores (`_`), colons (`:`), or spaces (` `). [PR#3319](https://github.com/newrelic/newrelic-ruby-agent/pull/3319)
1822

23+
- **Breaking Change: Remove experimental feature Configurable Security Policies (CSP)**
24+
25+
The experimental feature, Configurable Security Policies (CSP), is no longer supported and has been removed. [PR#3292](https://github.com/newrelic/newrelic-ruby-agent/pull/3292)
26+
1927
## v9.23.0
2028

2129
- **Feature: Add sidekiq.ignore_retry_errors configuration option**

lib/new_relic/agent/agent.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ def needs_after_fork_work?
238238
return false if !needs_restart ||
239239
!Agent.config[:agent_enabled] ||
240240
!Agent.config[:monitor_mode] ||
241-
disconnected? ||
242-
!control.security_settings_valid?
241+
disconnected?
243242

244243
true
245244
end

lib/new_relic/agent/configuration/default_source.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -576,13 +576,6 @@ def self.enforce_fallback(allowed_values: nil, fallback: nil)
576576
:exclude_from_reported_settings => true,
577577
:description => 'Defines a user for communicating with the New Relic [collector](/docs/using-new-relic/welcome-new-relic/get-started/glossary/#collector) via a proxy server.'
578578
},
579-
:security_policies_token => {
580-
:default => '',
581-
:public => true,
582-
:type => String,
583-
:allowed_from_server => false,
584-
:description => 'Applies Language Agent Security Policy settings.'
585-
},
586579
:send_data_on_exit => {
587580
:default => true,
588581
:public => true,

lib/new_relic/agent/configuration/manager.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
require 'new_relic/agent/configuration/server_source'
1010
require 'new_relic/agent/configuration/environment_source'
1111
require 'new_relic/agent/configuration/high_security_source'
12-
require 'new_relic/agent/configuration/security_policy_source'
1312

1413
module NewRelic
1514
module Agent
@@ -48,7 +47,6 @@ def add_config_for_testing(source, level = 0)
4847

4948
def remove_config_type(sym)
5049
source = case sym
51-
when :security_policy then @security_policy_source
5250
when :high_security then @high_security_source
5351
when :environment then @environment_source
5452
when :server then @server_source
@@ -62,7 +60,6 @@ def remove_config_type(sym)
6260

6361
def remove_config(source)
6462
case source
65-
when SecurityPolicySource then @security_policy_source = nil
6663
when HighSecuritySource then @high_security_source = nil
6764
when EnvironmentSource then @environment_source = nil
6865
when ServerSource then @server_source = nil
@@ -85,7 +82,6 @@ def replace_or_add_config(source)
8582
invoke_callbacks(:add, source)
8683

8784
case source
88-
when SecurityPolicySource then @security_policy_source = source
8985
when HighSecuritySource then @high_security_source = source
9086
when EnvironmentSource then @environment_source = source
9187
when ServerSource then @server_source = source
@@ -379,7 +375,6 @@ def parse_labels_from_dictionary
379375

380376
# Generally only useful during initial construction and tests
381377
def reset_to_defaults
382-
@security_policy_source = nil
383378
@high_security_source = nil
384379
@environment_source = EnvironmentSource.new
385380
log_config(:add, @environment_source) # this is the only place the EnvironmentSource is ever created, so we should log it
@@ -433,7 +428,6 @@ def log_config(direction, source)
433428
end
434429

435430
def delete_all_configs_for_testing
436-
@security_policy_source = nil
437431
@high_security_source = nil
438432
@environment_source = nil
439433
@server_source = nil
@@ -454,8 +448,7 @@ def config_classes_for_testing
454448
private
455449

456450
def config_stack
457-
stack = [@security_policy_source,
458-
@high_security_source,
451+
stack = [@high_security_source,
459452
@environment_source,
460453
@server_source,
461454
@manual_source,

lib/new_relic/agent/configuration/security_policy_source.rb

Lines changed: 0 additions & 246 deletions
This file was deleted.

lib/new_relic/agent/connect/response_handler.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ def configure_agent(config_data)
2323

2424
@agent.agent_id = config_data['agent_run_id']
2525

26-
security_policies = config_data.delete('security_policies')
27-
2826
add_server_side_config(config_data)
29-
add_security_policy_config(security_policies) if security_policies
3027

3128
@agent.transaction_rules = RulesEngine.create_transaction_rules(config_data)
3229
@agent.stats_engine.metric_rules = RulesEngine.create_metric_rules(config_data)
@@ -44,14 +41,6 @@ def add_server_side_config(config_data)
4441
server_config = NewRelic::Agent::Configuration::ServerSource.new(config_data, @config)
4542
@config.replace_or_add_config(server_config)
4643
end
47-
48-
def add_security_policy_config(security_policies)
49-
::NewRelic::Agent.logger.info('Installing security policies')
50-
security_policy_source = NewRelic::Agent::Configuration::SecurityPolicySource.new(security_policies)
51-
@config.replace_or_add_config(security_policy_source)
52-
# drop data collected before applying security policies
53-
@agent.drop_buffered_data
54-
end
5544
end
5645
end
5746
end

0 commit comments

Comments
 (0)