pyroscope 0.5.1-x86_64-darwin → 0.5.3-x86_64-darwin
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/elflib/rbspy/manylinux.sh +3 -7
- data/elflib/thread_id/manylinux.sh +3 -7
- data/ext/rbspy/Cargo.lock +2692 -0
- data/ext/rbspy/Cargo.toml +3 -6
- data/ext/rbspy/src/lib.rs +63 -4
- data/ext/thread_id/Cargo.lock +521 -0
- data/ext/thread_id/Cargo.toml +1 -0
- data/lib/pyroscope/version.rb +1 -1
- data/lib/pyroscope.rb +20 -2
- data/lib/rbspy/rbspy.bundle +0 -0
- data/lib/thread_id/thread_id.bundle +0 -0
- data/scripts/docker.sh +9 -2
- metadata +5 -3
    
        data/lib/pyroscope.rb
    CHANGED
    
    | @@ -2,13 +2,14 @@ | |
| 2 2 | 
             
            # frozen_string_literal: true
         | 
| 3 3 |  | 
| 4 4 | 
             
            require 'ffi'
         | 
| 5 | 
            +
            require 'json'
         | 
| 5 6 |  | 
| 6 7 | 
             
            module Pyroscope
         | 
| 7 8 | 
             
              module Rust
         | 
| 8 9 | 
             
                extend FFI::Library
         | 
| 9 10 | 
             
                ffi_lib File.expand_path(File.dirname(__FILE__)) + "/rbspy/rbspy.#{RbConfig::CONFIG["DLEXT"]}"
         | 
| 10 11 | 
             
                attach_function :initialize_logging, [:int], :bool
         | 
| 11 | 
            -
                attach_function :initialize_agent, [:string, :string, :string, :int, :bool, :bool, :bool, :bool, :string, :string, :string], :bool
         | 
| 12 | 
            +
                attach_function :initialize_agent, [:string, :string, :string, :string, :string, :int, :bool, :bool, :bool, :bool, :string, :string, :string, :string, :string], :bool
         | 
| 12 13 | 
             
                attach_function :add_thread_tag, [:uint64, :string, :string], :bool
         | 
| 13 14 | 
             
                attach_function :remove_thread_tag, [:uint64, :string, :string], :bool
         | 
| 14 15 | 
             
                attach_function :add_global_tag, [:string, :string], :bool
         | 
| @@ -37,6 +38,8 @@ module Pyroscope | |
| 37 38 | 
             
                :app_name,
         | 
| 38 39 | 
             
                :server_address,
         | 
| 39 40 | 
             
                :auth_token,
         | 
| 41 | 
            +
                :basic_auth_username,
         | 
| 42 | 
            +
                :basic_auth_password,
         | 
| 40 43 | 
             
                :log_level,
         | 
| 41 44 | 
             
                :sample_rate,
         | 
| 42 45 | 
             
                :detect_subprocesses,
         | 
| @@ -47,6 +50,8 @@ module Pyroscope | |
| 47 50 | 
             
                :compression,
         | 
| 48 51 | 
             
                :report_encoding,
         | 
| 49 52 | 
             
                :autoinstrument_rails,
         | 
| 53 | 
            +
                :scope_org_id,
         | 
| 54 | 
            +
                :http_headers,
         | 
| 50 55 | 
             
              ) do
         | 
| 51 56 | 
             
                def initialize(*)
         | 
| 52 57 | 
             
                  super
         | 
| @@ -54,6 +59,8 @@ module Pyroscope | |
| 54 59 | 
             
                  self.application_name = ''
         | 
| 55 60 | 
             
                  self.server_address = 'http://localhost:4040'
         | 
| 56 61 | 
             
                  self.auth_token = ''
         | 
| 62 | 
            +
                  self.basic_auth_username = ''
         | 
| 63 | 
            +
                  self.basic_auth_password = ''
         | 
| 57 64 | 
             
                  self.sample_rate = 100
         | 
| 58 65 | 
             
                  self.detect_subprocesses = false
         | 
| 59 66 | 
             
                  self.oncpu = true
         | 
| @@ -64,6 +71,8 @@ module Pyroscope | |
| 64 71 | 
             
                  self.compression = 'gzip'
         | 
| 65 72 | 
             
                  self.report_encoding = 'pprof'
         | 
| 66 73 | 
             
                  self.autoinstrument_rails = true
         | 
| 74 | 
            +
                  self.scope_org_id = ''
         | 
| 75 | 
            +
                  self.http_headers = {}
         | 
| 67 76 | 
             
                end
         | 
| 68 77 | 
             
              end
         | 
| 69 78 |  | 
| @@ -101,6 +110,8 @@ module Pyroscope | |
| 101 110 | 
             
                    @config.app_name || @config.application_name || "",
         | 
| 102 111 | 
             
                    @config.server_address || "",
         | 
| 103 112 | 
             
                    @config.auth_token || "",
         | 
| 113 | 
            +
                    @config.basic_auth_username || "",
         | 
| 114 | 
            +
                    @config.basic_auth_password || "",
         | 
| 104 115 | 
             
                    @config.sample_rate || 100,
         | 
| 105 116 | 
             
                    @config.detect_subprocesses || false,
         | 
| 106 117 | 
             
                    @config.oncpu || false,
         | 
| @@ -108,7 +119,9 @@ module Pyroscope | |
| 108 119 | 
             
                    @config.report_thread_id || false,
         | 
| 109 120 | 
             
                    tags_to_string(@config.tags || {}),
         | 
| 110 121 | 
             
                    @config.compression || "",
         | 
| 111 | 
            -
                    @config.report_encoding || "pprof"
         | 
| 122 | 
            +
                    @config.report_encoding || "pprof",
         | 
| 123 | 
            +
                    @config.scope_org_id || "",
         | 
| 124 | 
            +
                    http_headers_to_json(@config.http_headers || {})
         | 
| 112 125 | 
             
                  )
         | 
| 113 126 | 
             
                end
         | 
| 114 127 |  | 
| @@ -170,5 +183,10 @@ module Pyroscope | |
| 170 183 | 
             
                def tags_to_string(tags)
         | 
| 171 184 | 
             
                  tags.map { |k, v| "#{k}=#{v}" }.join(',')
         | 
| 172 185 | 
             
                end
         | 
| 186 | 
            +
             | 
| 187 | 
            +
                def http_headers_to_json(http_headers)
         | 
| 188 | 
            +
                  JSON.dump(http_headers)
         | 
| 189 | 
            +
                end
         | 
| 190 | 
            +
             | 
| 173 191 | 
             
              end
         | 
| 174 192 | 
             
            end
         | 
    
        data/lib/rbspy/rbspy.bundle
    CHANGED
    
    | Binary file | 
| Binary file | 
    
        data/scripts/docker.sh
    CHANGED
    
    | @@ -1,16 +1,23 @@ | |
| 1 1 | 
             
            #!/bin/bash
         | 
| 2 2 | 
             
            set -ex
         | 
| 3 3 |  | 
| 4 | 
            +
            if [ "${BUILD_ARCH}" != "manylinux2010_x86_64" ] && [ "${BUILD_ARCH}" != "manylinux2014_aarch64" ];
         | 
| 5 | 
            +
            then
         | 
| 6 | 
            +
              echo set BUILD_ARCH to one of manylinux2010_x86_64 or manylinux2014_aarch64
         | 
| 7 | 
            +
              exit 239
         | 
| 8 | 
            +
            fi
         | 
| 9 | 
            +
             | 
| 4 10 | 
             
            BUILD_DIR="/work"
         | 
| 11 | 
            +
            MANYLINUX_PREFIX=pyroscope/rust_builder
         | 
| 5 12 |  | 
| 6 13 | 
             
            docker run \
         | 
| 7 14 | 
             
                    -w /work/pyroscope_ffi/ruby/elflib/rbspy \
         | 
| 8 15 | 
             
                    -v `pwd`:/work \
         | 
| 9 | 
            -
                     | 
| 16 | 
            +
                    ${MANYLINUX_PREFIX}_${BUILD_ARCH} \
         | 
| 10 17 | 
             
                    sh manylinux.sh
         | 
| 11 18 |  | 
| 12 19 | 
             
            docker run \
         | 
| 13 20 | 
             
                    -w /work/pyroscope_ffi/ruby/elflib/thread_id \
         | 
| 14 21 | 
             
                    -v `pwd`:/work \
         | 
| 15 | 
            -
                     | 
| 22 | 
            +
                    ${MANYLINUX_PREFIX}_${BUILD_ARCH} \
         | 
| 16 23 | 
             
                    sh manylinux.sh
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: pyroscope
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.5. | 
| 4 | 
            +
              version: 0.5.3
         | 
| 5 5 | 
             
            platform: x86_64-darwin
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Pyroscope Team
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2023-04-27 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: ffi
         | 
| @@ -71,12 +71,14 @@ files: | |
| 71 71 | 
             
            - elflib/thread_id/setup.cfg
         | 
| 72 72 | 
             
            - elflib/thread_id/setup.py
         | 
| 73 73 | 
             
            - elflib/thread_id/thread_id/__init__.py
         | 
| 74 | 
            +
            - ext/rbspy/Cargo.lock
         | 
| 74 75 | 
             
            - ext/rbspy/Cargo.toml
         | 
| 75 76 | 
             
            - ext/rbspy/Rakefile
         | 
| 76 77 | 
             
            - ext/rbspy/build.rs
         | 
| 77 78 | 
             
            - ext/rbspy/cbindgen.toml
         | 
| 78 79 | 
             
            - ext/rbspy/extconf.rb
         | 
| 79 80 | 
             
            - ext/rbspy/src/lib.rs
         | 
| 81 | 
            +
            - ext/thread_id/Cargo.lock
         | 
| 80 82 | 
             
            - ext/thread_id/Cargo.toml
         | 
| 81 83 | 
             
            - ext/thread_id/Rakefile
         | 
| 82 84 | 
             
            - ext/thread_id/build.rs
         | 
| @@ -114,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 114 116 | 
             
                - !ruby/object:Gem::Version
         | 
| 115 117 | 
             
                  version: '0'
         | 
| 116 118 | 
             
            requirements: []
         | 
| 117 | 
            -
            rubygems_version: 3.3. | 
| 119 | 
            +
            rubygems_version: 3.3.26
         | 
| 118 120 | 
             
            signing_key:
         | 
| 119 121 | 
             
            specification_version: 4
         | 
| 120 122 | 
             
            summary: Pyroscope
         |