appsignal 2.7.0 → 2.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/ext/Rakefile +1 -0
- data/ext/base.rb +13 -3
- data/ext/extconf.rb +1 -0
- data/lib/appsignal/garbage_collection_profiler.rb +11 -0
- data/lib/appsignal/transaction.rb +2 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/garbage_collection_profiler_spec.rb +10 -0
- data/spec/lib/appsignal/transaction_spec.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 958814ee490ee3e9939d056c6733eb198613a1411e55b21d66d530ed9168c8ef
|
4
|
+
data.tar.gz: 4d1043dbf6f6ce145378068b00e71f9d7041017a32631e2e6ab061e38bfa5e89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b96e28295754d5fad3010b714fc7d594ec732ab0b15d22f61db5320ee9563dd9155ff7e4bd7fa1ea632933ba90e11f1a665f3d353102be2e35a2f549152e46e
|
7
|
+
data.tar.gz: 042da1fbb9c27a823638d78e38d231bd9f34dd59621c17b7ac029fdcf6df24335f4b07614adecea8e77224e9499486325c609054e0e139389905d793cebe1802
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# 2.7.1
|
2
|
+
- Improve error log on unsupported architecture and build combination on
|
3
|
+
install. PR #426
|
4
|
+
- Improve performance when garbage collection profiling is disabled. PR #429
|
5
|
+
|
1
6
|
# 2.7.0
|
2
7
|
- Detect Kubernetes containers as containers for `running_in_container`
|
3
8
|
config option. Commit 60822aac24ccc394df073091c64f05096455942d.
|
data/ext/Rakefile
CHANGED
data/ext/base.rb
CHANGED
@@ -36,7 +36,7 @@ def write_agent_architecture
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def check_architecture
|
39
|
-
if AGENT_CONFIG["triples"].
|
39
|
+
if AGENT_CONFIG["triples"].key?(ARCH)
|
40
40
|
true
|
41
41
|
else
|
42
42
|
installation_failed(
|
@@ -48,8 +48,18 @@ def check_architecture
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def download_archive(arch_config, type)
|
51
|
-
|
52
|
-
|
51
|
+
if arch_config.key?(type)
|
52
|
+
logger.info "Downloading agent release from #{arch_config[type]["download_url"]}"
|
53
|
+
open(arch_config[type]["download_url"], :ssl_ca_cert => CA_CERT_PATH)
|
54
|
+
else
|
55
|
+
installation_failed(
|
56
|
+
"AppSignal currently does not support your system. " \
|
57
|
+
"Expected config for architecture '#{ARCH}' and package type '#{type}', but none found. " \
|
58
|
+
"For a full list of supported systems visit: " \
|
59
|
+
"https://docs.appsignal.com/support/operating-systems.html"
|
60
|
+
)
|
61
|
+
false
|
62
|
+
end
|
53
63
|
end
|
54
64
|
|
55
65
|
def verify_archive(archive, arch_config, type)
|
data/ext/extconf.rb
CHANGED
@@ -11,6 +11,7 @@ def install
|
|
11
11
|
File.exist?(ext_path("libappsignal.a")) &&
|
12
12
|
File.exist?(ext_path("appsignal.h"))
|
13
13
|
archive = download_archive(arch_config, "static")
|
14
|
+
return unless archive
|
14
15
|
return unless verify_archive(archive, arch_config, "static")
|
15
16
|
unarchive(archive)
|
16
17
|
end
|
@@ -47,4 +47,15 @@ module Appsignal
|
|
47
47
|
self.class.lock
|
48
48
|
end
|
49
49
|
end
|
50
|
+
|
51
|
+
# {Appsignal::NilGarbageCollectionProfiler} is a dummy profiler
|
52
|
+
# that always returns 0 as the total time.
|
53
|
+
# Used when we don't want any profile information
|
54
|
+
#
|
55
|
+
# @api private
|
56
|
+
class NilGarbageCollectionProfiler
|
57
|
+
def total_time
|
58
|
+
0
|
59
|
+
end
|
60
|
+
end
|
50
61
|
end
|
@@ -53,7 +53,8 @@ module Appsignal
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def garbage_collection_profiler
|
56
|
-
@garbage_collection_profiler ||=
|
56
|
+
@garbage_collection_profiler ||=
|
57
|
+
Appsignal.config[:enable_gc_instrumentation] ? Appsignal::GarbageCollectionProfiler.new : NilGarbageCollectionProfiler.new
|
57
58
|
end
|
58
59
|
end
|
59
60
|
|
data/lib/appsignal/version.rb
CHANGED
@@ -64,3 +64,13 @@ describe Appsignal::GarbageCollectionProfiler do
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
67
|
+
|
68
|
+
describe Appsignal::NilGarbageCollectionProfiler do
|
69
|
+
let(:profiler) { described_class.new }
|
70
|
+
|
71
|
+
describe "#total_time" do
|
72
|
+
it "has a total time of 0" do
|
73
|
+
expect(profiler.total_time).to eq(0)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -672,6 +672,23 @@ describe Appsignal::Transaction do
|
|
672
672
|
end
|
673
673
|
end
|
674
674
|
|
675
|
+
describe "#garbage_collection_profiler" do
|
676
|
+
before { Appsignal::Transaction.instance_variable_set(:@garbage_collection_profiler, nil) }
|
677
|
+
|
678
|
+
it "returns the NilGarbageCollectionProfiler" do
|
679
|
+
expect(Appsignal::Transaction.garbage_collection_profiler).to be_a(Appsignal::NilGarbageCollectionProfiler)
|
680
|
+
end
|
681
|
+
|
682
|
+
context "when gc profiling is enabled" do
|
683
|
+
before { Appsignal.config.config_hash[:enable_gc_instrumentation] = true }
|
684
|
+
after { Appsignal.config.config_hash[:enable_gc_instrumentation] = false }
|
685
|
+
|
686
|
+
it "returns the GarbageCollectionProfiler" do
|
687
|
+
expect(Appsignal::Transaction.garbage_collection_profiler).to be_a(Appsignal::GarbageCollectionProfiler)
|
688
|
+
end
|
689
|
+
end
|
690
|
+
end
|
691
|
+
|
675
692
|
describe "#start_event" do
|
676
693
|
it "should start the event in the extension" do
|
677
694
|
expect(transaction.ext).to receive(:start_event).with(0).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: 2.7.
|
4
|
+
version: 2.7.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: 2018-
|
12
|
+
date: 2018-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|