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 +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +6 -0
- data/benchmark.rake +32 -24
- data/ext/agent.yml +11 -11
- data/lib/appsignal.rb +1 -1
- data/lib/appsignal/config.rb +1 -0
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/config_spec.rb +6 -0
- data/spec/lib/appsignal_spec.rb +9 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30574286398091fc000951898cc7854c3703dbe0
|
4
|
+
data.tar.gz: 1c769b7da29ede2b1c83d794490f23d546313cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b09ac555516fd6ce7f02b539a48762cc2f78e142f3691506580ed133dfb1e1f6bc16f1d03d87586755751ecf82c9880d443ca0a4f9091299291dd05d68506c3
|
7
|
+
data.tar.gz: a1d743e8a75d8480457aa8a8bd42f3252e7e2a34946f216e9ce584e66c2dcb2eed3ab586e21f2c2f099b551865a5f098d26e37f00e795b0789601dddc97371cc
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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?`
|
data/benchmark.rake
CHANGED
@@ -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]
|
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 =
|
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
|
-
|
35
|
+
threads = []
|
36
|
+
puts "Running #{no_transactions} normal transactions in #{no_threads} threads"
|
37
37
|
puts(Benchmark.measure do
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
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
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
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
|
-
|
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
|
|
data/ext/agent.yml
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
---
|
2
|
-
version:
|
2
|
+
version: '5464697'
|
3
3
|
triples:
|
4
4
|
x86_64-linux:
|
5
|
-
checksum:
|
6
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
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:
|
9
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
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:
|
12
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
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:
|
15
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
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:
|
18
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
17
|
+
checksum: 496f3348ae0e957b2610bb82ae23ab3c9878483a01e447a9f27537c99bd9f69d
|
18
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5464697/appsignal-x86_64-darwin-all-static.tar.gz
|
data/lib/appsignal.rb
CHANGED
@@ -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
|
data/lib/appsignal/config.rb
CHANGED
@@ -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
|
data/lib/appsignal/version.rb
CHANGED
@@ -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
|
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -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.
|
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-
|
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:
|
347
|
+
version: 1.3.1
|
348
348
|
requirements: []
|
349
349
|
rubyforge_project:
|
350
|
-
rubygems_version: 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
|