appsignal 3.1.4-java → 3.1.5-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11a83cde5a5fd83b9e14f1429d5a9f695d080ffc2ac729a02f83f3b891b812c3
4
- data.tar.gz: 53743646f5cf821ab45559817cf65c2bf9ed483184725fca2413b3606fad6e1e
3
+ metadata.gz: 20749c0f3826167272d727c37dd1e881502a9654f8b499d4f3fcdf40dd386178
4
+ data.tar.gz: 90ddbe20ee5243338aefdfbefbb1989bbe1df5cc57a56a4f277bcfa789086b41
5
5
  SHA512:
6
- metadata.gz: 3e56000d21fc9cb56edc28ef15ad22d8ab493d081e8e88d8e112c592b7a8bf93c3ac2d0a24b2ea97b7cc85f26fe2fdbdf751894c4fb156f3189bc962504f93d5
7
- data.tar.gz: b03a309a6c8649397e6f5d9b62a65324e4b4e39a3a1eee77b6cb60280758838212e2de7ca3eb28c8f10b3b59cb5b02ca7d88347cc9f3995be0308bf5249cae70
6
+ metadata.gz: c9f2133fe6f929ebbbee6b9c8f47f85bd3c895b518daf6a69b5ad8a2e9a29ebcd72ca1c25a7aef8512a8493f8941ab711fda9b0f16fff30cac73c40701376a47
7
+ data.tar.gz: bfe585b6c6ce5f8cc5e470c9a164e6690fc1834e40bb4bd27491f719cbdaf6ebd4b92d1f1ba2bc3001e157f5c35786f12143b29d9908e9ce73d9ca9712c7c5ef
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 3.1.5
4
+
5
+ ### Changed
6
+
7
+ - [4035c3c2](https://github.com/appsignal/appsignal-ruby/commit/4035c3c2d5c0b002119054014daddd193bd820f0) patch - Bump agent to version 813a59b
8
+
9
+ - Fix http proxy config option parsing for port 80.
10
+ - Fix the return value for appsignal_import_opentelemetry_span extension
11
+ function in `appsignal.h`.
12
+
13
+ ### Fixed
14
+
15
+ - [feb60fb8](https://github.com/appsignal/appsignal-ruby/commit/feb60fb877a2b264e587fe3d5d546e40d86c9c38) patch - Fix NoMethodError for AppSignal Puma plugin for Puma 6. Puma 5 is also still supported.
16
+
3
17
  ## 3.1.4
4
18
 
5
19
  ### Added
data/ext/agent.yml CHANGED
@@ -3,99 +3,99 @@
3
3
  # appsignal-agent repository.
4
4
  # Modifications to this file will be overwritten with the next agent release.
5
5
  ---
6
- version: '06391fb'
6
+ version: 813a59b
7
7
  mirrors:
8
8
  - https://appsignal-agent-releases.global.ssl.fastly.net
9
9
  - https://d135dj0rjqvssy.cloudfront.net
10
10
  triples:
11
11
  x86_64-darwin:
12
12
  static:
13
- checksum: 9bf41c183d94c80e980f57ea2e29d08bae97e8097b5284a2b91a5484bf866f8c
13
+ checksum: c8919a19a28950f726221829ea4d2b3312f1595a5e28ea134f8c41ed0814d7cd
14
14
  filename: appsignal-x86_64-darwin-all-static.tar.gz
15
15
  dynamic:
16
- checksum: 4d3789e65cf00e446600e883d95d097323ebb3835703c67c8d09f434f09ab496
16
+ checksum: 1c10139bc4df56048a71766b64eba76462ee38d3cc814dc230e0fdb3c7e4fba3
17
17
  filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
18
18
  universal-darwin:
19
19
  static:
20
- checksum: 9bf41c183d94c80e980f57ea2e29d08bae97e8097b5284a2b91a5484bf866f8c
20
+ checksum: c8919a19a28950f726221829ea4d2b3312f1595a5e28ea134f8c41ed0814d7cd
21
21
  filename: appsignal-x86_64-darwin-all-static.tar.gz
22
22
  dynamic:
23
- checksum: 4d3789e65cf00e446600e883d95d097323ebb3835703c67c8d09f434f09ab496
23
+ checksum: 1c10139bc4df56048a71766b64eba76462ee38d3cc814dc230e0fdb3c7e4fba3
24
24
  filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
25
25
  aarch64-darwin:
26
26
  static:
27
- checksum: 74edd7b97995f3314c10e3d84fc832c1b842c236c331ed4f2f77146ad004d179
27
+ checksum: 40a38896132f418362af9fb2e9796eb4479e13cc0691b61f0f0b81b77e66ded6
28
28
  filename: appsignal-aarch64-darwin-all-static.tar.gz
29
29
  dynamic:
30
- checksum: 7165bb164a9cd7a2a5f97897d954390412f7034c667e5826b3307ffbd848bff9
30
+ checksum: 40ec0c7db246cfc9b8eeebc882b07ba625948f376a53d8e24add7148d0f8c067
31
31
  filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
32
32
  arm64-darwin:
33
33
  static:
34
- checksum: 74edd7b97995f3314c10e3d84fc832c1b842c236c331ed4f2f77146ad004d179
34
+ checksum: 40a38896132f418362af9fb2e9796eb4479e13cc0691b61f0f0b81b77e66ded6
35
35
  filename: appsignal-aarch64-darwin-all-static.tar.gz
36
36
  dynamic:
37
- checksum: 7165bb164a9cd7a2a5f97897d954390412f7034c667e5826b3307ffbd848bff9
37
+ checksum: 40ec0c7db246cfc9b8eeebc882b07ba625948f376a53d8e24add7148d0f8c067
38
38
  filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
39
39
  arm-darwin:
40
40
  static:
41
- checksum: 74edd7b97995f3314c10e3d84fc832c1b842c236c331ed4f2f77146ad004d179
41
+ checksum: 40a38896132f418362af9fb2e9796eb4479e13cc0691b61f0f0b81b77e66ded6
42
42
  filename: appsignal-aarch64-darwin-all-static.tar.gz
43
43
  dynamic:
44
- checksum: 7165bb164a9cd7a2a5f97897d954390412f7034c667e5826b3307ffbd848bff9
44
+ checksum: 40ec0c7db246cfc9b8eeebc882b07ba625948f376a53d8e24add7148d0f8c067
45
45
  filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
46
46
  aarch64-linux:
47
47
  static:
48
- checksum: 0f2430e637eb77ce2093f021777087e87cb1e7be7c86a53771172696791c4879
48
+ checksum: c73b6e9de849a40290a0d90eaad43ea41a9a0293ba4b8bf99f69965c45c85514
49
49
  filename: appsignal-aarch64-linux-all-static.tar.gz
50
50
  dynamic:
51
- checksum: 0e4f9305aeaaa2d7847e83be04227b865723a0591574108d78040b5921a677a7
51
+ checksum: 90226eefe2e2f66833ca3e31c69ce70763ed57916bd0b5c1809bd99d61ff3429
52
52
  filename: appsignal-aarch64-linux-all-dynamic.tar.gz
53
53
  i686-linux:
54
54
  static:
55
- checksum: 449ba623aaa1853c2d211bf1e2d3a14e5ae09225a62457cbdbcc0983a5713a52
55
+ checksum: 6741b9a068dc405b3d6d07953fab7fc876c21b4add1cbb2b4c4c4dfdeca5d387
56
56
  filename: appsignal-i686-linux-all-static.tar.gz
57
57
  dynamic:
58
- checksum: dae994292d602eaf0910bd2ce53f0163e19767a4cbb8e5d0db99c0010d6df486
58
+ checksum: 1af902b37af378a06251365fb637f86298380d3627c54f2945a85c1b7f075fda
59
59
  filename: appsignal-i686-linux-all-dynamic.tar.gz
60
60
  x86-linux:
61
61
  static:
62
- checksum: 449ba623aaa1853c2d211bf1e2d3a14e5ae09225a62457cbdbcc0983a5713a52
62
+ checksum: 6741b9a068dc405b3d6d07953fab7fc876c21b4add1cbb2b4c4c4dfdeca5d387
63
63
  filename: appsignal-i686-linux-all-static.tar.gz
64
64
  dynamic:
65
- checksum: dae994292d602eaf0910bd2ce53f0163e19767a4cbb8e5d0db99c0010d6df486
65
+ checksum: 1af902b37af378a06251365fb637f86298380d3627c54f2945a85c1b7f075fda
66
66
  filename: appsignal-i686-linux-all-dynamic.tar.gz
67
67
  x86_64-linux:
68
68
  static:
69
- checksum: 394796c0ddeb4881c9f2e6ce82f840e66bcb69e027324f6c04f6671067445fbb
69
+ checksum: 8355b017093db606014023cc617d84d6375d503d7ffa54f62c7b3dc56fb64ead
70
70
  filename: appsignal-x86_64-linux-all-static.tar.gz
71
71
  dynamic:
72
- checksum: 9ca4762c464482b0a5a89898a839388597dd57a17a21527a67f3e3db0e540a03
72
+ checksum: 7c239a7ffe18cb173120bd67fb96563f4a81f0744bbbb47082f077a38ccbe5f1
73
73
  filename: appsignal-x86_64-linux-all-dynamic.tar.gz
74
74
  x86_64-linux-musl:
75
75
  static:
76
- checksum: 673271c8c5fd55053d8a719bcd307f787db4ca4633baf8cf961c442bf1805614
76
+ checksum: e9d98ed23b872dbf1e67a081473918cf88c4af775b1caadbfd93deda2635d9f8
77
77
  filename: appsignal-x86_64-linux-musl-all-static.tar.gz
78
78
  dynamic:
79
- checksum: 609d59376d6633652015e838eb649229fe2523d443a5471232b869f48eb99640
79
+ checksum: 5538172a95dfca1a4cf8e111ba61eab5e9c16314fa902259711cb9e8e0d2f85e
80
80
  filename: appsignal-x86_64-linux-musl-all-dynamic.tar.gz
81
81
  aarch64-linux-musl:
82
82
  static:
83
- checksum: e90ca19bf61596be022ba04897e8902b3401add58f351a40a3d3a7af241d0bbb
83
+ checksum: 0fb3eacfb8c8bc01c4acc8916327626720de376bcdd95104be71bb11a4ff9215
84
84
  filename: appsignal-aarch64-linux-musl-all-static.tar.gz
85
85
  dynamic:
86
- checksum: afb66c65fb82b672887bc6b6e82d82f09d9855a5497a7abb06b438dadea97aca
86
+ checksum: b87bcedaa2aa886acf3a93ce6e32762a843f3bee1ca7a8f9e0d17ca32f7a7d39
87
87
  filename: appsignal-aarch64-linux-musl-all-dynamic.tar.gz
88
88
  x86_64-freebsd:
89
89
  static:
90
- checksum: cb45da91c51123859e5ef5cea850460c28d6e77dfa08b90375178d9017162ba8
90
+ checksum: b7d3c244b7068213840f5970df2e318d98f7909eb3b2b4ab42441d064ffb19ee
91
91
  filename: appsignal-x86_64-freebsd-all-static.tar.gz
92
92
  dynamic:
93
- checksum: 6a03e02c2526e05edaa7fa932b2e764318c63ec93d517c6c00f6b7541bfe71f3
93
+ checksum: 0a739134f11d50318d14f247df1f8cc0f8aec1fbcb70a8bc48d5e1f22dc4aaba
94
94
  filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
95
95
  amd64-freebsd:
96
96
  static:
97
- checksum: cb45da91c51123859e5ef5cea850460c28d6e77dfa08b90375178d9017162ba8
97
+ checksum: b7d3c244b7068213840f5970df2e318d98f7909eb3b2b4ab42441d064ffb19ee
98
98
  filename: appsignal-x86_64-freebsd-all-static.tar.gz
99
99
  dynamic:
100
- checksum: 6a03e02c2526e05edaa7fa932b2e764318c63ec93d517c6c00f6b7541bfe71f3
100
+ checksum: 0a739134f11d50318d14f247df1f8cc0f8aec1fbcb70a8bc48d5e1f22dc4aaba
101
101
  filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'padrino', "~> 0.15"
4
- gem 'rack'
4
+ gem 'rack', "~> 2"
5
+ gem 'sinatra', "~> 2"
5
6
 
6
7
  gemspec :path => '../'
data/gemfiles/que.gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'que'
3
+ gem 'que', "~> 1.0"
4
4
 
5
5
  gemspec :path => '../'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "3.1.4".freeze
4
+ VERSION = "3.1.5".freeze
5
5
  end
@@ -11,9 +11,9 @@ require "json"
11
11
  Puma::Plugin.create do # rubocop:disable Metrics/BlockLength
12
12
  def start(launcher)
13
13
  @launcher = launcher
14
- @launcher.events.debug "AppSignal: Puma plugin start."
14
+ log_debug "AppSignal: Puma plugin start."
15
15
  in_background do
16
- @launcher.events.debug "AppSignal: Start Puma stats collection loop."
16
+ log_debug "AppSignal: Start Puma stats collection loop."
17
17
  plugin = AppsignalPumaPlugin.new
18
18
 
19
19
  loop do
@@ -24,12 +24,12 @@ Puma::Plugin.create do # rubocop:disable Metrics/BlockLength
24
24
  # metrics.
25
25
  sleep sleep_time
26
26
 
27
- @launcher.events.debug "AppSignal: Collecting Puma stats."
27
+ log_debug "AppSignal: Collecting Puma stats."
28
28
  stats = fetch_puma_stats
29
29
  if stats
30
30
  plugin.call(stats)
31
31
  else
32
- @launcher.events.log "AppSignal: No Puma stats to report."
32
+ log_debug "AppSignal: No Puma stats to report."
33
33
  end
34
34
  rescue StandardError => error
35
35
  log_error "Error while processing metrics.", error
@@ -44,8 +44,20 @@ Puma::Plugin.create do # rubocop:disable Metrics/BlockLength
44
44
  60 # seconds
45
45
  end
46
46
 
47
+ def logger
48
+ if @launcher.respond_to? :log_writer
49
+ @launcher.log_writer
50
+ else
51
+ @launcher.events
52
+ end
53
+ end
54
+
55
+ def log_debug(message)
56
+ logger.debug message
57
+ end
58
+
47
59
  def log_error(message, error)
48
- @launcher.events.log "AppSignal: #{message}\n" \
60
+ logger.error "AppSignal: #{message}\n" \
49
61
  "#{error.class}: #{error.message}\n#{error.backtrace.join("\n")}"
50
62
  end
51
63
 
@@ -683,43 +683,36 @@ describe Appsignal::Transaction do
683
683
  end
684
684
 
685
685
  describe "#sample_data" do
686
- it "should sample data" do
687
- expect(transaction.ext).to receive(:set_sample_data).with(
688
- "environment",
689
- Appsignal::Utils::Data.generate(
690
- "CONTENT_LENGTH" => "0",
691
- "REQUEST_METHOD" => "GET",
692
- "SERVER_NAME" => "example.org",
693
- "SERVER_PORT" => "80",
694
- "PATH_INFO" => "/blog"
695
- )
696
- ).once
697
- expect(transaction.ext).to receive(:set_sample_data).with(
698
- "session_data",
699
- Appsignal::Utils::Data.generate({})
700
- ).once
701
- expect(transaction.ext).to receive(:set_sample_data).with(
702
- "params",
703
- Appsignal::Utils::Data.generate(
704
- "controller" => "blog_posts",
705
- "action" => "show",
706
- "id" => "1"
707
- )
708
- ).once
709
- expect(transaction.ext).to receive(:set_sample_data).with(
710
- "metadata",
711
- Appsignal::Utils::Data.generate("key" => "value")
712
- ).once
713
- expect(transaction.ext).to receive(:set_sample_data).with(
714
- "tags",
715
- Appsignal::Utils::Data.generate({})
716
- ).once
717
- expect(transaction.ext).to receive(:set_sample_data).with(
718
- "breadcrumbs",
719
- Appsignal::Utils::Data.generate([])
720
- ).once
686
+ let(:env) { { "rack.session" => { "session" => "value" } } }
721
687
 
688
+ it "sets sample data" do
689
+ transaction.set_tags "tag" => "value"
690
+ transaction.add_breadcrumb "category", "action", "message", "key" => "value"
722
691
  transaction.sample_data
692
+
693
+ sample_data = transaction.to_h["sample_data"]
694
+ expect(sample_data["environment"]).to include(
695
+ "CONTENT_LENGTH" => "0",
696
+ "REQUEST_METHOD" => "GET",
697
+ "SERVER_NAME" => "example.org",
698
+ "SERVER_PORT" => "80",
699
+ "PATH_INFO" => "/blog"
700
+ )
701
+ expect(sample_data["session_data"]).to eq("session" => "value")
702
+ expect(sample_data["params"]).to eq(
703
+ "controller" => "blog_posts",
704
+ "action" => "show",
705
+ "id" => "1"
706
+ )
707
+ expect(sample_data["metadata"]).to eq("key" => "value")
708
+ expect(sample_data["tags"]).to eq("tag" => "value")
709
+ expect(sample_data["breadcrumbs"]).to contain_exactly(
710
+ "action" => "action",
711
+ "category" => "category",
712
+ "message" => "message",
713
+ "metadata" => { "key" => "value" },
714
+ "time" => kind_of(Integer)
715
+ )
723
716
  end
724
717
  end
725
718
 
@@ -77,7 +77,7 @@ describe Appsignal do
77
77
  end
78
78
 
79
79
  it "should not install the allocation event hook" do
80
- expect(Appsignal::Minutely).not_to receive(:install_allocation_event_hook)
80
+ expect(Appsignal::Extension).not_to receive(:install_allocation_event_hook)
81
81
  Appsignal.start
82
82
  expect_not_environment_metadata("ruby_allocation_tracking_enabled")
83
83
  end
@@ -2,14 +2,14 @@ RSpec.describe "Puma plugin" do
2
2
  include WaitForHelper
3
3
 
4
4
  class MockPumaLauncher
5
- def events
6
- return @events if defined?(@events)
5
+ def log_writer
6
+ return @log_writer if defined?(@log_writer)
7
7
 
8
- @events = MockPumaEvents.new
8
+ @log_writer = MockPumaLogWriter.new
9
9
  end
10
10
  end
11
11
 
12
- class MockPumaEvents
12
+ class MockPumaLogWriter
13
13
  attr_reader :logs
14
14
 
15
15
  def initialize
@@ -153,7 +153,7 @@ RSpec.describe "Puma plugin" do
153
153
  end
154
154
 
155
155
  def logs
156
- launcher.events.logs
156
+ launcher.log_writer.logs
157
157
  end
158
158
 
159
159
  def messages
@@ -281,7 +281,7 @@ RSpec.describe "Puma plugin" do
281
281
  it "does not fetch metrics" do
282
282
  run_plugin(appsignal_plugin) do
283
283
  expect(logs).to_not include([:error, kind_of(String)])
284
- expect(logs).to include([:log, "AppSignal: No Puma stats to report."])
284
+ expect(logs).to include([:debug, "AppSignal: No Puma stats to report."])
285
285
  expect(messages).to be_empty
286
286
  end
287
287
  end
@@ -296,4 +296,43 @@ RSpec.describe "Puma plugin" do
296
296
  end
297
297
  end
298
298
  end
299
+
300
+ context "with Puma < 6 Events class" do
301
+ class MockPumaEvents
302
+ attr_reader :logs
303
+
304
+ def initialize
305
+ @logs = []
306
+ end
307
+
308
+ def log(message)
309
+ @logs << [:log, message]
310
+ end
311
+
312
+ def debug(message)
313
+ @logs << [:debug, message]
314
+ end
315
+
316
+ def error(message)
317
+ @logs << [:error, message]
318
+ end
319
+ end
320
+
321
+ let(:launcher) do
322
+ Class.new do
323
+ def events
324
+ return @events if defined?(@events)
325
+
326
+ @events = MockPumaEvents.new
327
+ end
328
+ end.new
329
+ end
330
+ let(:stats_data) { { :max_threads => 5 } }
331
+
332
+ it "logs messages to the events class" do
333
+ run_plugin(appsignal_plugin) do
334
+ expect(launcher.events.logs).to_not be_empty
335
+ end
336
+ end
337
+ end
299
338
  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.1.4
4
+ version: 3.1.5
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: 2022-08-15 00:00:00.000000000 Z
13
+ date: 2022-10-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -441,7 +441,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
441
441
  - !ruby/object:Gem::Version
442
442
  version: '0'
443
443
  requirements: []
444
- rubygems_version: 3.3.12
444
+ rubygems_version: 3.3.7
445
445
  signing_key:
446
446
  specification_version: 4
447
447
  summary: Logs performance and exception data from your app to appsignal.com