pyroscope 0.4.0-aarch64-linux → 0.5.0-aarch64-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6819d93f0d008ae969d66e54269c8dd7e570466c72702d063e56f4bd4829d0c
4
- data.tar.gz: 38b4721c5cdec52a38868a558329b66e211ed9c766b05b010d43b525e6c1fcfe
3
+ metadata.gz: 9f2b8ee68651f9d7709b127c5915683a4c094d1e37a30f3e181f731d15bbf20e
4
+ data.tar.gz: c9ba5290e09e89e72f604095f4565f794e6070deffaf609f42384d5d97f05de0
5
5
  SHA512:
6
- metadata.gz: 7b52d5f8a61dd8d0d0b6a3f1dd24a06fc37b1c6e692e0750f5a6e84f43d59e9b49da9fc36a0b809fe9ebe5c64965d40587b522a1cf34ad8a1fb90b058ad916ff
7
- data.tar.gz: 38ee5ca55bcae5a8480828a2c2737dc03899a9dc8fd7336a1a58af1208c32cdad54267ae4c4eb9f5d11e7e8e5f77cac64034bda2ee27891c9a65ee64c2259fa3
6
+ metadata.gz: be594d26c4e1356f9466e1fa931adda338057fa9407584d67d4145d1124319d3d41c6f7f227a0ae41968b43886d6e790eb99f6a568b68e22502b56ac2ab7ea2e
7
+ data.tar.gz: ef4d71adf95a06395e24663534616a8b81bca7cb65e13b8073d72272ad8838ff0dfca22c2501ed44763d02c1d90e5fd881a8d356f70e40bc5686b4f32d61b9ca
data/ext/rbspy/src/lib.rs CHANGED
@@ -10,6 +10,7 @@ use pyroscope_rbspy::{rbspy_backend, RbspyConfig};
10
10
 
11
11
  use pyroscope::{pyroscope::Compression, PyroscopeAgent};
12
12
  use pyroscope::backend::{Report, StackFrame, Tag};
13
+ use pyroscope::pyroscope::ReportEncoding;
13
14
 
14
15
  pub fn transform_report(report: Report) -> Report {
15
16
  let cwd = env::current_dir().unwrap();
@@ -107,7 +108,8 @@ pub extern "C" fn initialize_logging(logging_level: u32) -> bool {
107
108
  pub extern "C" fn initialize_agent(
108
109
  application_name: *const c_char, server_address: *const c_char, auth_token: *const c_char,
109
110
  sample_rate: u32, detect_subprocesses: bool, oncpu: bool, report_pid: bool,
110
- report_thread_id: bool, tags: *const c_char, compression: *const c_char
111
+ report_thread_id: bool, tags: *const c_char, compression: *const c_char,
112
+ report_encoding: *const c_char
111
113
  ) -> bool {
112
114
  // Initialize FFIKit
113
115
  let recv = ffikit::initialize_ffi().unwrap();
@@ -137,7 +139,14 @@ pub extern "C" fn initialize_agent(
137
139
  .unwrap()
138
140
  .to_string();
139
141
 
142
+ let report_encoding = unsafe { CStr::from_ptr(report_encoding) }
143
+ .to_str()
144
+ .unwrap()
145
+ .to_string();
146
+
140
147
  let compression = Compression::from_str(&compression_string);
148
+ let report_encoding = ReportEncoding::from_str(&report_encoding)
149
+ .unwrap_or(ReportEncoding::FOLDED);
141
150
 
142
151
  let pid = std::process::id();
143
152
 
@@ -156,7 +165,8 @@ pub extern "C" fn initialize_agent(
156
165
  let mut agent_builder = PyroscopeAgent::builder(server_address, application_name)
157
166
  .backend(rbspy)
158
167
  .func(transform_report)
159
- .tags(tags);
168
+ .tags(tags)
169
+ .report_encoding(report_encoding);
160
170
 
161
171
  if auth_token != "" {
162
172
  agent_builder = agent_builder.auth_token(auth_token);
@@ -1,3 +1,3 @@
1
1
  module Pyroscope
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.5.0'.freeze
3
3
  end
data/lib/pyroscope.rb CHANGED
@@ -8,7 +8,7 @@ module Pyroscope
8
8
  extend FFI::Library
9
9
  ffi_lib File.expand_path(File.dirname(__FILE__)) + "/rbspy/rbspy.#{RbConfig::CONFIG["DLEXT"]}"
10
10
  attach_function :initialize_logging, [:int], :bool
11
- attach_function :initialize_agent, [:string, :string, :string, :int, :bool, :bool, :bool, :bool, :string, :string], :bool
11
+ attach_function :initialize_agent, [:string, :string, :string, :int, :bool, :bool, :bool, :bool, :string, :string, :string], :bool
12
12
  attach_function :add_thread_tag, [:uint64, :string, :string], :bool
13
13
  attach_function :remove_thread_tag, [:uint64, :string, :string], :bool
14
14
  attach_function :add_global_tag, [:string, :string], :bool
@@ -22,7 +22,7 @@ module Pyroscope
22
22
  attach_function :thread_id, [], :uint64
23
23
  end
24
24
 
25
- Config = Struct.new(:application_name, :app_name, :server_address, :auth_token, :log_level, :sample_rate, :detect_subprocesses, :oncpu, :report_pid, :report_thread_id, :tags, :compression) do
25
+ Config = Struct.new(:application_name, :app_name, :server_address, :auth_token, :log_level, :sample_rate, :detect_subprocesses, :oncpu, :report_pid, :report_thread_id, :tags, :compression, :report_encoding) do
26
26
  def initialize(*)
27
27
  super
28
28
  # defaults:
@@ -37,6 +37,7 @@ module Pyroscope
37
37
  self.log_level = 'error'
38
38
  self.tags = {}
39
39
  self.compression = 'gzip'
40
+ self.report_encoding = 'pprof'
40
41
  end
41
42
  end
42
43
 
@@ -79,7 +80,8 @@ module Pyroscope
79
80
  @config.report_pid || false,
80
81
  @config.report_thread_id || false,
81
82
  tags_to_string(@config.tags || {}),
82
- @config.compression || ""
83
+ @config.compression || "",
84
+ @config.report_encoding || "pprof"
83
85
  )
84
86
  end
85
87
 
data/lib/rbspy/rbspy.so CHANGED
Binary file
Binary file
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.4.0
4
+ version: 0.5.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Pyroscope Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-06 00:00:00.000000000 Z
11
+ date: 2022-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi