pyroscope 0.5.6 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rbspy/src/lib.rs +10 -5
- data/lib/pyroscope/version.rb +1 -1
- data/lib/pyroscope.rb +3 -3
- 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: aa5b103d57c5f1ecde2cc07e9cebec2ad312fbc7da697d8558ba9608745929d6
|
4
|
+
data.tar.gz: 7b9b97e1487ef0ce171db6c20124de9dab7bbf160ffb8f0b62605cd600156aa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3508c99d9d280a280c8df178e43d36962fe8fc99c757c2a20aac6af349ee35bf0b3dd8981e3c4c67a08c7ceab1f09d73b020bc0e036392b9ddd822f76dd2c01d
|
7
|
+
data.tar.gz: 3bd5e6a31d7a877f361e63c8c9b21a0de04cefdf668d45ab3d214bd76caea75dbcb347f1954c3c9a6db1d527994b465e1296f0afc050fc3c745dee062e24c872
|
data/ext/rbspy/src/lib.rs
CHANGED
@@ -123,7 +123,7 @@ pub extern "C" fn initialize_agent(
|
|
123
123
|
tags: *const c_char,
|
124
124
|
compression: *const c_char,
|
125
125
|
report_encoding: *const c_char,
|
126
|
-
|
126
|
+
tenant_id: *const c_char,
|
127
127
|
http_headers_json: *const c_char,
|
128
128
|
) -> bool {
|
129
129
|
// Initialize FFIKit
|
@@ -134,11 +134,16 @@ pub extern "C" fn initialize_agent(
|
|
134
134
|
.unwrap()
|
135
135
|
.to_string();
|
136
136
|
|
137
|
-
let server_address = unsafe { CStr::from_ptr(server_address) }
|
137
|
+
let mut server_address = unsafe { CStr::from_ptr(server_address) }
|
138
138
|
.to_str()
|
139
139
|
.unwrap()
|
140
140
|
.to_string();
|
141
141
|
|
142
|
+
let adhoc_server_address = std::env::var("PYROSCOPE_ADHOC_SERVER_ADDRESS");
|
143
|
+
if let Ok(adhoc_server_address) = adhoc_server_address {
|
144
|
+
server_address = adhoc_server_address
|
145
|
+
}
|
146
|
+
|
142
147
|
let auth_token = unsafe { CStr::from_ptr(auth_token) }
|
143
148
|
.to_str()
|
144
149
|
.unwrap()
|
@@ -169,7 +174,7 @@ pub extern "C" fn initialize_agent(
|
|
169
174
|
.unwrap()
|
170
175
|
.to_string();
|
171
176
|
|
172
|
-
let
|
177
|
+
let tenant_id = unsafe { CStr::from_ptr(tenant_id) }
|
173
178
|
.to_str()
|
174
179
|
.unwrap()
|
175
180
|
.to_string();
|
@@ -209,8 +214,8 @@ pub extern "C" fn initialize_agent(
|
|
209
214
|
agent_builder = agent_builder.basic_auth(basic_auth_user, basic_auth_password);
|
210
215
|
}
|
211
216
|
|
212
|
-
if
|
213
|
-
agent_builder = agent_builder.
|
217
|
+
if tenant_id != "" {
|
218
|
+
agent_builder = agent_builder.tenant_id(tenant_id);
|
214
219
|
}
|
215
220
|
|
216
221
|
let http_headers = pyroscope::pyroscope::parse_http_headers_json(http_headers_json);
|
data/lib/pyroscope/version.rb
CHANGED
data/lib/pyroscope.rb
CHANGED
@@ -50,7 +50,7 @@ module Pyroscope
|
|
50
50
|
:compression,
|
51
51
|
:report_encoding,
|
52
52
|
:autoinstrument_rails,
|
53
|
-
:
|
53
|
+
:tenant_id,
|
54
54
|
:http_headers,
|
55
55
|
) do
|
56
56
|
def initialize(*)
|
@@ -71,7 +71,7 @@ module Pyroscope
|
|
71
71
|
self.compression = 'gzip'
|
72
72
|
self.report_encoding = 'pprof'
|
73
73
|
self.autoinstrument_rails = true
|
74
|
-
self.
|
74
|
+
self.tenant_id = ''
|
75
75
|
self.http_headers = {}
|
76
76
|
end
|
77
77
|
end
|
@@ -120,7 +120,7 @@ module Pyroscope
|
|
120
120
|
tags_to_string(@config.tags || {}),
|
121
121
|
@config.compression || "",
|
122
122
|
@config.report_encoding || "pprof",
|
123
|
-
@config.
|
123
|
+
@config.tenant_id || "",
|
124
124
|
http_headers_to_json(@config.http_headers || {})
|
125
125
|
)
|
126
126
|
end
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pyroscope Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|