appsignal 2.4.1 → 2.4.2
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 +5 -5
- data/.gitignore +1 -1
- data/CHANGELOG.md +12 -0
- data/ext/agent.yml +21 -21
- data/ext/extconf.rb +4 -4
- data/lib/appsignal.rb +57 -1
- data/lib/appsignal/cli/diagnose.rb +2 -2
- data/lib/appsignal/hooks/sidekiq.rb +2 -2
- data/lib/appsignal/system.rb +7 -7
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/cli/diagnose_spec.rb +2 -2
- data/spec/lib/appsignal/system_spec.rb +6 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c008c5a0958c17a45c16e4e3826386b39714826efbd96fb94ca6dc93556dbf43
|
4
|
+
data.tar.gz: 3fcd891b61297f5eaa47fd8780f374ba2acf8e4c5be084834160bea1d6df4389
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f23da15ff85954a2dbeab46eb69457d8eaa49c198878c0f55e5e874493006481995bb676f0ebbb204839166e15b1780296a630e901539c991ee33cd5829bbbe4
|
7
|
+
data.tar.gz: 83a5342a8c0d369b1c9d1494e7b4070373e85695d2de31251a1b1905f2d825cb758e5404364079598596e2cf05ff0a49084a8bc43db3d77c886fac90ff4e90e6
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
# 2.4.2
|
2
|
+
* Store agent architecture rather than platform. PR #367
|
3
|
+
* Improve documentation for `Appsignal.monitor_transaction` better.
|
4
|
+
Commit e53987ba36a79fc8883f2e59322946297ddee773
|
5
|
+
* Change log level from info to debug for value comparing failures.
|
6
|
+
Commit ecef28b28edaff46b95f53a916c93021dc763160
|
7
|
+
* Collect free memory host metric.
|
8
|
+
Commit ecef28b28edaff46b95f53a916c93021dc763160
|
9
|
+
* Fix crashes when Set wasn't required before AppSignal, such as in the CLI.
|
10
|
+
PR #373
|
11
|
+
|
1
12
|
# 2.4.1
|
2
13
|
* Add Que integration. PR #361
|
3
14
|
* Support Sidekiq delayed extension job action names better. Now action names
|
@@ -5,6 +16,7 @@
|
|
5
16
|
than `Sidekiq::Extensions::DelayedClass#perform` for all jobs through that
|
6
17
|
extension. PR #362
|
7
18
|
* Support Sidekiq Enterprise encrypted values. PR #365
|
19
|
+
* Use musl build for older libc systems. PR #366
|
8
20
|
|
9
21
|
# 2.4.0
|
10
22
|
- Add separate GNU linux build. PR #351 and
|
data/ext/agent.yml
CHANGED
@@ -1,33 +1,33 @@
|
|
1
1
|
---
|
2
|
-
version:
|
2
|
+
version: 98aef2c
|
3
3
|
triples:
|
4
4
|
x86_64-darwin:
|
5
|
-
checksum:
|
6
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
5
|
+
checksum: 275b03a13348a853f188a1ca88c60478a802a6d75e78468234eb4842f26f666c
|
6
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/98aef2c/appsignal-x86_64-darwin-all-static.tar.gz
|
7
7
|
universal-darwin:
|
8
|
-
checksum:
|
9
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
8
|
+
checksum: 275b03a13348a853f188a1ca88c60478a802a6d75e78468234eb4842f26f666c
|
9
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/98aef2c/appsignal-x86_64-darwin-all-static.tar.gz
|
10
10
|
i686-linux:
|
11
|
-
checksum:
|
12
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
11
|
+
checksum: 7ae3942e3aa7cc659e2318f06cbe45b0dc9fbba219f804665b0bc60ea68efce4
|
12
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/98aef2c/appsignal-i686-linux-all-static.tar.gz
|
13
13
|
x86-linux:
|
14
|
-
checksum:
|
15
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
14
|
+
checksum: 7ae3942e3aa7cc659e2318f06cbe45b0dc9fbba219f804665b0bc60ea68efce4
|
15
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/98aef2c/appsignal-i686-linux-all-static.tar.gz
|
16
16
|
i686-linux-musl:
|
17
|
-
checksum:
|
18
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
17
|
+
checksum: 38859a7d5513f1aa3c849559807c4fba42c8fe76eb93eaf46a96fc5adb8c105a
|
18
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/98aef2c/appsignal-i686-linux-musl-all-static.tar.gz
|
19
19
|
x86-linux-musl:
|
20
|
-
checksum:
|
21
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
20
|
+
checksum: 38859a7d5513f1aa3c849559807c4fba42c8fe76eb93eaf46a96fc5adb8c105a
|
21
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/98aef2c/appsignal-i686-linux-musl-all-static.tar.gz
|
22
22
|
x86_64-linux:
|
23
|
-
checksum:
|
24
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
23
|
+
checksum: cbf6104586e004bbd6f0e67c8629224a27612ee24a5a9434a5240471330f73a4
|
24
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/98aef2c/appsignal-x86_64-linux-all-static.tar.gz
|
25
25
|
x86_64-linux-musl:
|
26
|
-
checksum:
|
27
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
26
|
+
checksum: 968964c84e0a640b2b7f50c376190d95aa5bee105361d0989c679bcc42f12f79
|
27
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/98aef2c/appsignal-x86_64-linux-musl-all-static.tar.gz
|
28
28
|
x86_64-freebsd:
|
29
|
-
checksum:
|
30
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
29
|
+
checksum: f9f604127a8315d776312a7ce608aa1df937ed0263a2f0d3ef871d6a0f470b8b
|
30
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/98aef2c/appsignal-x86_64-freebsd-all-static.tar.gz
|
31
31
|
amd64-freebsd:
|
32
|
-
checksum:
|
33
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
32
|
+
checksum: f9f604127a8315d776312a7ce608aa1df937ed0263a2f0d3ef871d6a0f470b8b
|
33
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/98aef2c/appsignal-x86_64-freebsd-all-static.tar.gz
|
data/ext/extconf.rb
CHANGED
@@ -30,15 +30,15 @@ def installation_failed(reason)
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
34
|
-
File.open(File.join(EXT_PATH, "appsignal.
|
35
|
-
file.write
|
33
|
+
def write_agent_architecture
|
34
|
+
File.open(File.join(EXT_PATH, "appsignal.architecture"), "w") do |file|
|
35
|
+
file.write ARCH
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
def install
|
40
40
|
logger.info "Installing appsignal agent #{Appsignal::VERSION} for Ruby #{RUBY_VERSION} on #{RUBY_PLATFORM}"
|
41
|
-
|
41
|
+
write_agent_architecture
|
42
42
|
|
43
43
|
if RUBY_PLATFORM =~ /java/
|
44
44
|
installation_failed(
|
data/lib/appsignal.rb
CHANGED
@@ -171,7 +171,61 @@ module Appsignal
|
|
171
171
|
Appsignal::Extension.get_server_state(key)
|
172
172
|
end
|
173
173
|
|
174
|
-
#
|
174
|
+
# Creates an AppSignal transaction for the given block.
|
175
|
+
#
|
176
|
+
# If AppSignal is not {.active?} it will still execute the block, but not
|
177
|
+
# create a transaction for it.
|
178
|
+
#
|
179
|
+
# A event is created for this transaction with the name given in the `name`
|
180
|
+
# argument. The event name must start with either `perform_job` or
|
181
|
+
# `process_action` to differentiate between the "web" and "background"
|
182
|
+
# namespace. Custom namespaces are not supported by this helper method.
|
183
|
+
#
|
184
|
+
# This helper method also captures any exception that occurs in the given
|
185
|
+
# block.
|
186
|
+
#
|
187
|
+
# The other (request) `env` argument hash keys, not listed here, can be
|
188
|
+
# found on the {Appsignal::Transaction::ENV_METHODS} array.
|
189
|
+
# Each of these keys are available as keys in the `env` hash argument.
|
190
|
+
#
|
191
|
+
# @example
|
192
|
+
# Appsignal.monitor_transaction("perform_job.nightly_update") do
|
193
|
+
# # your code
|
194
|
+
# end
|
195
|
+
#
|
196
|
+
# @example with an environment
|
197
|
+
# Appsignal.monitor_transaction(
|
198
|
+
# "perform_job.nightly_update",
|
199
|
+
# :metadata => { "user_id" => 1 }
|
200
|
+
# ) do
|
201
|
+
# # your code
|
202
|
+
# end
|
203
|
+
#
|
204
|
+
# @param name [String] main event name.
|
205
|
+
# @param env [Hash<Symbol, Object>]
|
206
|
+
# @option env [Hash<Symbol/String, Object>] :params Params for the
|
207
|
+
# monitored request/job, see {Appsignal::Transaction#params=} for more
|
208
|
+
# information.
|
209
|
+
# @option env [String] :controller name of the controller in which the
|
210
|
+
# transaction was recorded.
|
211
|
+
# @option env [String] :class name of the Ruby class in which the
|
212
|
+
# transaction was recorded. If `:controller` is also given, `:controller`
|
213
|
+
# is used instead.
|
214
|
+
# @option env [String] :action name of the controller action in which the
|
215
|
+
# transaction was recorded.
|
216
|
+
# @option env [String] :method name of the Ruby method in which the
|
217
|
+
# transaction was recorded. If `:action` is also given, `:action`
|
218
|
+
# is used instead.
|
219
|
+
# @option env [Integer] :queue_start the moment the request/job was queued.
|
220
|
+
# Used to track how long requests/jobs were queued before being executed.
|
221
|
+
# @option env [Hash<Symbol/String, String/Fixnum>] :metadata Additional
|
222
|
+
# metadata for the transaction, see {Appsignal::Transaction#set_metadata}
|
223
|
+
# for more information.
|
224
|
+
# @yield the block to monitor.
|
225
|
+
# @raise [Exception] any exception that occurs within the given block is re-raised by
|
226
|
+
# this method.
|
227
|
+
# @return [Object] the value of the given block is returned.
|
228
|
+
# @since 0.10.0
|
175
229
|
def monitor_transaction(name, env = {})
|
176
230
|
unless active?
|
177
231
|
return yield
|
@@ -211,6 +265,8 @@ module Appsignal
|
|
211
265
|
#
|
212
266
|
# Useful for cases such as Rake tasks and Resque-like systems where a
|
213
267
|
# process is forked and immediately exits after the transaction finishes.
|
268
|
+
#
|
269
|
+
# @see monitor_transaction
|
214
270
|
def monitor_single_transaction(name, env = {}, &block)
|
215
271
|
monitor_transaction(name, env, &block)
|
216
272
|
ensure
|
@@ -285,8 +285,8 @@ module Appsignal
|
|
285
285
|
save :language, "ruby"
|
286
286
|
puts_and_save :package_version, "Gem version", Appsignal::VERSION
|
287
287
|
puts_and_save :agent_version, "Agent version", Appsignal::Extension.agent_version
|
288
|
-
puts_and_save :
|
289
|
-
Appsignal::System.
|
288
|
+
puts_and_save :agent_architecture, "Agent architecture",
|
289
|
+
Appsignal::System.installed_agent_architecture
|
290
290
|
puts_and_save :package_install_path, "Gem install path", gem_path
|
291
291
|
puts_and_save :extension_loaded, "Extension loaded", Appsignal.extension_loaded
|
292
292
|
end
|
@@ -22,10 +22,10 @@ module Appsignal
|
|
22
22
|
class SidekiqPlugin
|
23
23
|
include Appsignal::Hooks::Helpers
|
24
24
|
|
25
|
-
JOB_KEYS =
|
25
|
+
JOB_KEYS = %w(
|
26
26
|
args backtrace class created_at enqueued_at error_backtrace error_class
|
27
27
|
error_message failed_at jid retried_at retry wrapped
|
28
|
-
)
|
28
|
+
).freeze
|
29
29
|
|
30
30
|
def call(_worker, item, _queue)
|
31
31
|
transaction = Appsignal::Transaction.create(
|
data/lib/appsignal/system.rb
CHANGED
@@ -12,19 +12,19 @@ module Appsignal
|
|
12
12
|
ENV.key? "DYNO".freeze
|
13
13
|
end
|
14
14
|
|
15
|
-
# Returns the
|
15
|
+
# Returns the architecture for which the agent was installed.
|
16
16
|
#
|
17
17
|
# This value is saved when the gem is installed in `ext/extconf.rb`.
|
18
18
|
# We use this value to build the diagnose report with the installed
|
19
|
-
# platform, rather than the detected
|
20
|
-
# the diagnose run.
|
19
|
+
# CPU type and platform, rather than the detected architecture in
|
20
|
+
# {.agent_platform} during the diagnose run.
|
21
21
|
#
|
22
22
|
# @api private
|
23
23
|
# @return [String]
|
24
|
-
def self.
|
25
|
-
|
26
|
-
return unless File.exist?(
|
27
|
-
File.read(
|
24
|
+
def self.installed_agent_architecture
|
25
|
+
architecture_file = File.join(GEM_EXT_PATH, "appsignal.architecture")
|
26
|
+
return unless File.exist?(architecture_file)
|
27
|
+
File.read(architecture_file)
|
28
28
|
end
|
29
29
|
|
30
30
|
# Detect agent and extension platform build
|
data/lib/appsignal/version.rb
CHANGED
@@ -155,7 +155,7 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :report => true do
|
|
155
155
|
expect(output).to include \
|
156
156
|
"Gem version: #{Appsignal::VERSION}",
|
157
157
|
"Agent version: #{Appsignal::Extension.agent_version}",
|
158
|
-
"Agent
|
158
|
+
"Agent architecture: #{Appsignal::System.installed_agent_architecture}",
|
159
159
|
"Gem install path: #{gem_path}"
|
160
160
|
end
|
161
161
|
|
@@ -165,7 +165,7 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :report => true do
|
|
165
165
|
"language" => "ruby",
|
166
166
|
"package_version" => Appsignal::VERSION,
|
167
167
|
"agent_version" => Appsignal::Extension.agent_version,
|
168
|
-
"
|
168
|
+
"agent_architecture" => Appsignal::System.installed_agent_architecture,
|
169
169
|
"package_install_path" => gem_path,
|
170
170
|
"extension_loaded" => true
|
171
171
|
}
|
@@ -19,10 +19,10 @@ describe Appsignal::System do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
describe ".
|
22
|
+
describe ".installed_agent_architecture" do
|
23
23
|
let(:const_name) { "GEM_EXT_PATH".freeze }
|
24
24
|
let(:tmp_ext_dir) { File.join(tmp_dir, "ext") }
|
25
|
-
let(:
|
25
|
+
let(:architecture_file) { File.join(Appsignal::System::GEM_EXT_PATH, "appsignal.architecture") }
|
26
26
|
around do |example|
|
27
27
|
original_gem_ext_path = Appsignal::System.const_get(const_name)
|
28
28
|
Appsignal::System.send(:remove_const, const_name)
|
@@ -32,12 +32,12 @@ describe Appsignal::System do
|
|
32
32
|
Appsignal::System.const_set(const_name, original_gem_ext_path)
|
33
33
|
end
|
34
34
|
after { FileUtils.rm_rf(tmp_ext_dir) }
|
35
|
-
subject { described_class.
|
35
|
+
subject { described_class.installed_agent_architecture }
|
36
36
|
|
37
|
-
context "with an ext/appsignal.
|
37
|
+
context "with an ext/appsignal.architecture file" do
|
38
38
|
before do
|
39
39
|
FileUtils.mkdir_p(Appsignal::System::GEM_EXT_PATH)
|
40
|
-
File.open(
|
40
|
+
File.open(architecture_file, "w") do |file|
|
41
41
|
file.write "foo"
|
42
42
|
end
|
43
43
|
end
|
@@ -47,7 +47,7 @@ describe Appsignal::System do
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
context "without an ext/appsignal.
|
50
|
+
context "without an ext/appsignal.architecture file" do
|
51
51
|
it "returns nil" do
|
52
52
|
expect(subject).to be_nil
|
53
53
|
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: 2.4.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-11-
|
12
|
+
date: 2017-11-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -358,7 +358,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
358
358
|
version: '0'
|
359
359
|
requirements: []
|
360
360
|
rubyforge_project:
|
361
|
-
rubygems_version: 2.
|
361
|
+
rubygems_version: 2.7.2
|
362
362
|
signing_key:
|
363
363
|
specification_version: 4
|
364
364
|
summary: Logs performance and exception data from your app to appsignal.com
|