Pyroscope integration for Python
Project description
Pyroscope Python Integration
What is Pyroscope
Pyroscope is a tool that lets you continuously profile your applications to prevent and debug performance issues in your code. It consists of a low-overhead agent which sends data to the Pyroscope server which includes a custom-built storage engine. This allows for you to store and query any applications profiling data in an extremely efficient and cost effective way.
How to install Pyroscope for Python Applications
pip install pyroscope-io
Basic Usage of Pyroscope
import pyroscope_io as pyroscope
pyroscope.configure(
app_name = "my.python.app", # replace this with some name for your application
server_address = "http://my-pyroscope-server:4040", # replace this with the address of your pyroscope server
)
Adding Tags
Tags allow for users to view their data at different levels of granularity depending on what "slices" make sense for their application. This can be anything from region or microservice to more dynamic tags like controller or api route.
import os
import pyroscope_io as pyroscope
pyroscope.configure(
app_name = "simple.python.app",
server_address = "http://my-pyroscope-server:4040",
tags = {
"hostname": os.getenv("HOSTNAME"),
}
)
# You can use a wrapper:
with pyroscope.tag_wrapper({ "controller": "slow_controller_i_want_to_profile" }):
slow_code()
Examples
For more examples see examples/python in the main repo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pyroscope_io-0.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79b0bcc47b82668d7c2d520abf6503b7c3c7d39eabcc0c846939bb8f9d485151 |
|
MD5 | 4e4a90aa60fe7a0a5b197b60696522c0 |
|
BLAKE2b-256 | b9ffd9b70e63c97bf6f81174a01ab8ac363d9c9d3e8e56310d135c83d9a75157 |
Hashes for pyroscope_io-0.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8896165578385f4731f5b19a11e6fc4a5ec8761be4cf814ce9f954602a8cf806 |
|
MD5 | 5e10cef159612a203f76115722eef395 |
|
BLAKE2b-256 | 47cbae0908cb0243cc68596e53554268249d00a647d6d2dbcb675d22b4c0c386 |
Hashes for pyroscope_io-0.6.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8401cb48738d1c71d93a92554221cfbf0ac8cbbf0eb5874a7765e6e7a0eeb2ab |
|
MD5 | 51a68c79576c2fe4e71b4b6e6f892dad |
|
BLAKE2b-256 | 3c4ac0f03f078a23ae5b1a6d765e1be15a9abfa93921919b471e59f034d625b1 |
Hashes for pyroscope_io-0.6.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fe638c8014ce165338b260ed05acce1838deaa467452f5509ded99b6413e8ab |
|
MD5 | 3273e29b14ba05fcd9346f9120d6d2ab |
|
BLAKE2b-256 | dcc0b08c1c4d1e6543d2ef86171a9235d0ca6683a7c66a5292222e3c9d39e86c |
Hashes for pyroscope_io-0.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d62e753133f7ea208ebd3600a636f103f949c46e269e1fdf5e1c62950636e7a7 |
|
MD5 | e801af9d728db517096bd1e6b7990c44 |
|
BLAKE2b-256 | 639e6cc242fd74124e6e586b3a7bfb6b83631199e412b766c1a0fd83a36a8ce1 |
Hashes for pyroscope_io-0.6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1882f88c8a9c0e002aa0eb40d8f26a7bce3592bfce0822adc65a1833a4fb3d66 |
|
MD5 | 880579b7ce4cd340f257354294cc124e |
|
BLAKE2b-256 | a6f15ef6dfd1a1431369c0fa7c16ee7b858d3f767a171587d96bff22539efe1e |
Hashes for pyroscope_io-0.6.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4c061e2f3fd210039055194841d8e3171e7e77518bd7d1c09719005222869ec |
|
MD5 | 7fdc3d56bcc4bb454aee3fce442ebec8 |
|
BLAKE2b-256 | ed6318d3a7795048481f17971ceec8ab8c969cb1679cc24c3d53d20e5701f6f4 |
Hashes for pyroscope_io-0.6.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95f414cc53fc167cffafda45093ca8641320eb2bfbce8a3ba2fd5bec9fee8fb4 |
|
MD5 | 8ff0019b7bdfbda507bf079550bb76c3 |
|
BLAKE2b-256 | 282d41ecf8d13ade3526bbc9cd4037902ad4cd12fcc85a3a153cc8329ce8b7ea |
Hashes for pyroscope_io-0.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09260c8c9b6bf005a248a2b101a56799d5c7015bdac406d8e7c7bbd79d4aa45b |
|
MD5 | 3c979be79cfb92bc6ee02bada175e057 |
|
BLAKE2b-256 | 4cdc3d24ecd67f81ad5e8621faa0dc8881c60061344fbad3d6ef5108b44e8c08 |
Hashes for pyroscope_io-0.6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a437f9ec181cdac8b31041ff2a6a9f7330203304ef2841393428669d4931312c |
|
MD5 | b12a97b21370f87d917c3a6a3fcab402 |
|
BLAKE2b-256 | b55cd2215d263c638bdc8aa2b3530554b28b5694790aefa3ae25d1cbc2c27acf |
Hashes for pyroscope_io-0.6.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d3eed10de6fbcb92ca94a95b5076a64ca7a17454d877b45734a4ef9054b1743 |
|
MD5 | 4576f0a5d540ebed5dbcdd4b8025afe8 |
|
BLAKE2b-256 | fa5c5a5cf1803008c5dcf55940ff1f9c7f2cacce5350b044a79ad3601830a434 |
Hashes for pyroscope_io-0.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2537da358c72ec5c44de04ba4f2d0074204b489ffc5ee95c58251418848dbd8f |
|
MD5 | 0ff74c65a826566ea7249e1f24bc0153 |
|
BLAKE2b-256 | 08ccd095c7872d13f1c1057014fe9c6861ae3720c36cc4911249d6381479025a |
Hashes for pyroscope_io-0.6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edc812c8e192c8bd74c853f1fc1eb8d1b9ddc3ba52f4583d8048345adc87b695 |
|
MD5 | 230607b92a0e59da27e0237538b95d0d |
|
BLAKE2b-256 | 96f33d141aac0197befddd34ab85a3f4be70540fe74e70c8e186a9116a7a5c3a |