pyroscope 0.5.10 → 0.5.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/Gemfile.lock +23 -0
- data/ext/rbspy/Cargo.toml +1 -6
- data/ext/rbspy/include/rbspy.h +43 -0
- data/ext/rbspy/src/lib.rs +1 -8
- data/ext/thread_id/Cargo.toml +1 -7
- data/ext/thread_id/include/thread_id.h +17 -0
- data/lib/pyroscope/version.rb +1 -1
- data/pyroscope.gemspec +27 -2
- metadata +7 -16
- data/elflib/rbspy/manylinux.sh +0 -19
- data/elflib/rbspy/pyproject.toml +0 -7
- data/elflib/rbspy/rbspy/__init__.py +0 -0
- data/elflib/rbspy/setup.cfg +0 -22
- data/elflib/rbspy/setup.py +0 -46
- data/elflib/thread_id/manylinux.sh +0 -19
- data/elflib/thread_id/pyproject.toml +0 -7
- data/elflib/thread_id/setup.cfg +0 -22
- data/elflib/thread_id/setup.py +0 -46
- data/elflib/thread_id/thread_id/__init__.py +0 -0
- data/ext/rbspy/Cargo.lock +0 -2667
- data/ext/thread_id/Cargo.lock +0 -324
- data/scripts/docker.sh +0 -23
- data/scripts/tests/test.rb +0 -59
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f4d2d213f949dffb4933304f22e7a6af1ca02387ff0afafde8e830dc35c1add
|
4
|
+
data.tar.gz: 2ca02599cdce5a25e338e6d63640f39147ff42f8f6787b69bc624e7eaaf2a63c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20aeb6507caba5e65653b6498af8a41553dd569c871d6a974de3fc4dac124e09aad058a019b48e0f7515bfcb4f6de9d9bf72581c8d91e4a6420cd62bba7cd97a
|
7
|
+
data.tar.gz: 9d14d59c0183d982c4051813667897f3840f47f83b8fe88702cd56c07e8e478bf44ca08d4b21695badfba4e7bb35da85e4455b540eda4f888a850517f83e0ea2
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
pyroscope (0.5.11)
|
5
|
+
ffi
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ffi (1.16.3)
|
11
|
+
rake (13.2.0)
|
12
|
+
|
13
|
+
PLATFORMS
|
14
|
+
ruby
|
15
|
+
x86_64-linux
|
16
|
+
|
17
|
+
DEPENDENCIES
|
18
|
+
bundler
|
19
|
+
pyroscope!
|
20
|
+
rake (~> 13.0)
|
21
|
+
|
22
|
+
BUNDLED WITH
|
23
|
+
2.5.3
|
data/ext/rbspy/Cargo.toml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name = "rbspy"
|
3
3
|
version = "0.1.0"
|
4
4
|
edition = "2021"
|
5
|
-
rust-version = "1.
|
5
|
+
rust-version = "1.64"
|
6
6
|
|
7
7
|
[lib]
|
8
8
|
name = "rbspy"
|
@@ -19,8 +19,3 @@ log = "0.4"
|
|
19
19
|
[build-dependencies]
|
20
20
|
cbindgen = "0.20.0"
|
21
21
|
|
22
|
-
[profile.release]
|
23
|
-
opt-level= "z"
|
24
|
-
debug = false
|
25
|
-
lto = true
|
26
|
-
codegen-units = 1
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/* Licensed under Apache-2.0 */
|
2
|
+
|
3
|
+
#ifndef RBSPY_H_
|
4
|
+
#define RBSPY_H_
|
5
|
+
|
6
|
+
/* Generated with cbindgen:0.20.0 */
|
7
|
+
|
8
|
+
/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */
|
9
|
+
|
10
|
+
#include <stdarg.h>
|
11
|
+
#include <stdbool.h>
|
12
|
+
#include <stdint.h>
|
13
|
+
#include <stdlib.h>
|
14
|
+
|
15
|
+
bool initialize_logging(uint32_t logging_level);
|
16
|
+
|
17
|
+
bool initialize_agent(const char *application_name,
|
18
|
+
const char *server_address,
|
19
|
+
const char *auth_token,
|
20
|
+
const char *basic_auth_user,
|
21
|
+
const char *basic_auth_password,
|
22
|
+
uint32_t sample_rate,
|
23
|
+
bool detect_subprocesses,
|
24
|
+
bool oncpu,
|
25
|
+
bool report_pid,
|
26
|
+
bool report_thread_id,
|
27
|
+
const char *tags,
|
28
|
+
const char *compression,
|
29
|
+
const char *_report_encoding,
|
30
|
+
const char *tenant_id,
|
31
|
+
const char *http_headers_json);
|
32
|
+
|
33
|
+
bool drop_agent(void);
|
34
|
+
|
35
|
+
bool add_thread_tag(uint64_t thread_id, const char *key, const char *value);
|
36
|
+
|
37
|
+
bool remove_thread_tag(uint64_t thread_id, const char *key, const char *value);
|
38
|
+
|
39
|
+
bool add_global_tag(const char *key, const char *value);
|
40
|
+
|
41
|
+
bool remove_global_tag(const char *key, const char *value);
|
42
|
+
|
43
|
+
#endif /* RBSPY_H_ */
|
data/ext/rbspy/src/lib.rs
CHANGED
@@ -122,7 +122,7 @@ pub extern "C" fn initialize_agent(
|
|
122
122
|
report_thread_id: bool,
|
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 {
|
@@ -169,11 +169,6 @@ pub extern "C" fn initialize_agent(
|
|
169
169
|
.unwrap()
|
170
170
|
.to_string();
|
171
171
|
|
172
|
-
let report_encoding = unsafe { CStr::from_ptr(report_encoding) }
|
173
|
-
.to_str()
|
174
|
-
.unwrap()
|
175
|
-
.to_string();
|
176
|
-
|
177
172
|
let tenant_id = unsafe { CStr::from_ptr(tenant_id) }
|
178
173
|
.to_str()
|
179
174
|
.unwrap()
|
@@ -185,8 +180,6 @@ pub extern "C" fn initialize_agent(
|
|
185
180
|
.to_string();
|
186
181
|
|
187
182
|
let compression = Compression::from_str(&compression_string);
|
188
|
-
let report_encoding = ReportEncoding::from_str(&report_encoding)
|
189
|
-
.unwrap_or(ReportEncoding::FOLDED);
|
190
183
|
|
191
184
|
let pid = std::process::id();
|
192
185
|
|
data/ext/thread_id/Cargo.toml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name = "thread_id"
|
3
3
|
version = "0.1.0"
|
4
4
|
edition = "2021"
|
5
|
-
rust-version = "1.
|
5
|
+
rust-version = "1.64"
|
6
6
|
|
7
7
|
[lib]
|
8
8
|
name = "thread_id"
|
@@ -13,9 +13,3 @@ libc = "*"
|
|
13
13
|
|
14
14
|
[build-dependencies]
|
15
15
|
cbindgen = "0.20.0"
|
16
|
-
|
17
|
-
[profile.release]
|
18
|
-
opt-level= "z"
|
19
|
-
debug = false
|
20
|
-
lto = true
|
21
|
-
codegen-units = 1
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/* Licensed under Apache-2.0 */
|
2
|
+
|
3
|
+
#ifndef RBSPY_H_
|
4
|
+
#define RBSPY_H_
|
5
|
+
|
6
|
+
/* Generated with cbindgen:0.20.0 */
|
7
|
+
|
8
|
+
/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */
|
9
|
+
|
10
|
+
#include <stdarg.h>
|
11
|
+
#include <stdbool.h>
|
12
|
+
#include <stdint.h>
|
13
|
+
#include <stdlib.h>
|
14
|
+
|
15
|
+
uint64_t thread_id(void);
|
16
|
+
|
17
|
+
#endif /* RBSPY_H_ */
|
data/lib/pyroscope/version.rb
CHANGED
data/pyroscope.gemspec
CHANGED
@@ -31,8 +31,33 @@ Gem::Specification.new do |s|
|
|
31
31
|
#(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
32
32
|
#end
|
33
33
|
#end
|
34
|
-
|
35
|
-
|
34
|
+
# s.files = `git ls-files -z`.split("\0").reject { |f| f =~ /^(\.|G|spec|Rakefile)/ }
|
35
|
+
s.files = [
|
36
|
+
"Gemfile",
|
37
|
+
"Gemfile.lock",
|
38
|
+
"LICENSE",
|
39
|
+
# "Makefile",
|
40
|
+
"README.md",
|
41
|
+
# "Rakefile",
|
42
|
+
"ext/rbspy/Cargo.toml",
|
43
|
+
"ext/rbspy/Rakefile",
|
44
|
+
"ext/rbspy/build.rs",
|
45
|
+
"ext/rbspy/cbindgen.toml",
|
46
|
+
"ext/rbspy/extconf.rb",
|
47
|
+
"ext/rbspy/include/rbspy.h",
|
48
|
+
"ext/rbspy/src/lib.rs",
|
49
|
+
"ext/thread_id/Cargo.toml",
|
50
|
+
"ext/thread_id/Rakefile",
|
51
|
+
"ext/thread_id/build.rs",
|
52
|
+
"ext/thread_id/cbindgen.toml",
|
53
|
+
"ext/thread_id/extconf.rb",
|
54
|
+
"ext/thread_id/include/thread_id.h",
|
55
|
+
"ext/thread_id/src/lib.rs",
|
56
|
+
"lib/pyroscope.rb",
|
57
|
+
"lib/pyroscope/version.rb",
|
58
|
+
"pyroscope.gemspec",
|
59
|
+
# "scripts/tests/test.rb",
|
60
|
+
]
|
36
61
|
s.platform = Gem::Platform::RUBY
|
37
62
|
|
38
63
|
s.required_ruby_version = ">= 1.9.3"
|
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.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pyroscope Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -24,6 +24,7 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
force_ruby_platform: false
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
29
|
name: bundler
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -61,37 +62,27 @@ extensions:
|
|
61
62
|
- ext/thread_id/extconf.rb
|
62
63
|
extra_rdoc_files: []
|
63
64
|
files:
|
65
|
+
- Gemfile
|
66
|
+
- Gemfile.lock
|
64
67
|
- LICENSE
|
65
68
|
- README.md
|
66
|
-
- elflib/rbspy/manylinux.sh
|
67
|
-
- elflib/rbspy/pyproject.toml
|
68
|
-
- elflib/rbspy/rbspy/__init__.py
|
69
|
-
- elflib/rbspy/setup.cfg
|
70
|
-
- elflib/rbspy/setup.py
|
71
|
-
- elflib/thread_id/manylinux.sh
|
72
|
-
- elflib/thread_id/pyproject.toml
|
73
|
-
- elflib/thread_id/setup.cfg
|
74
|
-
- elflib/thread_id/setup.py
|
75
|
-
- elflib/thread_id/thread_id/__init__.py
|
76
|
-
- ext/rbspy/Cargo.lock
|
77
69
|
- ext/rbspy/Cargo.toml
|
78
70
|
- ext/rbspy/Rakefile
|
79
71
|
- ext/rbspy/build.rs
|
80
72
|
- ext/rbspy/cbindgen.toml
|
81
73
|
- ext/rbspy/extconf.rb
|
74
|
+
- ext/rbspy/include/rbspy.h
|
82
75
|
- ext/rbspy/src/lib.rs
|
83
|
-
- ext/thread_id/Cargo.lock
|
84
76
|
- ext/thread_id/Cargo.toml
|
85
77
|
- ext/thread_id/Rakefile
|
86
78
|
- ext/thread_id/build.rs
|
87
79
|
- ext/thread_id/cbindgen.toml
|
88
80
|
- ext/thread_id/extconf.rb
|
81
|
+
- ext/thread_id/include/thread_id.h
|
89
82
|
- ext/thread_id/src/lib.rs
|
90
83
|
- lib/pyroscope.rb
|
91
84
|
- lib/pyroscope/version.rb
|
92
85
|
- pyroscope.gemspec
|
93
|
-
- scripts/docker.sh
|
94
|
-
- scripts/tests/test.rb
|
95
86
|
homepage: https://pyroscope.io
|
96
87
|
licenses:
|
97
88
|
- Apache-2.0
|
data/elflib/rbspy/manylinux.sh
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
set -ex
|
3
|
-
|
4
|
-
cargo --version
|
5
|
-
|
6
|
-
# Build wheels
|
7
|
-
# todo this one is deprecated, use "build" package
|
8
|
-
/opt/python/cp37-cp37m/bin/python setup.py bdist_wheel
|
9
|
-
|
10
|
-
# Audit wheels
|
11
|
-
for wheel in dist/*.whl; do
|
12
|
-
auditwheel repair $wheel -w dist/
|
13
|
-
rm $wheel
|
14
|
-
done
|
15
|
-
|
16
|
-
# Extract wheels
|
17
|
-
for wheel in dist/*.whl; do
|
18
|
-
/opt/python/cp37-cp37m/bin/wheel unpack $wheel -d wheelhouse
|
19
|
-
done
|
data/elflib/rbspy/pyproject.toml
DELETED
File without changes
|
data/elflib/rbspy/setup.cfg
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
[metadata]
|
2
|
-
name = rbspy
|
3
|
-
version= 1.0.0
|
4
|
-
description = Fake wheel to generate audtiwheel libs
|
5
|
-
url = https://proscope.io
|
6
|
-
maintainer = Abid Omar
|
7
|
-
maintainer_email = contact@pyroscope.io
|
8
|
-
license = Apache 2.0
|
9
|
-
classifiers =
|
10
|
-
Intended Audience :: Developers
|
11
|
-
project_urls =
|
12
|
-
Documentation = https://proscope.io
|
13
|
-
Bug Tracker = https://proscope.io
|
14
|
-
Discussions = https://proscope.io
|
15
|
-
Changelog = https://proscope.io
|
16
|
-
|
17
|
-
[options]
|
18
|
-
packages = find:
|
19
|
-
install_requires =
|
20
|
-
milksnakex>=0.1.6
|
21
|
-
include_package_data = True
|
22
|
-
zip_safe = False
|
data/elflib/rbspy/setup.py
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
import sys
|
3
|
-
from setuptools import find_packages, setup
|
4
|
-
from pathlib import Path
|
5
|
-
|
6
|
-
SCRIPT_DIR = Path(__file__).resolve().parent
|
7
|
-
|
8
|
-
os.chdir(SCRIPT_DIR)
|
9
|
-
|
10
|
-
# print script_dir
|
11
|
-
print(SCRIPT_DIR)
|
12
|
-
|
13
|
-
LIB_DIR = str(SCRIPT_DIR / "../../ext/rbspy")
|
14
|
-
|
15
|
-
def build_native(spec):
|
16
|
-
# Step 1: build the rust library
|
17
|
-
build = spec.add_external_build(
|
18
|
-
cmd=['cargo', 'build', '--release'],
|
19
|
-
path=LIB_DIR
|
20
|
-
)
|
21
|
-
|
22
|
-
def find_dylib():
|
23
|
-
cargo_target = os.environ.get('CARGO_BUILD_TARGET')
|
24
|
-
if cargo_target:
|
25
|
-
in_path = 'target/%s/release' % (cargo_target)
|
26
|
-
else:
|
27
|
-
in_path = 'target/release'
|
28
|
-
return build.find_dylib('rbspy', in_path=in_path)
|
29
|
-
|
30
|
-
# Step 2: package the compiled library
|
31
|
-
rtld_flags = ["NOW"]
|
32
|
-
if sys.platform == "darwin":
|
33
|
-
rtld_flags.append("NODELETE")
|
34
|
-
|
35
|
-
spec.add_cffi_module(module_path='rbspy._native',
|
36
|
-
dylib=find_dylib,
|
37
|
-
header_filename=lambda:
|
38
|
-
build.find_header('rbspy.h',in_path='include'),
|
39
|
-
rtld_flags=rtld_flags,
|
40
|
-
)
|
41
|
-
|
42
|
-
setup(
|
43
|
-
platforms="any",
|
44
|
-
milksnake_tasks=[build_native],
|
45
|
-
setup_requires=["milksnakex>=0.1.6"],
|
46
|
-
)
|
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
set -ex
|
3
|
-
|
4
|
-
cargo --version
|
5
|
-
|
6
|
-
# Build wheels
|
7
|
-
# todo this one is deprecated, use "build" package
|
8
|
-
/opt/python/cp37-cp37m/bin/python setup.py bdist_wheel
|
9
|
-
|
10
|
-
# Audit wheels
|
11
|
-
for wheel in dist/*.whl; do
|
12
|
-
auditwheel repair $wheel -w dist/
|
13
|
-
rm $wheel
|
14
|
-
done
|
15
|
-
|
16
|
-
# Extract wheels
|
17
|
-
for wheel in dist/*.whl; do
|
18
|
-
/opt/python/cp37-cp37m/bin/wheel unpack $wheel -d wheelhouse
|
19
|
-
done
|
data/elflib/thread_id/setup.cfg
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
[metadata]
|
2
|
-
name = thread_id
|
3
|
-
version= 1.0.0
|
4
|
-
description = Fake wheel to generate audtiwheel libs
|
5
|
-
url = https://proscope.io
|
6
|
-
maintainer = Abid Omar
|
7
|
-
maintainer_email = contact@pyroscope.io
|
8
|
-
license = Apache 2.0
|
9
|
-
classifiers =
|
10
|
-
Intended Audience :: Developers
|
11
|
-
project_urls =
|
12
|
-
Documentation = https://proscope.io
|
13
|
-
Bug Tracker = https://proscope.io
|
14
|
-
Discussions = https://proscope.io
|
15
|
-
Changelog = https://proscope.io
|
16
|
-
|
17
|
-
[options]
|
18
|
-
packages = find:
|
19
|
-
install_requires =
|
20
|
-
milksnakex>=0.1.6
|
21
|
-
include_package_data = True
|
22
|
-
zip_safe = False
|
data/elflib/thread_id/setup.py
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
import sys
|
3
|
-
from setuptools import find_packages, setup
|
4
|
-
from pathlib import Path
|
5
|
-
|
6
|
-
SCRIPT_DIR = Path(__file__).resolve().parent
|
7
|
-
|
8
|
-
os.chdir(SCRIPT_DIR)
|
9
|
-
|
10
|
-
# print script_dir
|
11
|
-
print(SCRIPT_DIR)
|
12
|
-
|
13
|
-
LIB_DIR = str(SCRIPT_DIR / "../../ext/thread_id")
|
14
|
-
|
15
|
-
def build_native(spec):
|
16
|
-
# Step 1: build the rust library
|
17
|
-
build = spec.add_external_build(
|
18
|
-
cmd=['cargo', 'build', '--release'],
|
19
|
-
path=LIB_DIR
|
20
|
-
)
|
21
|
-
|
22
|
-
def find_dylib():
|
23
|
-
cargo_target = os.environ.get('CARGO_BUILD_TARGET')
|
24
|
-
if cargo_target:
|
25
|
-
in_path = 'target/%s/release' % (cargo_target)
|
26
|
-
else:
|
27
|
-
in_path = 'target/release'
|
28
|
-
return build.find_dylib('thread_id', in_path=in_path)
|
29
|
-
|
30
|
-
# Step 2: package the compiled library
|
31
|
-
rtld_flags = ["NOW"]
|
32
|
-
if sys.platform == "darwin":
|
33
|
-
rtld_flags.append("NODELETE")
|
34
|
-
|
35
|
-
spec.add_cffi_module(module_path='thread_id._native',
|
36
|
-
dylib=find_dylib,
|
37
|
-
header_filename=lambda:
|
38
|
-
build.find_header('thread_id.h',in_path='include'),
|
39
|
-
rtld_flags=rtld_flags,
|
40
|
-
)
|
41
|
-
|
42
|
-
setup(
|
43
|
-
platforms="any",
|
44
|
-
milksnake_tasks=[build_native],
|
45
|
-
setup_requires=["milksnakex>=0.1.6"],
|
46
|
-
)
|
File without changes
|