pyroscope 0.5.1-aarch64-linux → 0.5.3-aarch64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/elflib/rbspy/manylinux.sh +3 -7
- data/elflib/thread_id/manylinux.sh +3 -7
- data/ext/rbspy/Cargo.lock +2603 -0
- data/ext/rbspy/Cargo.toml +3 -6
- data/ext/rbspy/src/lib.rs +63 -4
- data/ext/thread_id/Cargo.lock +324 -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.so +0 -0
- data/lib/thread_id/thread_id.so +0 -0
- data/scripts/docker.sh +9 -2
- metadata +5 -13
- data/lib/rbspy.libs/libcom_err-057ba42b.so.2.1 +0 -0
- data/lib/rbspy.libs/libcrypto-d9dd810d.so.1.0.2k +0 -0
- data/lib/rbspy.libs/libgssapi_krb5-fec99a71.so.2.2 +0 -0
- data/lib/rbspy.libs/libk5crypto-47ac5e52.so.3.1 +0 -0
- data/lib/rbspy.libs/libkeyutils-19c64d08.so.1.5 +0 -0
- data/lib/rbspy.libs/libkrb5-c5423238.so.3.3 +0 -0
- data/lib/rbspy.libs/libkrb5support-2c32ed7d.so.0.1 +0 -0
- data/lib/rbspy.libs/libpcre-6b975b27.so.1.2.0 +0 -0
- data/lib/rbspy.libs/libselinux-ae24b712.so.1 +0 -0
- data/lib/rbspy.libs/libssl-4c1437a8.so.1.0.2k +0 -0
data/ext/rbspy/Cargo.toml
CHANGED
@@ -2,22 +2,19 @@
|
|
2
2
|
name = "rbspy"
|
3
3
|
version = "0.1.0"
|
4
4
|
edition = "2021"
|
5
|
+
rust-version = "1.63"
|
5
6
|
|
6
7
|
[lib]
|
7
8
|
name = "rbspy"
|
8
9
|
crate-type = ["cdylib"]
|
9
10
|
|
10
11
|
[dependencies]
|
11
|
-
#pyroscope = {version = "0.5.2" }
|
12
12
|
pyroscope = { path = "../../../../" }
|
13
|
-
#pyroscope_rbspy = { version = "0.2" }
|
14
13
|
pyroscope_rbspy = { path = "../../../../pyroscope_backends/pyroscope_rbspy" }
|
15
14
|
ffikit = { path = "../../../ffikit" }
|
16
15
|
pretty_env_logger = "0.4.0"
|
17
|
-
|
18
|
-
|
19
|
-
read-process-memory = {git = "https://github.com/omarabid/read-process-memory.git", branch = "0.1.4-fix"}
|
20
|
-
rbspy = {git="https://github.com/omarabid/rbspy.git", branch="oncpu-fix"}
|
16
|
+
inferno = "=0.11.14"
|
17
|
+
log = "0.4"
|
21
18
|
|
22
19
|
[build-dependencies]
|
23
20
|
cbindgen = "0.20.0"
|
data/ext/rbspy/src/lib.rs
CHANGED
@@ -8,10 +8,14 @@ use std::str::FromStr;
|
|
8
8
|
use ffikit::Signal;
|
9
9
|
use pyroscope_rbspy::{rbspy_backend, RbspyConfig};
|
10
10
|
|
11
|
+
use pyroscope;
|
11
12
|
use pyroscope::{pyroscope::Compression, PyroscopeAgent};
|
12
13
|
use pyroscope::backend::{Report, StackFrame, Tag};
|
13
14
|
use pyroscope::pyroscope::ReportEncoding;
|
14
15
|
|
16
|
+
const LOG_TAG: &str = "Pyroscope::rbspy::ffi";
|
17
|
+
|
18
|
+
|
15
19
|
pub fn transform_report(report: Report) -> Report {
|
16
20
|
let cwd = env::current_dir().unwrap();
|
17
21
|
let cwd = cwd.to_str().unwrap_or("");
|
@@ -106,10 +110,21 @@ pub extern "C" fn initialize_logging(logging_level: u32) -> bool {
|
|
106
110
|
|
107
111
|
#[no_mangle]
|
108
112
|
pub extern "C" fn initialize_agent(
|
109
|
-
application_name: *const c_char,
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
+
application_name: *const c_char,
|
114
|
+
server_address: *const c_char,
|
115
|
+
auth_token: *const c_char,
|
116
|
+
basic_auth_user: *const c_char,
|
117
|
+
basic_auth_password: *const c_char,
|
118
|
+
sample_rate: u32,
|
119
|
+
detect_subprocesses: bool,
|
120
|
+
oncpu: bool,
|
121
|
+
report_pid: bool,
|
122
|
+
report_thread_id: bool,
|
123
|
+
tags: *const c_char,
|
124
|
+
compression: *const c_char,
|
125
|
+
report_encoding: *const c_char,
|
126
|
+
scope_org_id: *const c_char,
|
127
|
+
http_headers_json: *const c_char,
|
113
128
|
) -> bool {
|
114
129
|
// Initialize FFIKit
|
115
130
|
let recv = ffikit::initialize_ffi().unwrap();
|
@@ -129,6 +144,16 @@ pub extern "C" fn initialize_agent(
|
|
129
144
|
.unwrap()
|
130
145
|
.to_string();
|
131
146
|
|
147
|
+
let basic_auth_user = unsafe { CStr::from_ptr(basic_auth_user) }
|
148
|
+
.to_str()
|
149
|
+
.unwrap()
|
150
|
+
.to_string();
|
151
|
+
|
152
|
+
let basic_auth_password = unsafe { CStr::from_ptr(basic_auth_password) }
|
153
|
+
.to_str()
|
154
|
+
.unwrap()
|
155
|
+
.to_string();
|
156
|
+
|
132
157
|
let tags_string = unsafe { CStr::from_ptr(tags) }
|
133
158
|
.to_str()
|
134
159
|
.unwrap()
|
@@ -144,6 +169,16 @@ pub extern "C" fn initialize_agent(
|
|
144
169
|
.unwrap()
|
145
170
|
.to_string();
|
146
171
|
|
172
|
+
let scope_org_id = unsafe { CStr::from_ptr(scope_org_id) }
|
173
|
+
.to_str()
|
174
|
+
.unwrap()
|
175
|
+
.to_string();
|
176
|
+
|
177
|
+
let http_headers_json = unsafe { CStr::from_ptr(http_headers_json) }
|
178
|
+
.to_str()
|
179
|
+
.unwrap()
|
180
|
+
.to_string();
|
181
|
+
|
147
182
|
let compression = Compression::from_str(&compression_string);
|
148
183
|
let report_encoding = ReportEncoding::from_str(&report_encoding)
|
149
184
|
.unwrap_or(ReportEncoding::FOLDED);
|
@@ -170,6 +205,30 @@ pub extern "C" fn initialize_agent(
|
|
170
205
|
|
171
206
|
if auth_token != "" {
|
172
207
|
agent_builder = agent_builder.auth_token(auth_token);
|
208
|
+
} else if basic_auth_user != "" && basic_auth_password != "" {
|
209
|
+
agent_builder = agent_builder.basic_auth(basic_auth_user, basic_auth_password);
|
210
|
+
}
|
211
|
+
|
212
|
+
if scope_org_id != "" {
|
213
|
+
agent_builder = agent_builder.scope_org_id(scope_org_id);
|
214
|
+
}
|
215
|
+
|
216
|
+
let http_headers = pyroscope::pyroscope::parse_http_headers_json(http_headers_json);
|
217
|
+
match http_headers {
|
218
|
+
Ok(http_headers) => {
|
219
|
+
agent_builder = agent_builder.http_headers(http_headers);
|
220
|
+
}
|
221
|
+
Err(e) => {
|
222
|
+
match e {
|
223
|
+
pyroscope::PyroscopeError::Json(e) => {
|
224
|
+
log::error!(target: LOG_TAG, "parse_http_headers_json error {}", e);
|
225
|
+
}
|
226
|
+
pyroscope::PyroscopeError::AdHoc(e) => {
|
227
|
+
log::error!(target: LOG_TAG, "parse_http_headers_json {}", e);
|
228
|
+
}
|
229
|
+
_ => {}
|
230
|
+
}
|
231
|
+
}
|
173
232
|
}
|
174
233
|
|
175
234
|
if let Ok(compression) = compression {
|
@@ -0,0 +1,324 @@
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
2
|
+
# It is not intended for manual editing.
|
3
|
+
version = 3
|
4
|
+
|
5
|
+
[[package]]
|
6
|
+
name = "ansi_term"
|
7
|
+
version = "0.12.1"
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
9
|
+
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
10
|
+
dependencies = [
|
11
|
+
"winapi",
|
12
|
+
]
|
13
|
+
|
14
|
+
[[package]]
|
15
|
+
name = "atty"
|
16
|
+
version = "0.2.14"
|
17
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
18
|
+
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
19
|
+
dependencies = [
|
20
|
+
"hermit-abi",
|
21
|
+
"libc",
|
22
|
+
"winapi",
|
23
|
+
]
|
24
|
+
|
25
|
+
[[package]]
|
26
|
+
name = "autocfg"
|
27
|
+
version = "1.1.0"
|
28
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
29
|
+
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
30
|
+
|
31
|
+
[[package]]
|
32
|
+
name = "bitflags"
|
33
|
+
version = "1.3.2"
|
34
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
35
|
+
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
36
|
+
|
37
|
+
[[package]]
|
38
|
+
name = "cbindgen"
|
39
|
+
version = "0.20.0"
|
40
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
41
|
+
checksum = "51e3973b165dc0f435831a9e426de67e894de532754ff7a3f307c03ee5dec7dc"
|
42
|
+
dependencies = [
|
43
|
+
"clap",
|
44
|
+
"heck",
|
45
|
+
"indexmap",
|
46
|
+
"log",
|
47
|
+
"proc-macro2",
|
48
|
+
"quote",
|
49
|
+
"serde",
|
50
|
+
"serde_json",
|
51
|
+
"syn",
|
52
|
+
"tempfile",
|
53
|
+
"toml",
|
54
|
+
]
|
55
|
+
|
56
|
+
[[package]]
|
57
|
+
name = "cfg-if"
|
58
|
+
version = "1.0.0"
|
59
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
60
|
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
61
|
+
|
62
|
+
[[package]]
|
63
|
+
name = "clap"
|
64
|
+
version = "2.34.0"
|
65
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
66
|
+
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
67
|
+
dependencies = [
|
68
|
+
"ansi_term",
|
69
|
+
"atty",
|
70
|
+
"bitflags",
|
71
|
+
"strsim",
|
72
|
+
"textwrap",
|
73
|
+
"unicode-width",
|
74
|
+
"vec_map",
|
75
|
+
]
|
76
|
+
|
77
|
+
[[package]]
|
78
|
+
name = "fastrand"
|
79
|
+
version = "1.9.0"
|
80
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
81
|
+
checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
|
82
|
+
dependencies = [
|
83
|
+
"instant",
|
84
|
+
]
|
85
|
+
|
86
|
+
[[package]]
|
87
|
+
name = "hashbrown"
|
88
|
+
version = "0.12.3"
|
89
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
90
|
+
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
91
|
+
|
92
|
+
[[package]]
|
93
|
+
name = "heck"
|
94
|
+
version = "0.3.3"
|
95
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
96
|
+
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
|
97
|
+
dependencies = [
|
98
|
+
"unicode-segmentation",
|
99
|
+
]
|
100
|
+
|
101
|
+
[[package]]
|
102
|
+
name = "hermit-abi"
|
103
|
+
version = "0.1.19"
|
104
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
105
|
+
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
106
|
+
dependencies = [
|
107
|
+
"libc",
|
108
|
+
]
|
109
|
+
|
110
|
+
[[package]]
|
111
|
+
name = "indexmap"
|
112
|
+
version = "1.9.2"
|
113
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
114
|
+
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
|
115
|
+
dependencies = [
|
116
|
+
"autocfg",
|
117
|
+
"hashbrown",
|
118
|
+
]
|
119
|
+
|
120
|
+
[[package]]
|
121
|
+
name = "instant"
|
122
|
+
version = "0.1.12"
|
123
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
124
|
+
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
|
125
|
+
dependencies = [
|
126
|
+
"cfg-if",
|
127
|
+
]
|
128
|
+
|
129
|
+
[[package]]
|
130
|
+
name = "itoa"
|
131
|
+
version = "1.0.5"
|
132
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
133
|
+
checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"
|
134
|
+
|
135
|
+
[[package]]
|
136
|
+
name = "libc"
|
137
|
+
version = "0.2.139"
|
138
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
139
|
+
checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
|
140
|
+
|
141
|
+
[[package]]
|
142
|
+
name = "log"
|
143
|
+
version = "0.4.17"
|
144
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
145
|
+
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
|
146
|
+
dependencies = [
|
147
|
+
"cfg-if",
|
148
|
+
]
|
149
|
+
|
150
|
+
[[package]]
|
151
|
+
name = "proc-macro2"
|
152
|
+
version = "1.0.51"
|
153
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
154
|
+
checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6"
|
155
|
+
dependencies = [
|
156
|
+
"unicode-ident",
|
157
|
+
]
|
158
|
+
|
159
|
+
[[package]]
|
160
|
+
name = "quote"
|
161
|
+
version = "1.0.23"
|
162
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
163
|
+
checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
|
164
|
+
dependencies = [
|
165
|
+
"proc-macro2",
|
166
|
+
]
|
167
|
+
|
168
|
+
[[package]]
|
169
|
+
name = "redox_syscall"
|
170
|
+
version = "0.2.16"
|
171
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
172
|
+
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
|
173
|
+
dependencies = [
|
174
|
+
"bitflags",
|
175
|
+
]
|
176
|
+
|
177
|
+
[[package]]
|
178
|
+
name = "remove_dir_all"
|
179
|
+
version = "0.5.3"
|
180
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
181
|
+
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
|
182
|
+
dependencies = [
|
183
|
+
"winapi",
|
184
|
+
]
|
185
|
+
|
186
|
+
[[package]]
|
187
|
+
name = "ryu"
|
188
|
+
version = "1.0.12"
|
189
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
190
|
+
checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
|
191
|
+
|
192
|
+
[[package]]
|
193
|
+
name = "serde"
|
194
|
+
version = "1.0.152"
|
195
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
196
|
+
checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
|
197
|
+
dependencies = [
|
198
|
+
"serde_derive",
|
199
|
+
]
|
200
|
+
|
201
|
+
[[package]]
|
202
|
+
name = "serde_derive"
|
203
|
+
version = "1.0.152"
|
204
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
205
|
+
checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
|
206
|
+
dependencies = [
|
207
|
+
"proc-macro2",
|
208
|
+
"quote",
|
209
|
+
"syn",
|
210
|
+
]
|
211
|
+
|
212
|
+
[[package]]
|
213
|
+
name = "serde_json"
|
214
|
+
version = "1.0.93"
|
215
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
216
|
+
checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76"
|
217
|
+
dependencies = [
|
218
|
+
"itoa",
|
219
|
+
"ryu",
|
220
|
+
"serde",
|
221
|
+
]
|
222
|
+
|
223
|
+
[[package]]
|
224
|
+
name = "strsim"
|
225
|
+
version = "0.8.0"
|
226
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
227
|
+
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
228
|
+
|
229
|
+
[[package]]
|
230
|
+
name = "syn"
|
231
|
+
version = "1.0.107"
|
232
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
233
|
+
checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
|
234
|
+
dependencies = [
|
235
|
+
"proc-macro2",
|
236
|
+
"quote",
|
237
|
+
"unicode-ident",
|
238
|
+
]
|
239
|
+
|
240
|
+
[[package]]
|
241
|
+
name = "tempfile"
|
242
|
+
version = "3.3.0"
|
243
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
244
|
+
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
|
245
|
+
dependencies = [
|
246
|
+
"cfg-if",
|
247
|
+
"fastrand",
|
248
|
+
"libc",
|
249
|
+
"redox_syscall",
|
250
|
+
"remove_dir_all",
|
251
|
+
"winapi",
|
252
|
+
]
|
253
|
+
|
254
|
+
[[package]]
|
255
|
+
name = "textwrap"
|
256
|
+
version = "0.11.0"
|
257
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
258
|
+
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
259
|
+
dependencies = [
|
260
|
+
"unicode-width",
|
261
|
+
]
|
262
|
+
|
263
|
+
[[package]]
|
264
|
+
name = "thread_id"
|
265
|
+
version = "0.1.0"
|
266
|
+
dependencies = [
|
267
|
+
"cbindgen",
|
268
|
+
"libc",
|
269
|
+
]
|
270
|
+
|
271
|
+
[[package]]
|
272
|
+
name = "toml"
|
273
|
+
version = "0.5.11"
|
274
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
275
|
+
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
|
276
|
+
dependencies = [
|
277
|
+
"serde",
|
278
|
+
]
|
279
|
+
|
280
|
+
[[package]]
|
281
|
+
name = "unicode-ident"
|
282
|
+
version = "1.0.6"
|
283
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
284
|
+
checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
|
285
|
+
|
286
|
+
[[package]]
|
287
|
+
name = "unicode-segmentation"
|
288
|
+
version = "1.10.1"
|
289
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
290
|
+
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
|
291
|
+
|
292
|
+
[[package]]
|
293
|
+
name = "unicode-width"
|
294
|
+
version = "0.1.10"
|
295
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
296
|
+
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
|
297
|
+
|
298
|
+
[[package]]
|
299
|
+
name = "vec_map"
|
300
|
+
version = "0.8.2"
|
301
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
302
|
+
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
303
|
+
|
304
|
+
[[package]]
|
305
|
+
name = "winapi"
|
306
|
+
version = "0.3.9"
|
307
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
308
|
+
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
309
|
+
dependencies = [
|
310
|
+
"winapi-i686-pc-windows-gnu",
|
311
|
+
"winapi-x86_64-pc-windows-gnu",
|
312
|
+
]
|
313
|
+
|
314
|
+
[[package]]
|
315
|
+
name = "winapi-i686-pc-windows-gnu"
|
316
|
+
version = "0.4.0"
|
317
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
318
|
+
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
319
|
+
|
320
|
+
[[package]]
|
321
|
+
name = "winapi-x86_64-pc-windows-gnu"
|
322
|
+
version = "0.4.0"
|
323
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
324
|
+
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
data/ext/thread_id/Cargo.toml
CHANGED
data/lib/pyroscope/version.rb
CHANGED
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.so
CHANGED
Binary file
|
data/lib/thread_id/thread_id.so
CHANGED
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: aarch64-linux
|
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
|
@@ -85,16 +87,6 @@ files:
|
|
85
87
|
- ext/thread_id/src/lib.rs
|
86
88
|
- lib/pyroscope.rb
|
87
89
|
- lib/pyroscope/version.rb
|
88
|
-
- lib/rbspy.libs/libcom_err-057ba42b.so.2.1
|
89
|
-
- lib/rbspy.libs/libcrypto-d9dd810d.so.1.0.2k
|
90
|
-
- lib/rbspy.libs/libgssapi_krb5-fec99a71.so.2.2
|
91
|
-
- lib/rbspy.libs/libk5crypto-47ac5e52.so.3.1
|
92
|
-
- lib/rbspy.libs/libkeyutils-19c64d08.so.1.5
|
93
|
-
- lib/rbspy.libs/libkrb5-c5423238.so.3.3
|
94
|
-
- lib/rbspy.libs/libkrb5support-2c32ed7d.so.0.1
|
95
|
-
- lib/rbspy.libs/libpcre-6b975b27.so.1.2.0
|
96
|
-
- lib/rbspy.libs/libselinux-ae24b712.so.1
|
97
|
-
- lib/rbspy.libs/libssl-4c1437a8.so.1.0.2k
|
98
90
|
- lib/rbspy/rbspy.so
|
99
91
|
- lib/thread_id/thread_id.so
|
100
92
|
- pyroscope.gemspec
|
@@ -124,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
116
|
- !ruby/object:Gem::Version
|
125
117
|
version: '0'
|
126
118
|
requirements: []
|
127
|
-
rubygems_version: 3.3.
|
119
|
+
rubygems_version: 3.3.26
|
128
120
|
signing_key:
|
129
121
|
specification_version: 4
|
130
122
|
summary: Pyroscope
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|