appsignal 3.5.0-java → 3.5.1-java

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: e71bed209a83f516ef57254ef883b0a49403d7cfd4a4c6542e2b9405e23761b3
4
- data.tar.gz: e475459d746362fe4a1d66ea260596dd376dd78de5ce0c6192784a61afcaa17b
3
+ metadata.gz: fe4aa04040848caadc77c47f984ee7969f08a5c36a5bd598e89e5807cb48124e
4
+ data.tar.gz: b3155c076dc8f322907d1c1d6dc49a7a8b03824272f0d7fb878d5b230fa3a25b
5
5
  SHA512:
6
- metadata.gz: 658c5f1a92e9ada6137ce3119f13ea40ad21b0ee33d3896b115fa35e7a7fa04fc1240b0f55ed3f70146431d77cca10601eb6f21f7127b919171545051b7cb4ae
7
- data.tar.gz: 62c66a4814ee5663d7db3a1c2c1e844e5024c152425998685c12cd48e52fad3d6a63027457c3f599d2e506ca5b924734d1d48ca7c7d2b348ab80d2d831260ec3
6
+ metadata.gz: 7dd1e584fc1caa6a77d719186321a27e576d57d2f534db938a7e9157a520345f58054860ad0095381c4c41710e6d709bf587a1d9685398c81b82cff0255e82e9
7
+ data.tar.gz: 46b9a9f88c2e8d121ad43f403f41a56712e38f624e75ca899185c76a8244b970bee16637ed59b4b7b0441c0417138a08578db8c0eca3ac1b5e1e65d336b9a499
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 3.5.1
4
+
5
+ ### Fixed
6
+
7
+ - [2e93182b](https://github.com/appsignal/appsignal-ruby/commit/2e93182b6ae83b16fe9885558cd8f0bfce6a9a5f) patch - Fix an error in the diagnose report when reading a file's contents results in an "Invalid seek" error. This could happen when the log path is configured to `/dev/stdout`, which is not supported.
8
+ - [ae0b779b](https://github.com/appsignal/appsignal-ruby/commit/ae0b779b3ec00cc46291bc0373d748d720231e74) patch - Fix logger compatibility with Ruby 3.3
9
+
3
10
  ## 3.5.0
4
11
 
5
12
  ### Added
@@ -71,10 +71,14 @@ module Appsignal
71
71
  :group => Utils.group_for_gid(path_gid)
72
72
  }
73
73
  if info[:type] == "file"
74
- info[:content] = Utils.read_file_content(
75
- path,
76
- BYTES_TO_READ_FOR_FILES
77
- ).split("\n")
74
+ begin
75
+ info[:content] = Utils.read_file_content(
76
+ path,
77
+ BYTES_TO_READ_FOR_FILES
78
+ ).split("\n")
79
+ rescue => error
80
+ info[:read_error] = "#{error.class}: #{error.message}"
81
+ end
78
82
  end
79
83
  end
80
84
  end
@@ -631,6 +631,11 @@ module Appsignal
631
631
  else
632
632
  print_empty_line
633
633
  end
634
+
635
+ return unless path.key?(:read_error)
636
+
637
+ puts " Read error: #{path[:read_error]}"
638
+ print_empty_line
634
639
  end
635
640
 
636
641
  def print_empty_line
@@ -25,6 +25,8 @@ module Appsignal
25
25
  def initialize(group, level: INFO, format: PLAINTEXT)
26
26
  raise TypeError, "group must be a string" unless group.is_a? String
27
27
 
28
+ super(group, :level => level)
29
+
28
30
  @group = group
29
31
  @level = level
30
32
  @format = format
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "3.5.0"
4
+ VERSION = "3.5.1"
5
5
  end
@@ -71,5 +71,16 @@ describe Appsignal::CLI::Diagnose::Utils do
71
71
  is_expected.to eq(file_contents)
72
72
  end
73
73
  end
74
+
75
+ context "when reading the file raises an illegal seek error" do
76
+ let(:file_contents) { "line 1\n" }
77
+ before do
78
+ expect(File).to receive(:binread).and_raise(Errno::ESPIPE)
79
+ end
80
+
81
+ it "returns the error as the content" do
82
+ expect { subject }.to raise_error(Errno::ESPIPE)
83
+ end
84
+ end
74
85
  end
75
86
  end
@@ -1424,6 +1424,26 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :send_report => :yes_cli_i
1424
1424
  )
1425
1425
  end
1426
1426
  end
1427
+
1428
+ context "when reading the file returns a illegal seek error" do
1429
+ before do
1430
+ File.write(file_path, "Some content")
1431
+ allow(File).to receive(:binread).and_call_original
1432
+ expect(File).to receive(:binread).with(file_path, anything,
1433
+ anything).and_raise(Errno::ESPIPE)
1434
+ run
1435
+ end
1436
+
1437
+ it "outputs file does not exists" do
1438
+ expect(output).to include %(Read error: Errno::ESPIPE: Illegal seek)
1439
+ end
1440
+
1441
+ it "transmits file data in report" do
1442
+ expect(received_report["paths"][filename]).to include(
1443
+ "read_error" => "Errno::ESPIPE: Illegal seek"
1444
+ )
1445
+ end
1446
+ end
1427
1447
  end
1428
1448
 
1429
1449
  describe "mkmf.log" do
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.5.0
4
+ version: 3.5.1
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: 2023-12-11 00:00:00.000000000 Z
13
+ date: 2023-12-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -460,7 +460,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
460
460
  - !ruby/object:Gem::Version
461
461
  version: '0'
462
462
  requirements: []
463
- rubygems_version: 3.3.7
463
+ rubygems_version: 3.4.11
464
464
  signing_key:
465
465
  specification_version: 4
466
466
  summary: Logs performance and exception data from your app to appsignal.com