appsignal 2.1.0 → 2.1.1.beta.1

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
  SHA1:
3
- metadata.gz: 0c21c84f210750178cad52383cb8945c759e3ef7
4
- data.tar.gz: bd2d8b11d9f0dca396b846f5cfcad4cd834b7adc
3
+ metadata.gz: 30574286398091fc000951898cc7854c3703dbe0
4
+ data.tar.gz: 1c769b7da29ede2b1c83d794490f23d546313cf7
5
5
  SHA512:
6
- metadata.gz: 0a7d8cfc7c177f158b0da831dd35ce72efccd0f6ebfff7fd36a9ac6053a906db0959c49b6eb6a13ac72da855d4e0344095100c5597daa4e286e2004c047b41b6
7
- data.tar.gz: af5c20d7e786bdd702008f942c951da08bfe8d196f2d12b44eac04c51c0a3ebbc85850bafe6c13a6fc8ef78b83ec086adda7d4dfb0c71e531a9d20a7c74cd07f
6
+ metadata.gz: 8b09ac555516fd6ce7f02b539a48762cc2f78e142f3691506580ed133dfb1e1f6bc16f1d03d87586755751ecf82c9880d443ca0a4f9091299291dd05d68506c3
7
+ data.tar.gz: a1d743e8a75d8480457aa8a8bd42f3252e7e2a34946f216e9ce584e66c2dcb2eed3ab586e21f2c2f099b551865a5f098d26e37f00e795b0789601dddc97371cc
data/.gitignore CHANGED
@@ -25,6 +25,7 @@ bundle_and_spec_all_rvm
25
25
  ext/libappsignal.*
26
26
  ext/appsignal-agent
27
27
  ext/appsignal.h
28
+ ext/appsignal.version
28
29
  ext/Makefile
29
30
  ext/*.bundle
30
31
  ext/*.o
@@ -1,3 +1,9 @@
1
+ # 2.1.1 (beta)
2
+ * Fix DNS issue related to musl build.
3
+ Commit 732c877de8faceabe8a977bf80a82a6a89065c4d
4
+ * Update benchmark and add load test. PR #248
5
+ * Fix configuring instrument redis and sequel from env. PR #257
6
+
1
7
  # 2.1.0
2
8
  * Add support for musl based libc (Alpine Linux). PR #229
3
9
  * Implement `Appsignal.is_ignored_error?` and `Appsignal.is_ignored_action?`
@@ -1,4 +1,3 @@
1
- require 'active_support'
2
1
  require 'appsignal'
3
2
  require 'benchmark'
4
3
 
@@ -7,8 +6,7 @@ GC.disable
7
6
  task :default => :'benchmark:all'
8
7
 
9
8
  namespace :benchmark do
10
- task :all => [:run_inactive, :run_active] do
11
- end
9
+ task :all => [:run_inactive, :run_active]
12
10
 
13
11
  task :run_inactive do
14
12
  puts 'Running with appsignal off'
@@ -24,7 +22,8 @@ namespace :benchmark do
24
22
  end
25
23
 
26
24
  def run_benchmark
27
- no_transactions = 10_000
25
+ no_transactions = (ENV['NO_TRANSACTIONS'] || 100_000).to_i
26
+ no_threads = (ENV['NO_THREADS'] || 1).to_i
28
27
 
29
28
  total_objects = ObjectSpace.count_objects[:TOTAL]
30
29
  puts "Initializing, currently #{total_objects} objects"
@@ -33,35 +32,44 @@ def run_benchmark
33
32
  Appsignal.start
34
33
  puts "Appsignal #{Appsignal.active? ? 'active' : 'not active'}"
35
34
 
36
- puts "Running #{no_transactions} normal transactions"
35
+ threads = []
36
+ puts "Running #{no_transactions} normal transactions in #{no_threads} threads"
37
37
  puts(Benchmark.measure do
38
- no_transactions.times do |i|
39
- request = Appsignal::Transaction::GenericRequest.new(
40
- :controller => 'HomeController',
41
- :action => 'show',
42
- :params => {:id => 1}
43
- )
44
- Appsignal::Transaction.create("transaction_#{i}", Appsignal::Transaction::HTTP_REQUEST, request)
38
+ no_threads.times do
39
+ thread = Thread.new do
40
+ no_transactions.times do |i|
41
+ request = Appsignal::Transaction::GenericRequest.new(
42
+ :controller => 'HomeController',
43
+ :action => 'show',
44
+ :params => {:id => 1}
45
+ )
46
+ Appsignal::Transaction.create("transaction_#{i}", Appsignal::Transaction::HTTP_REQUEST, request)
45
47
 
46
- Appsignal.instrument('process_action.action_controller') do
47
- ActiveSupport::Notifications.instrument('sql.active_record', :sql => 'SELECT `users`.* FROM `users` WHERE `users`.`id` = ?')
48
- 10.times do
49
- ActiveSupport::Notifications.instrument('sql.active_record', :sql => 'SELECT `todos`.* FROM `todos` WHERE `todos`.`id` = ?')
50
- end
48
+ Appsignal.instrument('process_action.action_controller') do
49
+ Appsignal.instrument_sql('sql.active_record', nil, 'SELECT `users`.* FROM `users` WHERE `users`.`id` = ?')
50
+ 10.times do
51
+ Appsignal.instrument_sql('sql.active_record', nil, 'SELECT `todos`.* FROM `todos` WHERE `todos`.`id` = ?')
52
+ end
51
53
 
52
- ActiveSupport::Notifications.instrument('render_template.action_view', :identifier => 'app/views/home/show.html.erb') do
53
- 5.times do
54
- ActiveSupport::Notifications.instrument('render_partial.action_view', :identifier => 'app/views/home/_piece.html.erb') do
55
- 3.times do
56
- ActiveSupport::Notifications.instrument('cache.read')
54
+ Appsignal.instrument('render_template.action_view', 'app/views/home/show.html.erb') do
55
+ 5.times do
56
+ Appsignal.instrument('render_partial.action_view', 'app/views/home/_piece.html.erb') do
57
+ 3.times do
58
+ Appsignal.instrument('cache.read')
59
+ end
60
+ end
57
61
  end
58
62
  end
59
63
  end
64
+
65
+ Appsignal::Transaction.complete_current!
60
66
  end
61
67
  end
62
-
63
- Appsignal::Transaction.complete_current!
68
+ thread.abort_on_exception = true
69
+ threads << thread
64
70
  end
71
+
72
+ threads.each(&:join)
65
73
  puts 'Finished'
66
74
  end)
67
75
 
@@ -1,18 +1,18 @@
1
1
  ---
2
- version: 5f0c552
2
+ version: '5464697'
3
3
  triples:
4
4
  x86_64-linux:
5
- checksum: ded20da060a8c05c7551e9d86067ce7eecefca4ee3f8ddf286f79146d0895fd1
6
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5f0c552/appsignal-x86_64-linux-all-static.tar.gz
5
+ checksum: a70f22af18f50ea1a02adf4ef88f68047b353a185fd100e8a61bc7ade87095bc
6
+ download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5464697/appsignal-x86_64-linux-all-static.tar.gz
7
7
  i686-linux:
8
- checksum: 0332a1d256612b6230212ab5c503b53cf7e4121ff14c9df481d5a08545da89ba
9
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5f0c552/appsignal-i686-linux-all-static.tar.gz
8
+ checksum: 2101667a3c56dfe78436c4f25b763a1db2028dd6ebe247b64d3c616066269879
9
+ download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5464697/appsignal-i686-linux-all-static.tar.gz
10
10
  x86-linux:
11
- checksum: 0332a1d256612b6230212ab5c503b53cf7e4121ff14c9df481d5a08545da89ba
12
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5f0c552/appsignal-i686-linux-all-static.tar.gz
11
+ checksum: 2101667a3c56dfe78436c4f25b763a1db2028dd6ebe247b64d3c616066269879
12
+ download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5464697/appsignal-i686-linux-all-static.tar.gz
13
13
  x86_64-darwin:
14
- checksum: f4eaf9ef17f0c95adcc3b853f00134b28e1a50e33db48677dc3adfcbe48b14b4
15
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5f0c552/appsignal-x86_64-darwin-all-static.tar.gz
14
+ checksum: 496f3348ae0e957b2610bb82ae23ab3c9878483a01e447a9f27537c99bd9f69d
15
+ download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5464697/appsignal-x86_64-darwin-all-static.tar.gz
16
16
  universal-darwin:
17
- checksum: f4eaf9ef17f0c95adcc3b853f00134b28e1a50e33db48677dc3adfcbe48b14b4
18
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5f0c552/appsignal-x86_64-darwin-all-static.tar.gz
17
+ checksum: 496f3348ae0e957b2610bb82ae23ab3c9878483a01e447a9f27537c99bd9f69d
18
+ download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5464697/appsignal-x86_64-darwin-all-static.tar.gz
@@ -186,7 +186,7 @@ module Appsignal
186
186
 
187
187
  def instrument(name, title = nil, body = nil, body_format = Appsignal::EventFormatter::DEFAULT)
188
188
  Appsignal::Transaction.current.start_event
189
- return_value = yield
189
+ return_value = yield if block_given?
190
190
  Appsignal::Transaction.current.finish_event(name, title, body, body_format)
191
191
  return_value
192
192
  end
@@ -196,6 +196,7 @@ module Appsignal
196
196
 
197
197
  # Configuration with boolean type
198
198
  %w(APPSIGNAL_ACTIVE APPSIGNAL_DEBUG APPSIGNAL_INSTRUMENT_NET_HTTP
199
+ APPSIGNAL_INSTRUMENT_REDIS APPSIGNAL_INSTRUMENT_SEQUEL
199
200
  APPSIGNAL_SKIP_SESSION_DATA APPSIGNAL_ENABLE_FRONTEND_ERROR_CATCHING
200
201
  APPSIGNAL_ENABLE_ALLOCATION_TRACKING APPSIGNAL_ENABLE_GC_INSTRUMENTATION
201
202
  APPSIGNAL_RUNNING_IN_CONTAINER APPSIGNAL_ENABLE_HOST_METRICS
@@ -1,5 +1,5 @@
1
1
  require "yaml"
2
2
 
3
3
  module Appsignal
4
- VERSION = "2.1.0"
4
+ VERSION = "2.1.1.beta.1"
5
5
  end
@@ -311,6 +311,9 @@ describe Appsignal::Config do
311
311
  ENV["APPSIGNAL_APP_NAME"] = "App name"
312
312
  ENV["APPSIGNAL_DEBUG"] = "true"
313
313
  ENV["APPSIGNAL_IGNORE_ACTIONS"] = "action1,action2"
314
+ ENV["APPSIGNAL_INSTRUMENT_NET_HTTP"] = "false"
315
+ ENV["APPSIGNAL_INSTRUMENT_REDIS"] = "false"
316
+ ENV["APPSIGNAL_INSTRUMENT_SEQUEL"] = "false"
314
317
  end
315
318
  around { |example| recognize_as_container(:none) { example.run } }
316
319
 
@@ -324,6 +327,9 @@ describe Appsignal::Config do
324
327
  expect(config[:name]).to eq "App name"
325
328
  expect(config[:debug]).to be_truthy
326
329
  expect(config[:ignore_actions]).to eq ["action1", "action2"]
330
+ expect(config[:instrument_net_http]).to be_falsey
331
+ expect(config[:instrument_redis]).to be_falsey
332
+ expect(config[:instrument_sequel]).to be_falsey
327
333
  end
328
334
  end
329
335
 
@@ -807,6 +807,15 @@ describe Appsignal do
807
807
  end
808
808
  expect(result).to eq "return value"
809
809
  end
810
+
811
+ it "should instrument without a block given" do
812
+ expect(transaction).to receive(:start_event)
813
+ expect(transaction).to receive(:finish_event)
814
+ .with("name", "title", "body", Appsignal::EventFormatter::DEFAULT)
815
+
816
+ result = Appsignal.instrument "name", "title", "body"
817
+ expect(result).to be_nil
818
+ end
810
819
  end
811
820
 
812
821
  describe ".instrument_sql" 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: 2.1.0
4
+ version: 2.1.1.beta.1
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-01-31 00:00:00.000000000 Z
12
+ date: 2017-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
@@ -342,12 +342,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
342
342
  version: '1.9'
343
343
  required_rubygems_version: !ruby/object:Gem::Requirement
344
344
  requirements:
345
- - - ">="
345
+ - - ">"
346
346
  - !ruby/object:Gem::Version
347
- version: '0'
347
+ version: 1.3.1
348
348
  requirements: []
349
349
  rubyforge_project:
350
- rubygems_version: 2.5.2
350
+ rubygems_version: 2.6.10
351
351
  signing_key:
352
352
  specification_version: 4
353
353
  summary: Logs performance and exception data from your app to appsignal.com