Skip to content

Commit 5ad73b3

Browse files
committed
chore(ffi): add README.md files for Ruby/Python
1 parent fc680cf commit 5ad73b3

File tree

2 files changed

+104
-9
lines changed

2 files changed

+104
-9
lines changed

pyroscope_ffi/python/README.md

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,61 @@
1-
Pyroscope for Python
2-
====================
1+
Pyroscope Python Integration --Beta--
2+
=====================================
33

4-
build
4+
**note**: This is a beta release. It requires local compilation, might be
5+
buggy and is frequently updated. For the initial implementation, find it [here](https://github.com/pyroscope-io/pyroscope-python). Please report any [issues](https://github.com/pyroscope-io/pyroscope-rs/issues).
6+
7+
## Installation
8+
9+
1. You need the Rust toolchain to compile the library locally. To install
10+
Rust:
11+
12+
```
13+
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
14+
export PATH=$PATH:/root/.cargo/bin
15+
```
16+
17+
2. libunwind8-dev is also required. For Ubuntu:
518

619
```
7-
python -m build
20+
apt-get install -y libunwind8-dev
821
```
922

10-
upload
23+
3. Building/Insalling from PyPi package
24+
25+
```
26+
pip install pyroscope_beta
27+
```
28+
29+
4. Building/Installing from source
30+
31+
Change directory to `pyroscope_ffi/python` and run
32+
33+
```
34+
make install
35+
```
36+
37+
## Configuration
38+
39+
Configuration is similar to the old package except for `application_name`:
40+
41+
```
42+
import pyroscope_beta
43+
44+
pyroscope_beta.configure(
45+
application_name = "python.app",
46+
server_address = "http://localhost:4040",
47+
48+
tags = {
49+
"key": "value",
50+
}
51+
)
52+
```
53+
54+
## Adding tags
55+
56+
Tags passed to configure are global. To tag code locally, you can use:
1157

1258
```
13-
twine upload dist/*
59+
with pyroscope_beta.tag_wrapper({ "profile": "profile-1" }):
60+
// Tagged profile
1461
```

pyroscope_ffi/ruby/README.md

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,57 @@
1-
Building
1+
Pyroscope Ruby Integration --Beta--
2+
=====================================
3+
4+
**note**: This is a beta release. It requires local compilation, might be
5+
buggy and is frequently updated. For the initial implementation, find it [here](https://github.com/pyroscope-io/pyroscope-ruby). Please report any [issues](https://github.com/pyroscope-io/pyroscope-rs/issues).
6+
7+
## Installation
8+
9+
1. You need the Rust toolchain to compile the library locally. To install
10+
Rust:
11+
12+
```
13+
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
14+
export PATH=$PATH:/root/.cargo/bin
15+
```
16+
17+
2. Building/Insalling from Rubygems
18+
19+
```
20+
gem install pyroscope_beta
21+
```
22+
23+
3. Building/Installing from source
24+
25+
Change directory to `pyroscope_ffi/ruby` and run
26+
227
```
328
gem build pyroscope.gemspec
29+
gem install ./pyroscope.gemspec
30+
```
31+
32+
## Configuration
33+
34+
Configuration is similar to the old package except for `application_name`:
35+
36+
```
37+
require 'pyroscope_beta'
38+
39+
Pyroscope.configure do |config|
40+
config.application_name = "ruby.app"
41+
config.server_address = "http://localhost:4040"
42+
config.detect_subprocesses = true
43+
config.tags = {
44+
:key => "value",
45+
}
46+
end
447
```
548

6-
Install
49+
## Adding tags
50+
51+
Tags passed to configure are global. To tag code locally, you can use:
52+
753
```
8-
gem install ./pyroscope.gem
54+
Pyroscope.tag_wrapper({"profile": "profile-1"}) do
55+
// Tagged profile
56+
end
957
```

0 commit comments

Comments
 (0)