appsignal 3.0.13-java → 3.0.17-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -1341,6 +1341,31 @@ describe Appsignal::Transaction do
1341
1341
  end
1342
1342
  end
1343
1343
 
1344
+ describe "#cleaned_error_message" do
1345
+ let(:error) { StandardError.new("Error message") }
1346
+ subject { transaction.send(:cleaned_error_message, error) }
1347
+
1348
+ it "returns the error message" do
1349
+ expect(subject).to eq "Error message"
1350
+ end
1351
+
1352
+ context "with a PG::UniqueViolation" do
1353
+ module PG
1354
+ class UniqueViolation < StandardError; end
1355
+ end
1356
+
1357
+ let(:error) do
1358
+ PG::UniqueViolation.new(
1359
+ "ERROR: duplicate key value violates unique constraint \"index_users_on_email\" DETAIL: Key (email)=(test@test.com) already exists."
1360
+ )
1361
+ end
1362
+
1363
+ it "returns a sanizited error message" do
1364
+ expect(subject).to eq "ERROR: duplicate key value violates unique constraint \"index_users_on_email\" DETAIL: Key (email)=(?) already exists."
1365
+ end
1366
+ end
1367
+ end
1368
+
1344
1369
  describe ".to_hash / .to_h" do
1345
1370
  subject { transaction.to_hash }
1346
1371
 
@@ -1236,7 +1236,7 @@ describe Appsignal do
1236
1236
  before do
1237
1237
  capture_stdout(out_stream) do
1238
1238
  initialize_config
1239
- Appsignal.config[:debug] = true
1239
+ Appsignal.config[:log_level] = "debug"
1240
1240
  Appsignal.start_logger
1241
1241
  end
1242
1242
  end
@@ -5,6 +5,10 @@ module DependencyHelper
5
5
  Gem::Version.new(RUBY_VERSION)
6
6
  end
7
7
 
8
+ def running_ruby_2_0?
9
+ ruby_version.segments.take(2) == [2, 0]
10
+ end
11
+
8
12
  def running_jruby?
9
13
  defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
10
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.13
4
+ version: 3.0.17
5
5
  platform: java
6
6
  authors:
7
7
  - Robert Beekman
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-08-19 00:00:00.000000000 Z
13
+ date: 2021-12-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -227,6 +227,7 @@ files:
227
227
  - lib/appsignal/hooks/delayed_job.rb
228
228
  - lib/appsignal/hooks/excon.rb
229
229
  - lib/appsignal/hooks/mongo_ruby_driver.rb
230
+ - lib/appsignal/hooks/mri.rb
230
231
  - lib/appsignal/hooks/net_http.rb
231
232
  - lib/appsignal/hooks/passenger.rb
232
233
  - lib/appsignal/hooks/puma.rb
@@ -264,11 +265,13 @@ files:
264
265
  - lib/appsignal/marker.rb
265
266
  - lib/appsignal/minutely.rb
266
267
  - lib/appsignal/probes.rb
268
+ - lib/appsignal/probes/mri.rb
267
269
  - lib/appsignal/probes/sidekiq.rb
268
270
  - lib/appsignal/rack/generic_instrumentation.rb
269
271
  - lib/appsignal/rack/rails_instrumentation.rb
270
272
  - lib/appsignal/rack/sinatra_instrumentation.rb
271
273
  - lib/appsignal/rack/streaming_listener.rb
274
+ - lib/appsignal/span.rb
272
275
  - lib/appsignal/system.rb
273
276
  - lib/appsignal/transaction.rb
274
277
  - lib/appsignal/transmitter.rb
@@ -285,7 +288,7 @@ files:
285
288
  - mono.yml
286
289
  - resources/appsignal.yml.erb
287
290
  - resources/cacert.pem
288
- - script/install_lintje
291
+ - script/lint_git
289
292
  - spec/.rubocop.yml
290
293
  - spec/lib/appsignal/auth_check_spec.rb
291
294
  - spec/lib/appsignal/capistrano2_spec.rb
@@ -324,6 +327,7 @@ files:
324
327
  - spec/lib/appsignal/hooks/delayed_job_spec.rb
325
328
  - spec/lib/appsignal/hooks/excon_spec.rb
326
329
  - spec/lib/appsignal/hooks/mongo_ruby_driver_spec.rb
330
+ - spec/lib/appsignal/hooks/mri_spec.rb
327
331
  - spec/lib/appsignal/hooks/net_http_spec.rb
328
332
  - spec/lib/appsignal/hooks/passenger_spec.rb
329
333
  - spec/lib/appsignal/hooks/puma_spec.rb
@@ -350,11 +354,13 @@ files:
350
354
  - spec/lib/appsignal/logger_spec.rb
351
355
  - spec/lib/appsignal/marker_spec.rb
352
356
  - spec/lib/appsignal/minutely_spec.rb
357
+ - spec/lib/appsignal/probes/mri_spec.rb
353
358
  - spec/lib/appsignal/probes/sidekiq_spec.rb
354
359
  - spec/lib/appsignal/rack/generic_instrumentation_spec.rb
355
360
  - spec/lib/appsignal/rack/rails_instrumentation_spec.rb
356
361
  - spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb
357
362
  - spec/lib/appsignal/rack/streaming_listener_spec.rb
363
+ - spec/lib/appsignal/span_spec.rb
358
364
  - spec/lib/appsignal/system_spec.rb
359
365
  - spec/lib/appsignal/transaction_spec.rb
360
366
  - spec/lib/appsignal/transmitter_spec.rb
@@ -429,7 +435,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
429
435
  - !ruby/object:Gem::Version
430
436
  version: '0'
431
437
  requirements: []
432
- rubygems_version: 3.2.25
438
+ rubygems_version: 3.2.32
433
439
  signing_key:
434
440
  specification_version: 4
435
441
  summary: Logs performance and exception data from your app to appsignal.com
@@ -472,6 +478,7 @@ test_files:
472
478
  - spec/lib/appsignal/hooks/delayed_job_spec.rb
473
479
  - spec/lib/appsignal/hooks/excon_spec.rb
474
480
  - spec/lib/appsignal/hooks/mongo_ruby_driver_spec.rb
481
+ - spec/lib/appsignal/hooks/mri_spec.rb
475
482
  - spec/lib/appsignal/hooks/net_http_spec.rb
476
483
  - spec/lib/appsignal/hooks/passenger_spec.rb
477
484
  - spec/lib/appsignal/hooks/puma_spec.rb
@@ -498,11 +505,13 @@ test_files:
498
505
  - spec/lib/appsignal/logger_spec.rb
499
506
  - spec/lib/appsignal/marker_spec.rb
500
507
  - spec/lib/appsignal/minutely_spec.rb
508
+ - spec/lib/appsignal/probes/mri_spec.rb
501
509
  - spec/lib/appsignal/probes/sidekiq_spec.rb
502
510
  - spec/lib/appsignal/rack/generic_instrumentation_spec.rb
503
511
  - spec/lib/appsignal/rack/rails_instrumentation_spec.rb
504
512
  - spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb
505
513
  - spec/lib/appsignal/rack/streaming_listener_spec.rb
514
+ - spec/lib/appsignal/span_spec.rb
506
515
  - spec/lib/appsignal/system_spec.rb
507
516
  - spec/lib/appsignal/transaction_spec.rb
508
517
  - spec/lib/appsignal/transmitter_spec.rb