Name | pyroscope-io JSON |
Version |
0.8.8
JSON |
| download |
home_page | https://pyroscope.io |
Summary | Pyroscope Python integration |
upload_time | 2024-11-22 10:25:05 |
maintainer | Abid Omar |
docs_url | None |
author | None |
requires_python | None |
license | Apache 2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Pyroscope Python Package
**Pyroscope integration for Python**
[![license](https://img.shields.io/badge/license-Apache2.0-blue.svg)](LICENSE)
![tests](https://github.com/pyroscope-io/pyroscope-rs/workflows/Tests/badge.svg)
![build](https://github.com/pyroscope-io/pyroscope-rs/workflows/Build/badge.svg)
[![PyPI version](https://badge.fury.io/py/pyroscope-io.svg)](https://badge.fury.io/py/pyroscope-io)
[![PyPI](https://img.shields.io/pypi/pyversions/pyroscope-io.svg?maxAge=2592000)](https://pypi.python.org/pypi/pyroscope-io)
---
### What is Pyroscope
[Pyroscope](https://github.com/pyroscope-io/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
```
### Minimal Configuration
Add the following code to your application. This code will initialize pyroscope profiler and start profiling:
```python
import pyroscope
pyroscope.configure(
application_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
)
```
### Full Configuration
Optionally, you can configure several parameters:
```python
import pyroscope
pyroscope.configure(
application_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
auth_token = "{YOUR_API_KEY}", # optional, if authentication is enabled, specify the API key
sample_rate = 100, # default is 100
detect_subprocesses = False, # detect subprocesses started by the main process; default is False
oncpu = True # report cpu time only; default is True
gil_only = True # only include traces for threads that are holding on to the Global Interpreter Lock; default is True
log_level = "info" # default is info, possible values: trace, debug, info, warn, error and critical
tags = {
"region": '{os.getenv("REGION")}',
}
)
```
### Tags
You can add tags to certain parts of your code:
```python
# You can use a wrapper:
with pyroscope.tag_wrapper({ "controller": "slow_controller_i_want_to_profile" }):
slow_code()
```
### Example
Check out this [example python project in our repository](https://github.com/pyroscope-io/pyroscope/tree/main/examples/python) for examples of how you can use these features.
Raw data
{
"_id": null,
"home_page": "https://pyroscope.io",
"name": "pyroscope-io",
"maintainer": "Abid Omar",
"docs_url": null,
"requires_python": null,
"maintainer_email": "contact@pyroscope.io",
"keywords": null,
"author": null,
"author_email": null,
"download_url": null,
"platform": "any",
"description": "# Pyroscope Python Package\n\n**Pyroscope integration for Python**\n\n[![license](https://img.shields.io/badge/license-Apache2.0-blue.svg)](LICENSE) \n![tests](https://github.com/pyroscope-io/pyroscope-rs/workflows/Tests/badge.svg)\n![build](https://github.com/pyroscope-io/pyroscope-rs/workflows/Build/badge.svg)\n[![PyPI version](https://badge.fury.io/py/pyroscope-io.svg)](https://badge.fury.io/py/pyroscope-io)\n[![PyPI](https://img.shields.io/pypi/pyversions/pyroscope-io.svg?maxAge=2592000)](https://pypi.python.org/pypi/pyroscope-io)\n\n\n---\n\n### What is Pyroscope\n[Pyroscope](https://github.com/pyroscope-io/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.\n\n\n### How to install Pyroscope for Python Applications\n```\npip install pyroscope-io\n```\n\n### Minimal Configuration\n\nAdd the following code to your application. This code will initialize pyroscope profiler and start profiling:\n\n```python\nimport pyroscope\n\npyroscope.configure(\n application_name = \"my.python.app\", # replace this with some name for your application\n server_address = \"http://my-pyroscope-server:4040\", # replace this with the address of your pyroscope server\n)\n```\n\n### Full Configuration\n\nOptionally, you can configure several parameters:\n\n```python\nimport pyroscope\n\npyroscope.configure(\n application_name = \"my.python.app\", # replace this with some name for your application\n server_address = \"http://my-pyroscope-server:4040\", # replace this with the address of your pyroscope server\n auth_token = \"{YOUR_API_KEY}\", # optional, if authentication is enabled, specify the API key\n sample_rate = 100, # default is 100\n detect_subprocesses = False, # detect subprocesses started by the main process; default is False\n oncpu = True # report cpu time only; default is True\n gil_only = True # only include traces for threads that are holding on to the Global Interpreter Lock; default is True\n log_level = \"info\" # default is info, possible values: trace, debug, info, warn, error and critical \n tags = {\n \"region\": '{os.getenv(\"REGION\")}',\n }\n)\n\n```\n\n### Tags\n\nYou can add tags to certain parts of your code:\n\n```python\n# You can use a wrapper:\nwith pyroscope.tag_wrapper({ \"controller\": \"slow_controller_i_want_to_profile\" }):\n slow_code()\n```\n\n### Example\n\nCheck out this [example python project in our repository](https://github.com/pyroscope-io/pyroscope/tree/main/examples/python) for examples of how you can use these features.\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Pyroscope Python integration",
"version": "0.8.8",
"project_urls": {
"Bug Tracker": "https://pyroscope.io",
"Changelog": "https://pyroscope.io",
"Discussions": "https://pyroscope.io",
"Documentation": "https://pyroscope.io",
"Homepage": "https://pyroscope.io"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d5cc0d04cc9ec00e7939aa4c7513baf064b9aadd71c761ee4d2b3824e2718922",
"md5": "95f7713fe004837f63598931e56b586d",
"sha256": "d33df6c2742eef9868897d199e4e1efec3f5d18377cc73d273b74f7f5e60ac4b"
},
"downloads": -1,
"filename": "pyroscope_io-0.8.8-py2.py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "95f7713fe004837f63598931e56b586d",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 2320598,
"upload_time": "2024-11-22T10:25:05",
"upload_time_iso_8601": "2024-11-22T10:25:05.939239Z",
"url": "https://files.pythonhosted.org/packages/d5/cc/0d04cc9ec00e7939aa4c7513baf064b9aadd71c761ee4d2b3824e2718922/pyroscope_io-0.8.8-py2.py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3bb622558093784c774abf3851b45153019a72c0eead37d29844ea49cbb7bf85",
"md5": "04f00ceddf65199e2593c3b29de64d95",
"sha256": "18058e9c15d8229db4208b48ed16544d18a31220e87d60c954d9d637de69696b"
},
"downloads": -1,
"filename": "pyroscope_io-0.8.8-py2.py3-none-macosx_11_0_x86_64.whl",
"has_sig": false,
"md5_digest": "04f00ceddf65199e2593c3b29de64d95",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 2470586,
"upload_time": "2024-11-22T10:25:07",
"upload_time_iso_8601": "2024-11-22T10:25:07.951890Z",
"url": "https://files.pythonhosted.org/packages/3b/b6/22558093784c774abf3851b45153019a72c0eead37d29844ea49cbb7bf85/pyroscope_io-0.8.8-py2.py3-none-macosx_11_0_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "61d328e5a1c74471dc00a59aae7ca2ecdd499d5fd2d282d6743ee109375a0711",
"md5": "09fedf11ac750a6323aea2dc05f1e2e8",
"sha256": "2312b55538deb240c1428591678ad9316a3f19af11bbcf15704d7d83c7adb7c7"
},
"downloads": -1,
"filename": "pyroscope_io-0.8.8-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"has_sig": false,
"md5_digest": "09fedf11ac750a6323aea2dc05f1e2e8",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 2520668,
"upload_time": "2024-11-22T10:25:09",
"upload_time_iso_8601": "2024-11-22T10:25:09.702333Z",
"url": "https://files.pythonhosted.org/packages/61/d3/28e5a1c74471dc00a59aae7ca2ecdd499d5fd2d282d6743ee109375a0711/pyroscope_io-0.8.8-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "683f55a14b1e8de36145c79a6bc92588f7cde1f93ccb08ba727b48ec5675a13c",
"md5": "56f2d85333b611537518ab647338755a",
"sha256": "422286f356d5be69bb0754671cb43c233a3fca68ac7c65c05451986f11bac0e3"
},
"downloads": -1,
"filename": "pyroscope_io-0.8.8-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "56f2d85333b611537518ab647338755a",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 2628011,
"upload_time": "2024-11-22T10:25:12",
"upload_time_iso_8601": "2024-11-22T10:25:12.276328Z",
"url": "https://files.pythonhosted.org/packages/68/3f/55a14b1e8de36145c79a6bc92588f7cde1f93ccb08ba727b48ec5675a13c/pyroscope_io-0.8.8-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-22 10:25:05",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pyroscope-io"
}