appsignal 2.7.0-java → 2.7.1-java

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
2
  SHA256:
3
- metadata.gz: 6f7cd87796a7e264300c42c7bce8dee4b54a0d937df0cf939ca9945328d40183
4
- data.tar.gz: 2de0ac030e5b42cc1d35df40b6e5910cdae4d6a5ccec64623b9413be8c1cf297
3
+ metadata.gz: fe59e0d41b1d389e33496fa1b7a0a34ab4d04f72e51a8f3a9c7afd827f1b52e8
4
+ data.tar.gz: 56db5cf916b132f78fb6d8ab1129a7b8d848dc3c9d420ac8b64d742c3420f0ba
5
5
  SHA512:
6
- metadata.gz: 1c21d42b16b7121dc1287b930d0b507f46649ea89a93fdd0f922461185e3ebee647bb8ac699ada51ea03ade8c447004f68136b2b28723111a113a3005c6decda
7
- data.tar.gz: 21a6a51677154b21867d215125845fea74b34a41c4b4a9f7240fa49211ffc9e4e1a569f9c3bf50a2dacce23301eca175938c867d8893481f57747285c9733edf
6
+ metadata.gz: 8aa281176c5797e7e916e19d8c07441d1b3e999d1cf2fff002eca5c747a5df90797f1a19fc3f3bc0b0f6d289f88c2ef89eebe2e4668888bf9087594b0b3a77d9
7
+ data.tar.gz: d420fad888ef6a017bb4424e346cda807a5a7d0ce780b93e57e362c4b2853eb3174655cf4b8d130649ba6969628836238f47880b0188e6151659fe5143cb9ea5
@@ -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.
@@ -15,6 +15,7 @@ task :default do
15
15
  ) &&
16
16
  File.exist?(ext_path("appsignal.h"))
17
17
  archive = download_archive(arch_config, "dynamic")
18
+ next unless archive
18
19
  next unless verify_archive(archive, arch_config, "dynamic")
19
20
  unarchive(archive)
20
21
  end
@@ -36,7 +36,7 @@ def write_agent_architecture
36
36
  end
37
37
 
38
38
  def check_architecture
39
- if AGENT_CONFIG["triples"].keys.include?(ARCH)
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
- logger.info "Downloading agent release from #{arch_config[type]["download_url"]}"
52
- open(arch_config[type]["download_url"], :ssl_ca_cert => CA_CERT_PATH)
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)
@@ -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 ||= Appsignal::GarbageCollectionProfiler.new
56
+ @garbage_collection_profiler ||=
57
+ Appsignal.config[:enable_gc_instrumentation] ? Appsignal::GarbageCollectionProfiler.new : NilGarbageCollectionProfiler.new
57
58
  end
58
59
  end
59
60
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "2.7.0".freeze
4
+ VERSION = "2.7.1".freeze
5
5
  end
@@ -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.0
4
+ version: 2.7.1
5
5
  platform: java
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-08-13 00:00:00.000000000 Z
12
+ date: 2018-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack