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 +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: fe59e0d41b1d389e33496fa1b7a0a34ab4d04f72e51a8f3a9c7afd827f1b52e8
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 56db5cf916b132f78fb6d8ab1129a7b8d848dc3c9d420ac8b64d742c3420f0ba
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 8aa281176c5797e7e916e19d8c07441d1b3e999d1cf2fff002eca5c747a5df90797f1a19fc3f3bc0b0f6d289f88c2ef89eebe2e4668888bf9087594b0b3a77d9
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d420fad888ef6a017bb4424e346cda807a5a7d0ce780b93e57e362c4b2853eb3174655cf4b8d130649ba6969628836238f47880b0188e6151659fe5143cb9ea5
         
     | 
    
        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: 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- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2018-09-13 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: rack
         
     |