newrelic_rpm 3.9.5.251 → 3.9.6.257

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +74 -3
  3. data/GUIDELINES_FOR_CONTRIBUTING.md +19 -15
  4. data/README.md +1 -1
  5. data/Rakefile +22 -1
  6. data/lib/new_relic/agent/agent.rb +17 -5
  7. data/lib/new_relic/agent/agent_logger.rb +4 -0
  8. data/lib/new_relic/agent/configuration/default_source.rb +45 -1
  9. data/lib/new_relic/agent/configuration/manager.rb +43 -7
  10. data/lib/new_relic/agent/cross_app_monitor.rb +0 -3
  11. data/lib/new_relic/agent/cross_app_tracing.rb +8 -5
  12. data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +4 -1
  13. data/lib/new_relic/agent/instrumentation/active_job.rb +93 -0
  14. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +2 -1
  15. data/lib/new_relic/agent/instrumentation/middleware_tracing.rb +2 -2
  16. data/lib/new_relic/agent/instrumentation/sinatra.rb +1 -2
  17. data/lib/new_relic/agent/new_relic_service.rb +1 -1
  18. data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +20 -1
  19. data/lib/new_relic/agent/new_relic_service/pruby_marshaller.rb +5 -1
  20. data/lib/new_relic/agent/pipe_channel_manager.rb +32 -11
  21. data/lib/new_relic/agent/threading/agent_thread.rb +1 -1
  22. data/lib/new_relic/agent/threading/backtrace_node.rb +4 -3
  23. data/lib/new_relic/agent/transaction.rb +27 -6
  24. data/lib/new_relic/agent/transaction_state.rb +3 -3
  25. data/lib/new_relic/agent/vm/mri_vm.rb +3 -3
  26. data/lib/new_relic/control/frameworks/rails3.rb +1 -16
  27. data/lib/new_relic/control/instance_methods.rb +2 -0
  28. data/lib/new_relic/json_wrapper.rb +18 -3
  29. data/lib/new_relic/rack/browser_monitoring.rb +7 -5
  30. data/lib/new_relic/rack/developer_mode.rb +2 -0
  31. data/lib/new_relic/rack/error_collector.rb +12 -51
  32. data/lib/new_relic/transaction_sample.rb +0 -4
  33. data/lib/new_relic/transaction_sample/segment.rb +0 -4
  34. data/lib/new_relic/version.rb +1 -1
  35. data/newrelic_rpm.gemspec +3 -2
  36. data/test/agent_helper.rb +1 -1
  37. data/test/config/test.cert.crt +16 -12
  38. data/test/config/test.cert.key +13 -13
  39. data/test/environments/lib/environments/runner.rb +3 -0
  40. data/test/environments/rails30/Gemfile +2 -2
  41. data/test/environments/rails31/Gemfile +2 -2
  42. data/test/environments/rails32/Gemfile +2 -2
  43. data/test/environments/rails40/Gemfile +2 -4
  44. data/test/environments/rails41/Gemfile +2 -4
  45. data/test/environments/rails42/Gemfile +2 -4
  46. data/test/fixtures/cross_agent_tests/attribute_configuration.json +349 -0
  47. data/test/fixtures/cross_agent_tests/labels.json +31 -2
  48. data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/README.md +16 -0
  49. data/test/fixtures/cross_agent_tests/rum_client_config.json +9 -9
  50. data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/empty_head +4 -0
  51. data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/no_end_header.html +6 -0
  52. data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag_multiple_tags.html +12 -0
  53. data/test/multiverse/lib/multiverse/runner.rb +33 -1
  54. data/test/multiverse/lib/multiverse/suite.rb +79 -7
  55. data/test/multiverse/suites/active_record/Envfile +1 -1
  56. data/test/multiverse/suites/agent_only/encoding_handling_test.rb +1 -1
  57. data/test/multiverse/suites/agent_only/labels_test.rb +2 -1
  58. data/test/multiverse/suites/agent_only/set_transaction_name_test.rb +2 -3
  59. data/test/multiverse/suites/agent_only/thread_profiling_test.rb +6 -6
  60. data/test/multiverse/suites/capistrano/Envfile +2 -2
  61. data/test/multiverse/suites/capistrano2/Envfile +4 -0
  62. data/test/multiverse/suites/curb/Envfile +4 -0
  63. data/test/multiverse/suites/high_security/config/newrelic.yml +5 -2
  64. data/test/multiverse/suites/high_security/high_security_test.rb +10 -8
  65. data/test/multiverse/suites/json/Envfile +23 -0
  66. data/test/multiverse/suites/json/config/newrelic.yml +22 -0
  67. data/test/multiverse/suites/json/json_test.rb +17 -0
  68. data/test/multiverse/suites/marshalling/marshalling_test.rb +2 -45
  69. data/test/multiverse/suites/rails/Envfile +3 -3
  70. data/test/multiverse/suites/rails/activejob_test.rb +137 -0
  71. data/test/multiverse/suites/rails/error_tracing_test.rb +15 -8
  72. data/test/multiverse/suites/rails/parameter_capture_test.rb +39 -19
  73. data/test/multiverse/suites/sequel/Envfile +5 -5
  74. data/test/multiverse/suites/sidekiq/Envfile +2 -2
  75. data/test/multiverse/suites/sinatra/Envfile +2 -1
  76. data/test/multiverse/suites/yajl/Envfile +13 -0
  77. data/test/multiverse/suites/yajl/config/newrelic.yml +21 -0
  78. data/test/multiverse/suites/yajl/yajl_test.rb +19 -0
  79. data/test/new_relic/agent/agent_logger_test.rb +10 -0
  80. data/test/new_relic/agent/agent_test.rb +7 -1
  81. data/test/new_relic/agent/configuration/default_source_test.rb +24 -0
  82. data/test/new_relic/agent/configuration/manager_test.rb +60 -2
  83. data/test/new_relic/agent/configuration/orphan_configuration_test.rb +25 -13
  84. data/test/new_relic/agent/cross_app_tracing_test.rb +10 -1
  85. data/test/new_relic/agent/instrumentation/active_job_test.rb +20 -0
  86. data/test/new_relic/agent/instrumentation/active_record_test.rb +10 -17
  87. data/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb +15 -0
  88. data/test/new_relic/agent/instrumentation/sinatra_test.rb +1 -1
  89. data/test/new_relic/agent/new_relic_service_test.rb +24 -0
  90. data/test/new_relic/agent/pipe_channel_manager_test.rb +44 -2
  91. data/test/new_relic/agent/threading/agent_thread_test.rb +1 -2
  92. data/test/new_relic/agent/threading/backtrace_node_test.rb +12 -0
  93. data/test/new_relic/agent/transaction_state_test.rb +3 -6
  94. data/test/new_relic/agent/transaction_test.rb +163 -0
  95. data/test/new_relic/agent_test.rb +13 -1
  96. data/test/new_relic/fake_collector.rb +5 -5
  97. data/test/new_relic/fake_server.rb +5 -3
  98. data/test/new_relic/http_client_test_cases.rb +0 -4
  99. data/test/new_relic/marshalling_test_cases.rb +54 -0
  100. data/test/new_relic/multiverse_helpers.rb +2 -2
  101. data/test/new_relic/rack/browser_monitoring_test.rb +6 -0
  102. data/test/new_relic/rack/developer_mode_test.rb +8 -0
  103. data/test/new_relic/rack/error_collector_test.rb +0 -41
  104. data/test/new_relic/transaction_sample/segment_test.rb +0 -13
  105. data/test/new_relic/transaction_sample_test.rb +1 -11
  106. data/test/performance/lib/performance/instrumentation/perf_tools.rb +1 -1
  107. data/test/performance/lib/performance/runner.rb +1 -1
  108. data/test/performance/script/runner +2 -1
  109. data/test/performance/suites/rum_autoinsertion.rb +12 -2
  110. metadata +24 -11
  111. metadata.gz.sig +0 -0
  112. data/test/config/test.cert.csr +0 -11
  113. data/test/config/testing-privkey.pem +0 -18
@@ -0,0 +1,349 @@
1
+ [
2
+ {
3
+ "testname":"everything enabled, no include/exclude",
4
+ "config":
5
+ {
6
+ "browser_monitoring.attributes.enabled":true
7
+ },
8
+ "input_key":"alpha",
9
+ "input_default_destinations":
10
+ ["transaction_events", "transaction_tracer", "error_collector", "browser_monitoring"],
11
+ "expected_destinations":
12
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"]
13
+ },
14
+
15
+ {
16
+ "testname":"browser monitoring attributes disabled by default",
17
+ "config":
18
+ {
19
+ },
20
+ "input_key":"alpha",
21
+ "input_default_destinations":
22
+ ["transaction_events", "transaction_tracer", "error_collector", "browser_monitoring"],
23
+ "expected_destinations":
24
+ ["transaction_events", "transaction_tracer", "error_collector"]
25
+ },
26
+
27
+ {
28
+ "testname":"attributes globally disabled",
29
+ "config":
30
+ {
31
+ "attributes.enabled":false
32
+ },
33
+ "input_key":"alpha",
34
+ "input_default_destinations":
35
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
36
+ "expected_destinations":
37
+ []
38
+ },
39
+
40
+ {
41
+ "testname":"all categories disabled",
42
+ "config":
43
+ {
44
+ "transaction_events.attributes.enabled":false,
45
+ "transaction_tracer.attributes.enabled":false,
46
+ "error_collector.attributes.enabled":false
47
+ },
48
+ "input_key":"alpha",
49
+ "input_default_destinations":
50
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
51
+ "expected_destinations":
52
+ []
53
+ },
54
+
55
+ {
56
+ "testname":"global exclude",
57
+ "config":
58
+ {
59
+ "attributes.exclude":["alpha"],
60
+ "browser_monitoring.attributes.enabled":true
61
+ },
62
+ "input_key":"alpha",
63
+ "input_default_destinations":
64
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
65
+ "expected_destinations":
66
+ []
67
+ },
68
+
69
+ {
70
+ "testname":"exclude in each category",
71
+ "config":
72
+ {
73
+ "transaction_events.attributes.exclude":["alpha"],
74
+ "transaction_tracer.attributes.exclude":["alpha"],
75
+ "error_collector.attributes.exclude":["alpha"],
76
+ "browser_monitoring.attributes.enabled":true,
77
+ "browser_monitoring.attributes.exclude":["alpha"]
78
+ },
79
+ "input_key":"alpha",
80
+ "input_default_destinations":
81
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
82
+ "expected_destinations":
83
+ []
84
+ },
85
+
86
+ {
87
+ "testname":"global include",
88
+ "config":
89
+ {
90
+ "attributes.include":["alpha"],
91
+ "browser_monitoring.attributes.enabled":true
92
+ },
93
+ "input_key":"alpha",
94
+ "input_default_destinations":
95
+ [],
96
+ "expected_destinations":
97
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"]
98
+ },
99
+
100
+ {
101
+ "testname":"each category include",
102
+ "config":
103
+ {
104
+ "transaction_events.attributes.include":["alpha"],
105
+ "transaction_tracer.attributes.include":["alpha"],
106
+ "error_collector.attributes.include":["alpha"],
107
+ "browser_monitoring.attributes.enabled":true,
108
+ "browser_monitoring.attributes.include":["alpha"]
109
+ },
110
+ "input_key":"alpha",
111
+ "input_default_destinations":
112
+ [],
113
+ "expected_destinations":
114
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"]
115
+ },
116
+
117
+ {
118
+ "testname":"global include/exclude contradict",
119
+ "config":
120
+ {
121
+ "attributes.exclude":["alpha"],
122
+ "attributes.include":["alpha"],
123
+ "browser_monitoring.attributes.enabled":true
124
+ },
125
+ "input_key":"alpha",
126
+ "input_default_destinations":
127
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
128
+ "expected_destinations":
129
+ []
130
+ },
131
+
132
+ {
133
+ "testname":"include/exclude contradict in each category",
134
+ "config":
135
+ {
136
+ "transaction_events.attributes.exclude":["alpha"],
137
+ "transaction_events.attributes.include":["alpha"],
138
+ "transaction_tracer.attributes.exclude":["alpha"],
139
+ "transaction_tracer.attributes.include":["alpha"],
140
+ "error_collector.attributes.exclude":["alpha"],
141
+ "error_collector.attributes.include":["alpha"],
142
+ "browser_monitoring.attributes.enabled":true,
143
+ "browser_monitoring.attributes.exclude":["alpha"],
144
+ "browser_monitoring.attributes.include":["alpha"]
145
+ },
146
+ "input_key":"alpha",
147
+ "input_default_destinations":
148
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
149
+ "expected_destinations":
150
+ []
151
+ },
152
+
153
+ {
154
+ "testname":"global exclude contradicts category include",
155
+ "config":
156
+ {
157
+ "attributes.exclude":["alpha"],
158
+ "transaction_events.attributes.include":["alpha"],
159
+ "transaction_tracer.attributes.include":["alpha"],
160
+ "error_collector.attributes.include":["alpha"],
161
+ "browser_monitoring.attributes.enabled":true,
162
+ "browser_monitoring.attributes.include":["alpha"]
163
+ },
164
+ "input_key":"alpha",
165
+ "input_default_destinations":
166
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
167
+ "expected_destinations":
168
+ []
169
+ },
170
+
171
+ {
172
+ "testname":"global include contradicts category exclude",
173
+ "config":
174
+ {
175
+ "attributes.include":["alpha"],
176
+ "transaction_events.attributes.exclude":["alpha"],
177
+ "transaction_tracer.attributes.exclude":["alpha"],
178
+ "error_collector.attributes.exclude":["alpha"],
179
+ "browser_monitoring.attributes.enabled":true,
180
+ "browser_monitoring.attributes.exclude":["alpha"]
181
+ },
182
+ "input_key":"alpha",
183
+ "input_default_destinations":
184
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
185
+ "expected_destinations":
186
+ []
187
+ },
188
+
189
+ {
190
+ "testname":"alpha is more specific than alpha*",
191
+ "config":
192
+ {
193
+ "attributes.include":["alpha"],
194
+ "transaction_events.attributes.exclude":["alpha*"],
195
+ "transaction_tracer.attributes.exclude":["alpha*"],
196
+ "error_collector.attributes.exclude":["alpha*"],
197
+ "browser_monitoring.attributes.enabled":true,
198
+ "browser_monitoring.attributes.exclude":["alpha*"]
199
+ },
200
+ "input_key":"alpha",
201
+ "input_default_destinations":
202
+ [],
203
+ "expected_destinations":
204
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"]
205
+ },
206
+
207
+ {
208
+ "testname":"all destination modifiers applied, not only the most specific one",
209
+ "config":
210
+ {
211
+ "attributes.exclude":["a*"],
212
+ "transaction_events.attributes.include":["ab*"],
213
+ "transaction_events.attributes.exclude":["abc*"],
214
+ "transaction_tracer.attributes.exclude":["abcd*"],
215
+ "transaction_tracer.attributes.include":["abcde*"],
216
+ "error_collector.attributes.include": ["abcdef*"],
217
+ "error_collector.attributes.exclude": ["abcdefg*"],
218
+ "browser_monitoring.attributes.exclude":["abcdefgh*"],
219
+ "browser_monitoring.attributes.include":["abcdefghi*"],
220
+ "browser_monitoring.attributes.enabled":true
221
+ },
222
+ "input_key":"abcdefghik",
223
+ "input_default_destinations":
224
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
225
+ "expected_destinations":
226
+ ["transaction_tracer","browser_monitoring"]
227
+ },
228
+
229
+
230
+ {
231
+ "testname":"venn diagram part 1",
232
+ "config":
233
+ {
234
+ "attributes.exclude":["alpha.*", "alpha.beta.gamma.*"],
235
+ "attributes.include":["alpha.beta.*"],
236
+ "browser_monitoring.attributes.enabled":true
237
+ },
238
+ "input_key":"alpha.",
239
+ "input_default_destinations":
240
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
241
+ "expected_destinations":
242
+ []
243
+ },
244
+
245
+ {
246
+ "testname":"venn diagram part 2",
247
+ "config":
248
+ {
249
+ "attributes.exclude":["alpha.*", "alpha.beta.gamma.*"],
250
+ "attributes.include":["alpha.beta.*"],
251
+ "browser_monitoring.attributes.enabled":true
252
+ },
253
+ "input_key":"alpha.psi",
254
+ "input_default_destinations":
255
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
256
+ "expected_destinations":
257
+ []
258
+ },
259
+
260
+ {
261
+ "testname":"venn diagram part 3",
262
+ "config":
263
+ {
264
+ "attributes.exclude":["alpha.*", "alpha.beta.gamma.*"],
265
+ "attributes.include":["alpha.beta.*"],
266
+ "browser_monitoring.attributes.enabled":true
267
+ },
268
+ "input_key":"alpha.beta.",
269
+ "input_default_destinations":
270
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
271
+ "expected_destinations":
272
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"]
273
+ },
274
+
275
+ {
276
+ "testname":"venn diagram part 4",
277
+ "config":
278
+ {
279
+ "attributes.exclude":["alpha.*", "alpha.beta.gamma.*"],
280
+ "attributes.include":["alpha.beta.*"],
281
+ "browser_monitoring.attributes.enabled":true
282
+ },
283
+ "input_key":"alpha.beta.psi",
284
+ "input_default_destinations":
285
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
286
+ "expected_destinations":
287
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"]
288
+ },
289
+
290
+ {
291
+ "testname":"venn diagram part 5",
292
+ "config":
293
+ {
294
+ "attributes.exclude":["alpha.*", "alpha.beta.gamma.*"],
295
+ "attributes.include":["alpha.beta.*"],
296
+ "browser_monitoring.attributes.enabled":true
297
+ },
298
+ "input_key":"alpha.beta.gamma.",
299
+ "input_default_destinations":
300
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
301
+ "expected_destinations":
302
+ []
303
+ },
304
+
305
+ {
306
+ "testname":"alpha is not mistaken for alpha*",
307
+ "config":
308
+ {
309
+ "transaction_events.attributes.include":["alpha"],
310
+ "transaction_tracer.attributes.exclude":["alpha*"],
311
+ "error_collector.attributes.include": ["alpha"],
312
+ "browser_monitoring.attributes.exclude":["alpha*"],
313
+ "browser_monitoring.attributes.enabled":true
314
+ },
315
+ "input_key":"alpha.beta",
316
+ "input_default_destinations":
317
+ ["transaction_tracer","browser_monitoring"],
318
+ "expected_destinations":
319
+ []
320
+ },
321
+
322
+ {
323
+ "testname":"exact match is case sensitive",
324
+ "config":
325
+ {
326
+ "attributes.exclude":["alpha"],
327
+ "browser_monitoring.attributes.enabled":true
328
+ },
329
+ "input_key":"ALPHA",
330
+ "input_default_destinations":
331
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
332
+ "expected_destinations":
333
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"]
334
+ },
335
+
336
+ {
337
+ "testname":"wildcard match is case sensitive",
338
+ "config":
339
+ {
340
+ "attributes.exclude":["alpha.*"],
341
+ "browser_monitoring.attributes.enabled":true
342
+ },
343
+ "input_key":"ALPHA.BETA",
344
+ "input_default_destinations":
345
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"],
346
+ "expected_destinations":
347
+ ["transaction_events", "transaction_tracer", "error_collector","browser_monitoring"]
348
+ }
349
+ ]
@@ -10,18 +10,31 @@
10
10
  "labelString": "Data Center: East;Data Center :West; Server : North;Server:South; ",
11
11
  "warning": false,
12
12
  "expected": [
13
- { "label_type": "Data Center", "label_value": "East" },
14
13
  { "label_type": "Data Center", "label_value": "West" },
15
- { "label_type": "Server", "label_value": "North" },
16
14
  { "label_type": "Server", "label_value": "South" }
17
15
  ]
18
16
  },
17
+ {
18
+ "name": "multiple_labels_with_leading_and_trailing_whitespaces",
19
+ "labelString": " Data Center : East Coast ; Deployment Flavor : Integration Environment ",
20
+ "warning": false,
21
+ "expected": [
22
+ { "label_type": "Data Center", "label_value": "East Coast" },
23
+ { "label_type": "Deployment Flavor", "label_value": "Integration Environment" }
24
+ ]
25
+ },
19
26
  {
20
27
  "name": "single",
21
28
  "labelString": "Server:East",
22
29
  "warning": false,
23
30
  "expected": [ { "label_type": "Server", "label_value": "East" } ]
24
31
  },
32
+ {
33
+ "name": "single_label_with_leading_and_trailing_whitespaces",
34
+ "labelString": " Data Center : East Coast ",
35
+ "warning": false,
36
+ "expected": [ { "label_type": "Data Center", "label_value": "East Coast" } ]
37
+ },
25
38
  {
26
39
  "name": "single_trailing_semicolon",
27
40
  "labelString": "Server:East;",
@@ -46,6 +59,22 @@
46
59
  "label_value": "VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"
47
60
  } ]
48
61
  },
62
+ {
63
+ "name": "single_label_key_to_be_truncated_with_leading_and_trailing_whitespaces",
64
+ "labelString": " 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345TTTTT :value",
65
+ "warning": false,
66
+ "expected": [
67
+ { "label_type": "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345", "label_value": "value" }
68
+ ]
69
+ },
70
+ {
71
+ "name": "single_label_value_to_be_truncated_with_leading_and_trailing_whitespaces",
72
+ "labelString": "key: 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345TTTTT ",
73
+ "warning": false,
74
+ "expected": [
75
+ { "label_type": "key", "label_value": "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345" }
76
+ ]
77
+ },
49
78
  {
50
79
  "name": "failed_no_delimiters",
51
80
  "labelString": "Server",
@@ -0,0 +1,16 @@
1
+ # PostgreSQL explain plan obfuscation tests
2
+
3
+ These tests show how explain plans for PostgreSQL should be obfuscated when
4
+ SQL obfuscation is enabled. Obfuscation of explain plans for PostgreSQL is
5
+ necessary because they can include portions of the original query that may
6
+ contain sensitive data.
7
+
8
+ Each test case consists of a set of files with the following extensions:
9
+
10
+ * `.query.txt` - the original SQL query that is being explained
11
+ * `.explain.txt` - the raw un-obfuscated output from running `EXPLAIN <query>`
12
+ * `.colon_obfuscated.txt` - the desired obfuscated explain output if using the
13
+ default, more aggressive obfuscation strategy described [here](https://newrelic.atlassian.net/wiki/display/eng/Obfuscating+PostgreSQL+Explain+plans).
14
+ * `.obfuscated.txt` - the desired obfuscated explain output if using a more
15
+ accurate, less aggressive obfuscation strategy detailed in this
16
+ [Jive thread](https://newrelic.jiveon.com/thread/1851).
@@ -6,7 +6,7 @@
6
6
  "apptime_microseconds":5,
7
7
  "queuetime_microseconds":3,
8
8
  "trace_threshold_microseconds":1,
9
- "browser_monitoring.capture_attributes":true,
9
+ "browser_monitoring.attributes.enabled":true,
10
10
  "transaction_name":"WebTransaction/brink/of/glory",
11
11
  "guid":"FEDCBA9876543210",
12
12
  "license_key":"0000111122223333444455556666777788889999",
@@ -29,7 +29,7 @@
29
29
  "applicationTime":5,
30
30
  "ttGuid":"FEDCBA9876543210",
31
31
  "agentToken":"0123456789ABCDEF",
32
- "userAttributes":"SxJRXEFZUBMIEFBXR1ESTQ==",
32
+ "atts":"SxJFEgtKE1BeQlpTEQoSUlVFUBNMTw==",
33
33
  "errorBeacon":"my_error_beacon",
34
34
  "agent":"my_js_agent_file"
35
35
  }
@@ -41,7 +41,7 @@
41
41
  "apptime_microseconds":5,
42
42
  "queuetime_microseconds":3,
43
43
  "trace_threshold_microseconds":10,
44
- "browser_monitoring.capture_attributes":true,
44
+ "browser_monitoring.attributes.enabled":true,
45
45
  "transaction_name":"WebTransaction/brink/of/glory",
46
46
  "guid":"FEDCBA9876543210",
47
47
  "license_key":"0000111122223333444455556666777788889999",
@@ -64,7 +64,7 @@
64
64
  "applicationTime":5,
65
65
  "ttGuid":"",
66
66
  "agentToken":"0123456789ABCDEF",
67
- "userAttributes":"SxJRXEFZUBMIEFBXR1ESTQ==",
67
+ "atts":"SxJFEgtKE1BeQlpTEQoSUlVFUBNMTw==",
68
68
  "errorBeacon":"my_error_beacon",
69
69
  "agent":"my_js_agent_file"
70
70
  }
@@ -76,7 +76,7 @@
76
76
  "apptime_microseconds":5,
77
77
  "queuetime_microseconds":3,
78
78
  "trace_threshold_microseconds":1,
79
- "browser_monitoring.capture_attributes":true,
79
+ "browser_monitoring.attributes.enabled":true,
80
80
  "transaction_name":"WebTransaction/brink/of/glory",
81
81
  "guid":"FEDCBA9876543210",
82
82
  "license_key":"0000111122223333444455556666777788889999",
@@ -99,19 +99,19 @@
99
99
  "applicationTime":5,
100
100
  "ttGuid":"",
101
101
  "agentToken":"",
102
- "userAttributes":"SxJRXEFZUBMIEFBXR1ESTQ==",
102
+ "atts":"SxJFEgtKE1BeQlpTEQoSUlVFUBNMTw==",
103
103
  "errorBeacon":"my_error_beacon",
104
104
  "agent":"my_js_agent_file"
105
105
  }
106
106
  },
107
107
  {
108
- "testname":"browser_monitoring.capture_attributes disabled",
108
+ "testname":"browser_monitoring.attributes.enabled disabled",
109
109
 
110
110
  "cookie":"tk=0123456789ABCDEF",
111
111
  "apptime_microseconds":5,
112
112
  "queuetime_microseconds":3,
113
113
  "trace_threshold_microseconds":1,
114
- "browser_monitoring.capture_attributes":false,
114
+ "browser_monitoring.attributes.enabled":false,
115
115
  "transaction_name":"WebTransaction/brink/of/glory",
116
116
  "guid":"FEDCBA9876543210",
117
117
  "license_key":"0000111122223333444455556666777788889999",
@@ -134,7 +134,7 @@
134
134
  "applicationTime":5,
135
135
  "ttGuid":"FEDCBA9876543210",
136
136
  "agentToken":"0123456789ABCDEF",
137
- "userAttributes":"",
137
+ "atts":"",
138
138
  "errorBeacon":"my_error_beacon",
139
139
  "agent":"my_js_agent_file"
140
140
  }