newrelic_rpm 8.11.0 → 8.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -3
- data/.rubocop_todo.yml +14 -7
- data/Brewfile +1 -0
- data/CHANGELOG.md +78 -16
- data/README.md +1 -1
- data/bin/nrdebug +2 -0
- data/docker-compose.yml +22 -0
- data/lib/new_relic/agent/agent/shutdown.rb +1 -0
- data/lib/new_relic/agent/agent/special_startup.rb +2 -0
- data/lib/new_relic/agent/agent/startup.rb +1 -0
- data/lib/new_relic/agent/agent_logger.rb +1 -1
- data/lib/new_relic/agent/attributes.rb +1 -0
- data/lib/new_relic/agent/audit_logger.rb +2 -1
- data/lib/new_relic/agent/commands/thread_profiler_session.rb +1 -0
- data/lib/new_relic/agent/configuration/default_source.rb +1415 -1359
- data/lib/new_relic/agent/configuration/dotted_hash.rb +1 -0
- data/lib/new_relic/agent/configuration/environment_source.rb +3 -2
- data/lib/new_relic/agent/configuration/high_security_source.rb +1 -0
- data/lib/new_relic/agent/configuration/manager.rb +3 -0
- data/lib/new_relic/agent/configuration/security_policy_source.rb +10 -0
- data/lib/new_relic/agent/configuration/yaml_source.rb +1 -0
- data/lib/new_relic/agent/connect/request_builder.rb +1 -0
- data/lib/new_relic/agent/database/obfuscation_helpers.rb +1 -0
- data/lib/new_relic/agent/database.rb +7 -0
- data/lib/new_relic/agent/database_adapter.rb +2 -0
- data/lib/new_relic/agent/datastores/mongo/event_formatter.rb +3 -2
- data/lib/new_relic/agent/datastores/mongo/metric_translator.rb +1 -1
- data/lib/new_relic/agent/datastores/nosql_obfuscator.rb +41 -0
- data/lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb +3 -0
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_attributes.rb +3 -0
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_metrics.rb +1 -0
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb +1 -0
- data/lib/new_relic/agent/distributed_tracing/trace_context.rb +1 -0
- data/lib/new_relic/agent/encoding_normalizer.rb +2 -0
- data/lib/new_relic/agent/error_collector.rb +3 -0
- data/lib/new_relic/agent/error_filter.rb +1 -0
- data/lib/new_relic/agent/error_trace_aggregator.rb +1 -0
- data/lib/new_relic/agent/event_aggregator.rb +1 -0
- data/lib/new_relic/agent/event_loop.rb +2 -0
- data/lib/new_relic/agent/http_clients/abstract.rb +2 -0
- data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +1 -1
- data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +1 -1
- data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +1 -0
- data/lib/new_relic/agent/instrumentation/active_merchant.rb +1 -2
- data/lib/new_relic/agent/instrumentation/active_storage_subscriber.rb +2 -0
- data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +1 -2
- data/lib/new_relic/agent/instrumentation/authlogic.rb +0 -2
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +1 -0
- data/lib/new_relic/agent/instrumentation/data_mapper.rb +0 -1
- data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +1 -2
- data/lib/new_relic/agent/instrumentation/elasticsearch/chain.rb +29 -0
- data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +66 -0
- data/lib/new_relic/agent/instrumentation/elasticsearch/prepend.rb +13 -0
- data/lib/new_relic/agent/instrumentation/elasticsearch.rb +31 -0
- data/lib/new_relic/agent/instrumentation/excon.rb +17 -0
- data/lib/new_relic/agent/instrumentation/grape/instrumentation.rb +1 -0
- data/lib/new_relic/agent/instrumentation/logger/instrumentation.rb +4 -0
- data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +2 -0
- data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +2 -0
- data/lib/new_relic/agent/instrumentation/rack/chain.rb +10 -2
- data/lib/new_relic/agent/instrumentation/rack/instrumentation.rb +3 -0
- data/lib/new_relic/agent/instrumentation/rack/prepend.rb +9 -2
- data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +0 -1
- data/lib/new_relic/agent/instrumentation/rake/instrumentation.rb +1 -0
- data/lib/new_relic/agent/instrumentation/redis/chain.rb +18 -6
- data/lib/new_relic/agent/instrumentation/redis/constants.rb +17 -0
- data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +28 -18
- data/lib/new_relic/agent/instrumentation/redis/middleware.rb +16 -0
- data/lib/new_relic/agent/instrumentation/redis/prepend.rb +6 -0
- data/lib/new_relic/agent/instrumentation/redis.rb +6 -0
- data/lib/new_relic/agent/instrumentation/sidekiq/client.rb +20 -0
- data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +30 -0
- data/lib/new_relic/agent/instrumentation/sidekiq/server.rb +37 -0
- data/lib/new_relic/agent/instrumentation/sidekiq.rb +7 -70
- data/lib/new_relic/agent/instrumentation/sinatra.rb +1 -2
- data/lib/new_relic/agent/instrumentation/sunspot.rb +0 -2
- data/lib/new_relic/agent/instrumentation/thread/instrumentation.rb +1 -0
- data/lib/new_relic/agent/instrumentation/tilt/instrumentation.rb +1 -0
- data/lib/new_relic/agent/javascript_instrumentor.rb +1 -0
- data/lib/new_relic/agent/local_log_decorator.rb +1 -0
- data/lib/new_relic/agent/log_event_aggregator.rb +1 -0
- data/lib/new_relic/agent/messaging.rb +1 -0
- data/lib/new_relic/agent/method_tracer.rb +4 -0
- data/lib/new_relic/agent/method_tracer_helpers.rb +1 -1
- data/lib/new_relic/agent/monitors/distributed_tracing_monitor.rb +1 -0
- data/lib/new_relic/agent/new_relic_service.rb +2 -0
- data/lib/new_relic/agent/parameter_filtering.rb +7 -1
- data/lib/new_relic/agent/pipe_channel_manager.rb +2 -0
- data/lib/new_relic/agent/rules_engine.rb +1 -0
- data/lib/new_relic/agent/samplers/cpu_sampler.rb +1 -0
- data/lib/new_relic/agent/samplers/memory_sampler.rb +5 -0
- data/lib/new_relic/agent/span_event_primitive.rb +1 -0
- data/lib/new_relic/agent/stats.rb +1 -0
- data/lib/new_relic/agent/stats_engine/gc_profiler.rb +1 -0
- data/lib/new_relic/agent/system_info.rb +3 -0
- data/lib/new_relic/agent/threading/agent_thread.rb +1 -0
- data/lib/new_relic/agent/threading/backtrace_service.rb +1 -0
- data/lib/new_relic/agent/threading/thread_profile.rb +3 -0
- data/lib/new_relic/agent/tracer.rb +5 -1
- data/lib/new_relic/agent/transaction/abstract_segment.rb +3 -0
- data/lib/new_relic/agent/transaction/datastore_segment.rb +3 -0
- data/lib/new_relic/agent/transaction/distributed_tracer.rb +4 -0
- data/lib/new_relic/agent/transaction/distributed_tracing.rb +1 -0
- data/lib/new_relic/agent/transaction/external_request_segment.rb +1 -0
- data/lib/new_relic/agent/transaction/message_broker_segment.rb +1 -0
- data/lib/new_relic/agent/transaction/segment.rb +1 -0
- data/lib/new_relic/agent/transaction/trace.rb +4 -0
- data/lib/new_relic/agent/transaction/trace_node.rb +1 -0
- data/lib/new_relic/agent/transaction/transaction_sample_buffer.rb +2 -0
- data/lib/new_relic/agent/transaction.rb +10 -0
- data/lib/new_relic/agent/transaction_event_aggregator.rb +1 -0
- data/lib/new_relic/agent/transaction_time_aggregator.rb +1 -0
- data/lib/new_relic/agent/utilization/pcf.rb +1 -0
- data/lib/new_relic/agent/utilization/vendor.rb +2 -0
- data/lib/new_relic/agent/utilization_data.rb +3 -0
- data/lib/new_relic/agent.rb +4 -2
- data/lib/new_relic/cli/commands/install.rb +1 -0
- data/lib/new_relic/coerce.rb +6 -0
- data/lib/new_relic/collection_helper.rb +1 -0
- data/lib/new_relic/constants.rb +2 -0
- data/lib/new_relic/control/frameworks/rails.rb +5 -0
- data/lib/new_relic/control/instrumentation.rb +6 -8
- data/lib/new_relic/dependency_detection.rb +2 -0
- data/lib/new_relic/helper.rb +1 -0
- data/lib/new_relic/language_support.rb +1 -0
- data/lib/new_relic/latest_changes.rb +1 -0
- data/lib/new_relic/local_environment.rb +7 -1
- data/lib/new_relic/metric_spec.rb +2 -0
- data/lib/new_relic/rack/agent_middleware.rb +2 -0
- data/lib/new_relic/rack/browser_monitoring.rb +1 -0
- data/lib/new_relic/traced_thread.rb +1 -0
- data/lib/new_relic/version.rb +1 -1
- data/lib/tasks/helpers/format.rb +3 -0
- data/lib/tasks/helpers/prompt.rb +1 -1
- data/lib/tasks/instrumentation_generator/README.md +2 -2
- data/lib/tasks/instrumentation_generator/TODO.md +5 -5
- data/lib/tasks/instrumentation_generator/instrumentation.thor +27 -5
- data/lib/tasks/instrumentation_generator/templates/chain.tt +2 -1
- data/lib/tasks/instrumentation_generator/templates/chain_method.tt +3 -2
- data/lib/tasks/instrumentation_generator/templates/instrumentation.tt +2 -1
- data/lib/tasks/instrumentation_generator/templates/instrumentation_method.tt +1 -1
- data/lib/tasks/instrumentation_generator/templates/prepend.tt +1 -1
- data/lib/tasks/instrumentation_generator/templates/prepend_method.tt +1 -1
- data/lib/tasks/instrumentation_generator/templates/test.tt +1 -1
- data/newrelic.yml +13 -3
- data/newrelic_rpm.gemspec +7 -7
- data/test/agent_helper.rb +24 -0
- metadata +18 -79
- data/lib/new_relic/agent/datastores/mongo/obfuscator.rb +0 -43
data/test/agent_helper.rb
CHANGED
@@ -48,6 +48,7 @@ end
|
|
48
48
|
|
49
49
|
def assert_has_traced_error(error_class)
|
50
50
|
errors = harvest_error_traces!
|
51
|
+
|
51
52
|
refute_nil errors.find { |e| e.exception_class_name == error_class.name }, \
|
52
53
|
"Didn't find error of class #{error_class}"
|
53
54
|
end
|
@@ -83,6 +84,7 @@ end
|
|
83
84
|
unless defined? assert_includes
|
84
85
|
def assert_includes(collection, member, msg = nil)
|
85
86
|
msg = "Expected #{collection.inspect} to include #{member.inspect}"
|
87
|
+
|
86
88
|
assert_includes collection, member, msg
|
87
89
|
end
|
88
90
|
end
|
@@ -90,6 +92,7 @@ end
|
|
90
92
|
unless defined? assert_not_includes
|
91
93
|
def assert_not_includes(collection, member, msg = nil)
|
92
94
|
msg = "Expected #{collection.inspect} not to include #{member.inspect}"
|
95
|
+
|
93
96
|
refute_includes collection, member, msg
|
94
97
|
end
|
95
98
|
end
|
@@ -107,6 +110,7 @@ end
|
|
107
110
|
|
108
111
|
def assert_log_contains(log, message)
|
109
112
|
lines = log.array
|
113
|
+
|
110
114
|
assert (lines.any? { |line| line.match(message) })
|
111
115
|
end
|
112
116
|
|
@@ -117,6 +121,7 @@ def assert_audit_log_contains(audit_log_contents, needle)
|
|
117
121
|
regex = /[:"]/
|
118
122
|
needle = needle.gsub(regex, '')
|
119
123
|
haystack = audit_log_contents.gsub(regex, '')
|
124
|
+
|
120
125
|
assert_includes(haystack, needle, "Expected log to contain '#{needle}'")
|
121
126
|
end
|
122
127
|
|
@@ -136,10 +141,12 @@ def assert_audit_log_contains_object(audit_log_contents, o, format = :json)
|
|
136
141
|
assert_audit_log_contains_object(audit_log_contents, k, format)
|
137
142
|
end
|
138
143
|
when Array
|
144
|
+
|
139
145
|
o.each do |el|
|
140
146
|
assert_audit_log_contains_object(audit_log_contents, el, format)
|
141
147
|
end
|
142
148
|
when NilClass
|
149
|
+
|
143
150
|
assert_audit_log_contains(audit_log_contents, format == :json ? "null" : "nil")
|
144
151
|
else
|
145
152
|
assert_audit_log_contains(audit_log_contents, o.inspect)
|
@@ -148,6 +155,7 @@ end
|
|
148
155
|
|
149
156
|
def compare_metrics(expected, actual)
|
150
157
|
actual.delete_if { |a| a.include?('GC/Transaction/') }
|
158
|
+
|
151
159
|
assert_equal(expected.to_a.sort, actual.to_a.sort, "extra: #{(actual - expected).to_a.inspect}; missing: #{(expected - actual).to_a.inspect}")
|
152
160
|
end
|
153
161
|
|
@@ -206,6 +214,7 @@ def assert_stats_has_values_with_call_count(expected_value, actual_value, msg)
|
|
206
214
|
if expected_value.to_s =~ /([<>]=?)\s*(\d+)/
|
207
215
|
operator = Regexp.last_match(1).to_sym
|
208
216
|
count = Regexp.last_match(2).to_i
|
217
|
+
|
209
218
|
assert_operator(actual_value, operator, count, msg)
|
210
219
|
# == comparison
|
211
220
|
else
|
@@ -229,6 +238,7 @@ def assert_metrics_recorded(expected)
|
|
229
238
|
|
230
239
|
assert(actual_stats, msg) # rubocop:disable Minitest/AssertWithExpectedArgument
|
231
240
|
end
|
241
|
+
|
232
242
|
assert_stats_has_values(actual_stats, expected_spec, expected_attrs)
|
233
243
|
end
|
234
244
|
end
|
@@ -246,6 +256,7 @@ end
|
|
246
256
|
#
|
247
257
|
def assert_metrics_recorded_exclusive(expected, options = {})
|
248
258
|
expected = _normalize_metric_expectations(expected)
|
259
|
+
|
249
260
|
assert_metrics_recorded(expected)
|
250
261
|
|
251
262
|
recorded_metrics = NewRelic::Agent.instance.stats_engine.to_h.keys
|
@@ -300,6 +311,7 @@ def assert_metrics_not_recorded(not_expected)
|
|
300
311
|
found_but_not_expected << spec
|
301
312
|
end
|
302
313
|
end
|
314
|
+
|
303
315
|
assert_empty(found_but_not_expected, "Found unexpected metrics: #{format_metric_spec_list(found_but_not_expected)}")
|
304
316
|
end
|
305
317
|
|
@@ -328,11 +340,13 @@ end
|
|
328
340
|
|
329
341
|
def assert_truthy(expected, msg = nil)
|
330
342
|
msg ||= "Expected #{expected.inspect} to be truthy"
|
343
|
+
|
331
344
|
refute !expected, msg
|
332
345
|
end
|
333
346
|
|
334
347
|
def assert_falsy(expected, msg = nil)
|
335
348
|
msg ||= "Expected #{expected.inspect} to be falsy"
|
349
|
+
|
336
350
|
refute expected, msg
|
337
351
|
end
|
338
352
|
|
@@ -411,6 +425,7 @@ end
|
|
411
425
|
def build_deferred_error_attributes(segment)
|
412
426
|
return unless segment.noticed_error
|
413
427
|
return if segment.noticed_error_attributes.frozen?
|
428
|
+
|
414
429
|
segment.noticed_error.build_error_attributes
|
415
430
|
end
|
416
431
|
|
@@ -454,6 +469,7 @@ end
|
|
454
469
|
|
455
470
|
def last_transaction_trace
|
456
471
|
return unless last_sample = NewRelic::Agent.agent.transaction_sampler.last_sample
|
472
|
+
|
457
473
|
NewRelic::Agent::Transaction::TraceBuilder.build_trace(last_sample)
|
458
474
|
end
|
459
475
|
|
@@ -639,6 +655,7 @@ def constant_path(name, opts = {})
|
|
639
655
|
if !path.last.constants.include?(part.to_sym)
|
640
656
|
return allow_partial ? path : nil
|
641
657
|
end
|
658
|
+
|
642
659
|
path << path.last.const_get(part)
|
643
660
|
end
|
644
661
|
path
|
@@ -655,6 +672,7 @@ def undefine_constant(constant_symbol)
|
|
655
672
|
parent = get_parent(const_str)
|
656
673
|
const_name = const_str.gsub(/.*::/, '')
|
657
674
|
return yield unless parent && parent.constants.include?(const_name.to_sym)
|
675
|
+
|
658
676
|
removed_constant = parent.send(:remove_const, const_name)
|
659
677
|
yield
|
660
678
|
ensure
|
@@ -884,6 +902,7 @@ def assert_event_attributes(event, test_name, expected_attributes, non_expected_
|
|
884
902
|
event_attrs.each do |name, actual_value|
|
885
903
|
msg << " #{name}: #{actual_value.inspect}\n"
|
886
904
|
end
|
905
|
+
|
887
906
|
assert_empty(incorrect_attributes, msg)
|
888
907
|
|
889
908
|
non_expected_attributes.each do |name|
|
@@ -929,6 +948,7 @@ def mock_http_response(headers, wrap_it = true)
|
|
929
948
|
net_http_resp.add_field(key.to_s, value)
|
930
949
|
end
|
931
950
|
return net_http_resp unless wrap_it
|
951
|
+
|
932
952
|
NewRelic::Agent::HTTPClients::NetHTTPResponse.new(net_http_resp)
|
933
953
|
end
|
934
954
|
|
@@ -945,6 +965,7 @@ end
|
|
945
965
|
# the expectations against it.
|
946
966
|
def assert_segment_noticed_error(txn, segment_name, error_classes, error_message)
|
947
967
|
error_segment = txn.segments.reverse.detect { |s| s.noticed_error }
|
968
|
+
|
948
969
|
assert error_segment, "Expected at least one segment with a noticed_error"
|
949
970
|
|
950
971
|
assert_match_or_equal segment_name, error_segment.name
|
@@ -962,6 +983,7 @@ end
|
|
962
983
|
|
963
984
|
def refute_transaction_noticed_error(txn, error_class)
|
964
985
|
error_segment = txn.segments.reverse.detect { |s| s.noticed_error }
|
986
|
+
|
965
987
|
assert error_segment, "Expected at least one segment with a noticed_error"
|
966
988
|
assert_empty txn.exceptions, "Expected transaction to NOT notice any segment errors"
|
967
989
|
end
|
@@ -974,10 +996,12 @@ def refute_raises(*exp)
|
|
974
996
|
rescue MiniTest::Skip => e
|
975
997
|
puts "SKIP REPORTS: #{e.inspect}"
|
976
998
|
return e if exp.include?(MiniTest::Skip)
|
999
|
+
|
977
1000
|
raise e
|
978
1001
|
rescue Exception => e
|
979
1002
|
puts "EXCEPTION RAISED: #{e.inspect}\n#{e.backtrace}"
|
980
1003
|
exp = exp.first if exp.size == 1
|
1004
|
+
|
981
1005
|
flunk(msg || "unexpected exception raised: #{e}")
|
982
1006
|
end
|
983
1007
|
end
|
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: 8.
|
4
|
+
version: 8.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanna McClure
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-
|
14
|
+
date: 2022-11-15 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -61,14 +61,14 @@ dependencies:
|
|
61
61
|
requirements:
|
62
62
|
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 1.
|
64
|
+
version: '1.16'
|
65
65
|
type: :development
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: 1.
|
71
|
+
version: '1.16'
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
73
|
name: rake
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,62 +83,6 @@ dependencies:
|
|
83
83
|
- - '='
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: 12.3.3
|
86
|
-
- !ruby/object:Gem::Dependency
|
87
|
-
name: rubocop
|
88
|
-
requirement: !ruby/object:Gem::Requirement
|
89
|
-
requirements:
|
90
|
-
- - ">="
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: '0'
|
93
|
-
type: :development
|
94
|
-
prerelease: false
|
95
|
-
version_requirements: !ruby/object:Gem::Requirement
|
96
|
-
requirements:
|
97
|
-
- - ">="
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '0'
|
100
|
-
- !ruby/object:Gem::Dependency
|
101
|
-
name: rubocop-minitest
|
102
|
-
requirement: !ruby/object:Gem::Requirement
|
103
|
-
requirements:
|
104
|
-
- - ">="
|
105
|
-
- !ruby/object:Gem::Version
|
106
|
-
version: '0'
|
107
|
-
type: :development
|
108
|
-
prerelease: false
|
109
|
-
version_requirements: !ruby/object:Gem::Requirement
|
110
|
-
requirements:
|
111
|
-
- - ">="
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
version: '0'
|
114
|
-
- !ruby/object:Gem::Dependency
|
115
|
-
name: rubocop-performance
|
116
|
-
requirement: !ruby/object:Gem::Requirement
|
117
|
-
requirements:
|
118
|
-
- - ">="
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: '0'
|
121
|
-
type: :development
|
122
|
-
prerelease: false
|
123
|
-
version_requirements: !ruby/object:Gem::Requirement
|
124
|
-
requirements:
|
125
|
-
- - ">="
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: '0'
|
128
|
-
- !ruby/object:Gem::Dependency
|
129
|
-
name: rubocop-rake
|
130
|
-
requirement: !ruby/object:Gem::Requirement
|
131
|
-
requirements:
|
132
|
-
- - ">="
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version: '0'
|
135
|
-
type: :development
|
136
|
-
prerelease: false
|
137
|
-
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
requirements:
|
139
|
-
- - ">="
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '0'
|
142
86
|
- !ruby/object:Gem::Dependency
|
143
87
|
name: simplecov
|
144
88
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,34 +97,20 @@ dependencies:
|
|
153
97
|
- - ">="
|
154
98
|
- !ruby/object:Gem::Version
|
155
99
|
version: '0'
|
156
|
-
- !ruby/object:Gem::Dependency
|
157
|
-
name: thor
|
158
|
-
requirement: !ruby/object:Gem::Requirement
|
159
|
-
requirements:
|
160
|
-
- - ">="
|
161
|
-
- !ruby/object:Gem::Version
|
162
|
-
version: '0'
|
163
|
-
type: :development
|
164
|
-
prerelease: false
|
165
|
-
version_requirements: !ruby/object:Gem::Requirement
|
166
|
-
requirements:
|
167
|
-
- - ">="
|
168
|
-
- !ruby/object:Gem::Version
|
169
|
-
version: '0'
|
170
100
|
- !ruby/object:Gem::Dependency
|
171
101
|
name: yard
|
172
102
|
requirement: !ruby/object:Gem::Requirement
|
173
103
|
requirements:
|
174
|
-
- - "
|
104
|
+
- - ">"
|
175
105
|
- !ruby/object:Gem::Version
|
176
|
-
version:
|
106
|
+
version: 0.9.26
|
177
107
|
type: :development
|
178
108
|
prerelease: false
|
179
109
|
version_requirements: !ruby/object:Gem::Requirement
|
180
110
|
requirements:
|
181
|
-
- - "
|
111
|
+
- - ">"
|
182
112
|
- !ruby/object:Gem::Version
|
183
|
-
version:
|
113
|
+
version: 0.9.26
|
184
114
|
description: |
|
185
115
|
New Relic is a performance management system, developed by New Relic,
|
186
116
|
Inc (http://www.newrelic.com). New Relic provides you with deep
|
@@ -272,7 +202,7 @@ files:
|
|
272
202
|
- lib/new_relic/agent/datastores/mongo.rb
|
273
203
|
- lib/new_relic/agent/datastores/mongo/event_formatter.rb
|
274
204
|
- lib/new_relic/agent/datastores/mongo/metric_translator.rb
|
275
|
-
- lib/new_relic/agent/datastores/
|
205
|
+
- lib/new_relic/agent/datastores/nosql_obfuscator.rb
|
276
206
|
- lib/new_relic/agent/datastores/redis.rb
|
277
207
|
- lib/new_relic/agent/deprecator.rb
|
278
208
|
- lib/new_relic/agent/distributed_tracing.rb
|
@@ -339,6 +269,10 @@ files:
|
|
339
269
|
- lib/new_relic/agent/instrumentation/delayed_job/instrumentation.rb
|
340
270
|
- lib/new_relic/agent/instrumentation/delayed_job/prepend.rb
|
341
271
|
- lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb
|
272
|
+
- lib/new_relic/agent/instrumentation/elasticsearch.rb
|
273
|
+
- lib/new_relic/agent/instrumentation/elasticsearch/chain.rb
|
274
|
+
- lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb
|
275
|
+
- lib/new_relic/agent/instrumentation/elasticsearch/prepend.rb
|
342
276
|
- lib/new_relic/agent/instrumentation/excon.rb
|
343
277
|
- lib/new_relic/agent/instrumentation/excon/middleware.rb
|
344
278
|
- lib/new_relic/agent/instrumentation/grape.rb
|
@@ -407,7 +341,9 @@ files:
|
|
407
341
|
- lib/new_relic/agent/instrumentation/rake/prepend.rb
|
408
342
|
- lib/new_relic/agent/instrumentation/redis.rb
|
409
343
|
- lib/new_relic/agent/instrumentation/redis/chain.rb
|
344
|
+
- lib/new_relic/agent/instrumentation/redis/constants.rb
|
410
345
|
- lib/new_relic/agent/instrumentation/redis/instrumentation.rb
|
346
|
+
- lib/new_relic/agent/instrumentation/redis/middleware.rb
|
411
347
|
- lib/new_relic/agent/instrumentation/redis/prepend.rb
|
412
348
|
- lib/new_relic/agent/instrumentation/resque.rb
|
413
349
|
- lib/new_relic/agent/instrumentation/resque/chain.rb
|
@@ -417,6 +353,9 @@ files:
|
|
417
353
|
- lib/new_relic/agent/instrumentation/sequel.rb
|
418
354
|
- lib/new_relic/agent/instrumentation/sequel_helper.rb
|
419
355
|
- lib/new_relic/agent/instrumentation/sidekiq.rb
|
356
|
+
- lib/new_relic/agent/instrumentation/sidekiq/client.rb
|
357
|
+
- lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb
|
358
|
+
- lib/new_relic/agent/instrumentation/sidekiq/server.rb
|
420
359
|
- lib/new_relic/agent/instrumentation/sinatra.rb
|
421
360
|
- lib/new_relic/agent/instrumentation/sinatra/chain.rb
|
422
361
|
- lib/new_relic/agent/instrumentation/sinatra/ignorer.rb
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# This file is distributed under New Relic's license terms.
|
2
|
-
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
|
3
|
-
# frozen_string_literal: true
|
4
|
-
|
5
|
-
module NewRelic
|
6
|
-
module Agent
|
7
|
-
module Datastores
|
8
|
-
module Mongo
|
9
|
-
module Obfuscator
|
10
|
-
ALLOWLIST = [:operation].freeze
|
11
|
-
|
12
|
-
def self.obfuscate_statement(source, allowlist = ALLOWLIST)
|
13
|
-
if source.is_a?(Hash)
|
14
|
-
obfuscated = {}
|
15
|
-
source.each do |key, value|
|
16
|
-
if allowlist.include?(key)
|
17
|
-
obfuscated[key] = value
|
18
|
-
else
|
19
|
-
obfuscated[key] = obfuscate_value(value, allowlist)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
obfuscated
|
23
|
-
else
|
24
|
-
obfuscate_value(source, allowlist)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
QUESTION_MARK = '?'.freeze
|
29
|
-
|
30
|
-
def self.obfuscate_value(value, allowlist = ALLOWLIST)
|
31
|
-
if value.is_a?(Hash)
|
32
|
-
obfuscate_statement(value, allowlist)
|
33
|
-
elsif value.is_a?(Array)
|
34
|
-
value.map { |v| obfuscate_value(v, allowlist) }
|
35
|
-
else
|
36
|
-
QUESTION_MARK
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|