appsignal 3.4.13 → 3.4.15

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: da9d753b6bb738432dde776aac3404c660df7362d6fff5612ceb4535ab8dd00f
4
- data.tar.gz: 712225f476fd4e66c83bc2b59f605eca653228fa75551f34c8210206bb87aea9
3
+ metadata.gz: 07e2140415b95bfc8d93ef179ef1005af8276c840ee0e7e22882bb02980e7aac
4
+ data.tar.gz: 2bd4fdbb6e01971ee29333b0f00b9e0019c04c65a6edb040964a0cd2b40cd95b
5
5
  SHA512:
6
- metadata.gz: 7fcd4d3b278f44dc3033393708923819dce551f5bacb1e890c674cb332351bf1d756c882d05315b47582750d7370de5e2c729088b565cf0b3807ce977bd03631
7
- data.tar.gz: 8980095a2da7d7f044e68fa02600a73ad48c584e1a450e2dca4be2e7fc4cc2579a7bb5a627d9ee691e0bac1f7065f9d100f705437df99c0875bcb34182da8eaf
6
+ metadata.gz: 48524017c1fce4a4a402da303474b8ca68e2768da6b584e52073d1e1bca135d9184f9b2aeabc1663e3f9687ebbb1982bd7bc4f0a26e6642c76bfcef950e481ed
7
+ data.tar.gz: 3b9a1f1536b8797515473370324c53892087f6634834455863f5df95a1b4c43ecb5c43fbb9ffa7fb6c29660d4f4d5599141616b3a67befd4efe989258c2e8379
data/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 3.4.15
4
+
5
+ ### Changed
6
+
7
+ - [3fe0fa7a](https://github.com/appsignal/appsignal-ruby/commit/3fe0fa7a9cfbee0ca9f3e054155b236bd87c22fb) patch - Bump agent to eec7f7b
8
+
9
+ Updated the probes dependency to 0.5.2. CPU usage is now normalized to the number of CPUs available to the container. This means that a container with 2 CPUs will have its CPU usage reported as 50% when using 1 CPU instead of 100%. This is a breaking change for anyone using the cpu probe.
10
+
11
+ If you have CPU triggers set up based on the old behaviour, you might need to update those to these new normalized values to get the same behaviour. Note that this is needed only if the AppSignal integration package you're using includes this change.
12
+
13
+ ## 3.4.14
14
+
15
+ ### Changed
16
+
17
+ - [bd15ec20](https://github.com/appsignal/appsignal-ruby/commit/bd15ec204474efdc504973609b70074148032618) patch - Bump agent to e8207c1.
18
+
19
+ - Add `memory_in_percentages` and `swap_in_percentages` host metrics that represents metrics in percentages.
20
+ - Ignore `/snap/` disk mountpoints.
21
+ - Fix issue with the open span count in logs being logged as a negative number.
22
+ - Fix agent's TCP server getting stuck when two requests are made within the same fraction of a second.
23
+ - [09b45c80](https://github.com/appsignal/appsignal-ruby/commit/09b45c808c2d4b215bd38211860e8e89225886e6) patch - Bump agent to b604345.
24
+
25
+ - Add an exponential backoff to the retry sleep time to bind to the StatsD, NGINX and OpenTelemetry exporter ports. This gives the agent a longer time to connect to the ports if they become available within a 4 minute window.
26
+ - Changes to the agent logger:
27
+ - Logs from the agent and extension now use a more consistent format in logs for spans and transactions.
28
+ - Logs that are for more internal use are moved to the trace log level and logs that are useful for debugging most support issues are moved to the debug log level. It should not be necessary to use log level 'trace' as often anymore. The 'debug' log level should be enough.
29
+ - Add `running_in_container` to agent diagnose report, to be used primarily by the Python package as a way to detect if an app's host is a container or not.
30
+ - [1945d613](https://github.com/appsignal/appsignal-ruby/commit/1945d61326266e225f13c6b828c51faf13c3745b) patch - Bump agent to 1dd2a18.
31
+
32
+ - When adding an SQL body attribute via the extension, instead of truncating the body first and sanitising it later, sanitise it first and truncate it later. This prevents an issue where queries containing very big values result in truncated sanitisations.
33
+
34
+ ### Fixed
35
+
36
+ - [c8698dca](https://github.com/appsignal/appsignal-ruby/commit/c8698dca465d84fdac33d88debc6fbb004458bf1) patch - Fix a deprecation warning for Sidekiq 7.1.6+ when an error is reported to AppSignal. (Thanks @bdewater-thatch!)
37
+ - [1c606c6a](https://github.com/appsignal/appsignal-ruby/commit/1c606c6a095ac9316cdb6fc26b98c72b9c23b583) patch - Fix an internal error when some Redis info keys we're expecting are missing. This will fix the Sidekiq dashboard showing much less data than we can report when Redis is configured to not report all the data points we expect. You'll still miss out of metrics like used memory, but miss less data than before.
38
+
3
39
  ## 3.4.13
4
40
 
5
41
  ### Added
data/ext/agent.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  # Modifications to this file will be overwritten with the next agent release.
7
7
 
8
8
  APPSIGNAL_AGENT_CONFIG = {
9
- "version" => "6133900",
9
+ "version" => "eec7f7b",
10
10
  "mirrors" => [
11
11
  "https://appsignal-agent-releases.global.ssl.fastly.net",
12
12
  "https://d135dj0rjqvssy.cloudfront.net"
@@ -14,131 +14,131 @@ APPSIGNAL_AGENT_CONFIG = {
14
14
  "triples" => {
15
15
  "x86_64-darwin" => {
16
16
  "static" => {
17
- "checksum" => "19cfea536fc6c4a8fe335a26d14ce955b422c23217902642f95d7df670152238",
17
+ "checksum" => "69da25f14fbfddffb83214355cda86955024f9f59ef6ac06faf223a475bdbbf7",
18
18
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
19
19
  },
20
20
  "dynamic" => {
21
- "checksum" => "f5c4b66b45faac47473befdbe286a037d8fca9386339b00f59be9e9505d15b13",
21
+ "checksum" => "072ffea3f86fa40d2ed75c0175628dada5c9f3e87d734aea5f5efc2c6aec6266",
22
22
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
23
23
  }
24
24
  },
25
25
  "universal-darwin" => {
26
26
  "static" => {
27
- "checksum" => "19cfea536fc6c4a8fe335a26d14ce955b422c23217902642f95d7df670152238",
27
+ "checksum" => "69da25f14fbfddffb83214355cda86955024f9f59ef6ac06faf223a475bdbbf7",
28
28
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
29
29
  },
30
30
  "dynamic" => {
31
- "checksum" => "f5c4b66b45faac47473befdbe286a037d8fca9386339b00f59be9e9505d15b13",
31
+ "checksum" => "072ffea3f86fa40d2ed75c0175628dada5c9f3e87d734aea5f5efc2c6aec6266",
32
32
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
33
33
  }
34
34
  },
35
35
  "aarch64-darwin" => {
36
36
  "static" => {
37
- "checksum" => "4fa0dbccba79f70edc6844a86bfd047ccdd612d752b65aff46fe0e21d8a610ea",
37
+ "checksum" => "281e2daefeb513ea3c8af7cc58397753559606643ad2091bd5c5ba6b9a2a1aca",
38
38
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
39
39
  },
40
40
  "dynamic" => {
41
- "checksum" => "f86e88647be6c64f0f1f56b1ac15e0e4453c7e4a6c997fd5e510cf459c572a57",
41
+ "checksum" => "baf3d77216e1e9b467b4026baab15beb6538d5145c1dd718a6874ed3026c6a94",
42
42
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
43
43
  }
44
44
  },
45
45
  "arm64-darwin" => {
46
46
  "static" => {
47
- "checksum" => "4fa0dbccba79f70edc6844a86bfd047ccdd612d752b65aff46fe0e21d8a610ea",
47
+ "checksum" => "281e2daefeb513ea3c8af7cc58397753559606643ad2091bd5c5ba6b9a2a1aca",
48
48
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
49
49
  },
50
50
  "dynamic" => {
51
- "checksum" => "f86e88647be6c64f0f1f56b1ac15e0e4453c7e4a6c997fd5e510cf459c572a57",
51
+ "checksum" => "baf3d77216e1e9b467b4026baab15beb6538d5145c1dd718a6874ed3026c6a94",
52
52
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
53
53
  }
54
54
  },
55
55
  "arm-darwin" => {
56
56
  "static" => {
57
- "checksum" => "4fa0dbccba79f70edc6844a86bfd047ccdd612d752b65aff46fe0e21d8a610ea",
57
+ "checksum" => "281e2daefeb513ea3c8af7cc58397753559606643ad2091bd5c5ba6b9a2a1aca",
58
58
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
59
59
  },
60
60
  "dynamic" => {
61
- "checksum" => "f86e88647be6c64f0f1f56b1ac15e0e4453c7e4a6c997fd5e510cf459c572a57",
61
+ "checksum" => "baf3d77216e1e9b467b4026baab15beb6538d5145c1dd718a6874ed3026c6a94",
62
62
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
63
63
  }
64
64
  },
65
65
  "aarch64-linux" => {
66
66
  "static" => {
67
- "checksum" => "cdd75637940fcfd369b569e873048c7d37a3844d9d31d783e4459b375b78ee0e",
67
+ "checksum" => "985ef69698d9cf44c4965f971043be9f65fa4ac825f30e7feca8a9fff210d65a",
68
68
  "filename" => "appsignal-aarch64-linux-all-static.tar.gz"
69
69
  },
70
70
  "dynamic" => {
71
- "checksum" => "99b52c29d497d63f02a4ff7162152641b51e7ecd292d07f0330e7d4f3abc8075",
71
+ "checksum" => "04184dc9658662586e076fd5a72483ba0ebebe1803feee7a3bcc01ab5bd2bd83",
72
72
  "filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
73
73
  }
74
74
  },
75
75
  "i686-linux" => {
76
76
  "static" => {
77
- "checksum" => "a9374d1fd4baae84f1c4a74957cbb8c919b29ae2ab05a571ff75b9ca483717ab",
77
+ "checksum" => "4d5c3b4cdbcdd11cf78a3c62a57fef05ad1c62dd136289afcd184897af3ab1c5",
78
78
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
79
79
  },
80
80
  "dynamic" => {
81
- "checksum" => "d643c72add6fe1054faff034101cf5a2676a169c7bff479f3d79e71875598b8a",
81
+ "checksum" => "9ced8a9fc8e270cfacf4f9f6bf9f0d0ad0a636403878845c572fdc29c62de972",
82
82
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
83
83
  }
84
84
  },
85
85
  "x86-linux" => {
86
86
  "static" => {
87
- "checksum" => "a9374d1fd4baae84f1c4a74957cbb8c919b29ae2ab05a571ff75b9ca483717ab",
87
+ "checksum" => "4d5c3b4cdbcdd11cf78a3c62a57fef05ad1c62dd136289afcd184897af3ab1c5",
88
88
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
89
89
  },
90
90
  "dynamic" => {
91
- "checksum" => "d643c72add6fe1054faff034101cf5a2676a169c7bff479f3d79e71875598b8a",
91
+ "checksum" => "9ced8a9fc8e270cfacf4f9f6bf9f0d0ad0a636403878845c572fdc29c62de972",
92
92
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
93
93
  }
94
94
  },
95
95
  "x86_64-linux" => {
96
96
  "static" => {
97
- "checksum" => "bd625ed84100d0632b298ac602b152463628c41afe56a8621745cdae626f8413",
97
+ "checksum" => "5db0bb195c4c5ff72352094d038ebfc75e0153b6fa54f285f6b0908bad20fea0",
98
98
  "filename" => "appsignal-x86_64-linux-all-static.tar.gz"
99
99
  },
100
100
  "dynamic" => {
101
- "checksum" => "0daa644acfee46848282ad733b175e4994e7faf64c8bc046d2efff2b8fc1afdd",
101
+ "checksum" => "db0fa7384f08e3a1f4fcf75298264b4f2dea2afda49d37dc305f0697781796bc",
102
102
  "filename" => "appsignal-x86_64-linux-all-dynamic.tar.gz"
103
103
  }
104
104
  },
105
105
  "x86_64-linux-musl" => {
106
106
  "static" => {
107
- "checksum" => "7988c4a2a6ba5d59be2186ce9bf51ab50b6537a60888b08c8e9066172516e59d",
107
+ "checksum" => "625fa055ae4944a4afe648a7a2e71e87a82384e96f93e56254b455b2ab049612",
108
108
  "filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
109
109
  },
110
110
  "dynamic" => {
111
- "checksum" => "93e47c9400ddae42a8cd2b80c09c9134ee96a76bf622c3ad5d53b776fec1a3f0",
111
+ "checksum" => "45fca37069ed23f10db14f10df3be342cd2fd0016b274c827f6c5c53370e373d",
112
112
  "filename" => "appsignal-x86_64-linux-musl-all-dynamic.tar.gz"
113
113
  }
114
114
  },
115
115
  "aarch64-linux-musl" => {
116
116
  "static" => {
117
- "checksum" => "8e5fe2a8bc4cb7de4ba7d61fec48f15aa0cd580050f67752f07625853636eb16",
117
+ "checksum" => "82ef1d0a98f6dfa81568dff539eb932973af5baaa6c737c4017faebf1aedf45e",
118
118
  "filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
119
119
  },
120
120
  "dynamic" => {
121
- "checksum" => "01f993b3320f0377ef9f652bb215ce268da208f46a6f59ad0c0e71f57257b4ef",
121
+ "checksum" => "9fcbf458dc1ff79ebafa83791453abd86cfd425ac58ff0ef8d0f7bc6e3718765",
122
122
  "filename" => "appsignal-aarch64-linux-musl-all-dynamic.tar.gz"
123
123
  }
124
124
  },
125
125
  "x86_64-freebsd" => {
126
126
  "static" => {
127
- "checksum" => "09e21821eb98ad6afdb5d3708b67ea25799aedbee2ccb0d566b99d9c5703cb1e",
127
+ "checksum" => "8fc180e5b3f77df90e4d1498d729e1fa2e8fa713689e92173d98ab69f4332557",
128
128
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
129
129
  },
130
130
  "dynamic" => {
131
- "checksum" => "e77592de9dd7ff41efb6c1d2d88e06fa7b663e9ff009392bb971b1333e0f28d7",
131
+ "checksum" => "8c09f31cc88f0322cdad0b8dc3d8d194a70df69d327185de447f57d74eeb80f9",
132
132
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
133
133
  }
134
134
  },
135
135
  "amd64-freebsd" => {
136
136
  "static" => {
137
- "checksum" => "09e21821eb98ad6afdb5d3708b67ea25799aedbee2ccb0d566b99d9c5703cb1e",
137
+ "checksum" => "8fc180e5b3f77df90e4d1498d729e1fa2e8fa713689e92173d98ab69f4332557",
138
138
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
139
139
  },
140
140
  "dynamic" => {
141
- "checksum" => "e77592de9dd7ff41efb6c1d2d88e06fa7b663e9ff009392bb971b1333e0f28d7",
141
+ "checksum" => "8c09f31cc88f0322cdad0b8dc3d8d194a70df69d327185de447f57d74eeb80f9",
142
142
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
143
143
  }
144
144
  }
@@ -284,6 +284,12 @@ module Appsignal
284
284
  config_hash[key]
285
285
  end
286
286
 
287
+ # Update the internal config hash.
288
+ #
289
+ # This method does not update the config in the extension and agent. It
290
+ # should not be used to update the config after AppSignal has started.
291
+ #
292
+ # @api private
287
293
  def []=(key, value)
288
294
  config_hash[key] = value
289
295
  end
@@ -7,8 +7,8 @@ module Appsignal
7
7
 
8
8
  # Creates an AppSignal transaction for the given block.
9
9
  #
10
- # If AppSignal is not {.active?} it will still execute the block, but not
11
- # create a transaction for it.
10
+ # If AppSignal is not {Appsignal.active?} it will still execute the
11
+ # block, but not create a transaction for it.
12
12
  #
13
13
  # A event is created for this transaction with the name given in the
14
14
  # `name` argument. The event name must start with either `perform_job` or
@@ -112,7 +112,7 @@ module Appsignal
112
112
  # transaction. Does not add the error to the current transaction.
113
113
  #
114
114
  # Make sure that AppSignal is integrated in your application beforehand.
115
- # AppSignal won't record errors unless {Config#active?} is `true`.
115
+ # AppSignal won't record errors unless {Appsignal.active?} is `true`.
116
116
  #
117
117
  # @example
118
118
  # # my_app.rb
@@ -9,7 +9,7 @@ module Appsignal
9
9
  #
10
10
  # @api private
11
11
  class SidekiqErrorHandler
12
- def call(exception, sidekiq_context)
12
+ def call(exception, sidekiq_context, _sidekiq_config = nil)
13
13
  transaction =
14
14
  if Appsignal::Transaction.current?
15
15
  Appsignal::Transaction.current
@@ -78,9 +78,9 @@ module Appsignal
78
78
  redis_info = adapter.redis_info
79
79
  return unless redis_info
80
80
 
81
- gauge "connection_count", redis_info.fetch("connected_clients")
82
- gauge "memory_usage", redis_info.fetch("used_memory")
83
- gauge "memory_usage_rss", redis_info.fetch("used_memory_rss")
81
+ gauge "connection_count", redis_info["connected_clients"]
82
+ gauge "memory_usage", redis_info["used_memory"]
83
+ gauge "memory_usage_rss", redis_info["used_memory_rss"]
84
84
  end
85
85
 
86
86
  def track_stats
@@ -112,6 +112,8 @@ module Appsignal
112
112
 
113
113
  # Track a gauge metric with the `sidekiq_` prefix
114
114
  def gauge(key, value, tags = {})
115
+ return if value.nil?
116
+
115
117
  tags[:hostname] = hostname if hostname
116
118
  Appsignal.set_gauge "sidekiq_#{key}", value, tags
117
119
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "3.4.13"
4
+ VERSION = "3.4.15"
5
5
  end
@@ -436,7 +436,8 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :send_report => :yes_cli_i
436
436
  "boot" => { "started" => { "result" => true } },
437
437
  "host" => {
438
438
  "uid" => { "result" => Process.uid },
439
- "gid" => { "result" => Process.gid }
439
+ "gid" => { "result" => Process.gid },
440
+ "running_in_container" => { "result" => Appsignal::Extension.running_in_container? }
440
441
  },
441
442
  "config" => { "valid" => { "result" => true } },
442
443
  "logger" => { "started" => { "result" => true } },
@@ -73,6 +73,20 @@ describe Appsignal::Probes::SidekiqProbe do
73
73
  module Sidekiq7Mock
74
74
  VERSION = "7.0.0".freeze
75
75
 
76
+ def self.redis_info_data=(info)
77
+ @redis_info_data = info
78
+ end
79
+
80
+ def self.redis_info_data
81
+ return @redis_info_data if defined?(@redis_info_data)
82
+
83
+ {
84
+ "connected_clients" => 2,
85
+ "used_memory" => 1024,
86
+ "used_memory_rss" => 512
87
+ }
88
+ end
89
+
76
90
  def self.redis
77
91
  yield Client.new
78
92
  end
@@ -83,11 +97,7 @@ describe Appsignal::Probes::SidekiqProbe do
83
97
  end
84
98
 
85
99
  def info
86
- {
87
- "connected_clients" => 2,
88
- "used_memory" => 1024,
89
- "used_memory_rss" => 512
90
- }
100
+ Sidekiq7Mock.redis_info_data
91
101
  end
92
102
  end
93
103
 
@@ -227,6 +237,19 @@ describe Appsignal::Probes::SidekiqProbe do
227
237
  probe.call
228
238
  probe.call
229
239
  end
240
+
241
+ context "when redis info doesn't contain requested keys" do
242
+ before { Sidekiq7Mock.redis_info_data = {} }
243
+
244
+ it "doesn't create metrics for nil values" do
245
+ expect_gauge("connection_count").never
246
+ expect_gauge("memory_usage").never
247
+ expect_gauge("memory_usage_rss").never
248
+ # Call probe twice so we can calculate the delta for some gauge values
249
+ probe.call
250
+ probe.call
251
+ end
252
+ end
230
253
  end
231
254
 
232
255
  context "with Sidekiq 6" do
@@ -301,7 +324,7 @@ describe Appsignal::Probes::SidekiqProbe do
301
324
  end
302
325
  end
303
326
 
304
- def expect_gauge(key, value, tags = {})
327
+ def expect_gauge(key, value = anything, tags = {})
305
328
  expect(Appsignal).to receive(:set_gauge)
306
329
  .with("sidekiq_#{key}", value, expected_default_tags.merge(tags))
307
330
  .and_call_original
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.4.13
4
+ version: 3.4.15
5
5
  platform: ruby
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-10-10 00:00:00.000000000 Z
13
+ date: 2023-11-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -446,7 +446,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
446
446
  - !ruby/object:Gem::Version
447
447
  version: '0'
448
448
  requirements: []
449
- rubygems_version: 3.4.15
449
+ rubygems_version: 3.4.11
450
450
  signing_key:
451
451
  specification_version: 4
452
452
  summary: Logs performance and exception data from your app to appsignal.com