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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9969df5b54cc4d39fa5c1b3e5572715adbe9b912
4
- data.tar.gz: a6ea0af4047d5cde79e766bdf34180b3600c2f97
2
+ SHA256:
3
+ metadata.gz: c008c5a0958c17a45c16e4e3826386b39714826efbd96fb94ca6dc93556dbf43
4
+ data.tar.gz: 3fcd891b61297f5eaa47fd8780f374ba2acf8e4c5be084834160bea1d6df4389
5
5
  SHA512:
6
- metadata.gz: 036c096b3039a580a5d75e472f0a0382e3e0b3f277b77ce8c5af16e4f0de539ee20a379c956c8715d7ee700b33392a3eca474d539b9a5697a24c6ff592a5cbd2
7
- data.tar.gz: 574d5a9c4a20eb7dd8def062b90ec0978f5f0ff78e977a796e5a14043659405971d31ef4824df4c8be8554924f103f6c0699c5516f05f4bd5aa2ce552f6eb4df
6
+ metadata.gz: f23da15ff85954a2dbeab46eb69457d8eaa49c198878c0f55e5e874493006481995bb676f0ebbb204839166e15b1780296a630e901539c991ee33cd5829bbbe4
7
+ data.tar.gz: 83a5342a8c0d369b1c9d1494e7b4070373e85695d2de31251a1b1905f2d825cb758e5404364079598596e2cf05ff0a49084a8bc43db3d77c886fac90ff4e90e6
data/.gitignore CHANGED
@@ -25,7 +25,7 @@ bundle_and_spec_all_rvm
25
25
  ext/libappsignal.*
26
26
  ext/appsignal-agent
27
27
  ext/appsignal.h
28
- ext/appsignal.platform
28
+ ext/appsignal.architecture
29
29
  ext/appsignal.version
30
30
  ext/Makefile
31
31
  ext/*.bundle
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: bd1eb5f
2
+ version: 98aef2c
3
3
  triples:
4
4
  x86_64-darwin:
5
- checksum: c90ed7a396d0ab6f40c50ab0379ce66deda94e5be144dd89d146e37188b21f2b
6
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/bd1eb5f/appsignal-x86_64-darwin-all-static.tar.gz
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: c90ed7a396d0ab6f40c50ab0379ce66deda94e5be144dd89d146e37188b21f2b
9
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/bd1eb5f/appsignal-x86_64-darwin-all-static.tar.gz
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: a5ffc5558c6b051176a1943045f91399be4a325230e4f092ac0112ed63606a05
12
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/bd1eb5f/appsignal-i686-linux-all-static.tar.gz
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: a5ffc5558c6b051176a1943045f91399be4a325230e4f092ac0112ed63606a05
15
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/bd1eb5f/appsignal-i686-linux-all-static.tar.gz
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: aaee5ccd80c8dc96401182238d39cc16f5dd9566b23e0395f316f294f08cfc73
18
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/bd1eb5f/appsignal-i686-linux-musl-all-static.tar.gz
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: aaee5ccd80c8dc96401182238d39cc16f5dd9566b23e0395f316f294f08cfc73
21
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/bd1eb5f/appsignal-i686-linux-musl-all-static.tar.gz
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: e90af03dc243a4752137018ff92b8da2eb600c5074a841aa2d996484b9315c54
24
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/bd1eb5f/appsignal-x86_64-linux-all-static.tar.gz
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: 04b0b5abffbf6c7791866558e227044bb0b823bdef0a64c4c3d5aa99d3c482d4
27
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/bd1eb5f/appsignal-x86_64-linux-musl-all-static.tar.gz
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: b7c5f81aebf371c956d90a6ce88396925d3b571a2731081eaf9011d23569f574
30
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/bd1eb5f/appsignal-x86_64-freebsd-all-static.tar.gz
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: b7c5f81aebf371c956d90a6ce88396925d3b571a2731081eaf9011d23569f574
33
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/bd1eb5f/appsignal-x86_64-freebsd-all-static.tar.gz
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 write_agent_platform
34
- File.open(File.join(EXT_PATH, "appsignal.platform"), "w") do |file|
35
- file.write PLATFORM
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
- write_agent_platform
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
- # Wrap a transaction with AppSignal monitoring.
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 :agent_platform, "Agent platform",
289
- Appsignal::System.installed_agent_platform
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 = Set.new(%w(
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
- )).freeze
28
+ ).freeze
29
29
 
30
30
  def call(_worker, item, _queue)
31
31
  transaction = Appsignal::Transaction.create(
@@ -12,19 +12,19 @@ module Appsignal
12
12
  ENV.key? "DYNO".freeze
13
13
  end
14
14
 
15
- # Returns the platform for which the agent was installed.
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 platform in {.agent_platform} during
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.installed_agent_platform
25
- platform_file = File.join(GEM_EXT_PATH, "appsignal.platform")
26
- return unless File.exist?(platform_file)
27
- File.read(platform_file)
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
@@ -1,5 +1,5 @@
1
1
  require "yaml"
2
2
 
3
3
  module Appsignal
4
- VERSION = "2.4.1".freeze
4
+ VERSION = "2.4.2".freeze
5
5
  end
@@ -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 platform: #{Appsignal::System.installed_agent_platform}",
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
- "agent_platform" => Appsignal::System.installed_agent_platform,
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 ".installed_agent_platform" do
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(:platform_file) { File.join(Appsignal::System::GEM_EXT_PATH, "appsignal.platform") }
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.installed_agent_platform }
35
+ subject { described_class.installed_agent_architecture }
36
36
 
37
- context "with an ext/appsignal.platform file" do
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(platform_file, "w") do |file|
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.platform file" do
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.1
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-13 00:00:00.000000000 Z
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.5.2.1
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