Skip to main content

Pyroscope Python integration

Project description

Pyroscope Python Integration

note: This is an early release. It might require local compilation, might be buggy and will be frequently updated. For the initial implementation, revert to version 2.x.

Installation

  1. You need the Rust toolchain to compile the library locally. To install Rust:
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y 
export PATH=$PATH:/root/.cargo/bin
  1. libunwind8-dev is also required. For Ubuntu:
apt-get install -y libunwind8-dev 
  1. Building/Insalling from PyPi package
pip install pyroscope_beta
  1. Building/Installing from source

Change directory to pyroscope_ffi/python and run

make install

Configuration

Configuration is similar to the old package except for application_name:

import pyroscope

pyroscope.configure(
  application_name       = "python.app",
  server_address         = "http://localhost:4040",

  tags = {
    "key": "value",
  }
)

Adding tags

Tags passed to configure are global. To tag code locally, you can use:

with pyroscope.tag_wrapper({ "profile": "profile-1" }):
    // Tagged profile

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyroscope-io-0.7.0.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distributions

pyroscope_io-0.7.0-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.5 MB view hashes)

Uploaded Python 2 Python 3 manylinux: glibc 2.17+ ARM64

pyroscope_io-0.7.0-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (5.1 MB view hashes)

Uploaded Python 2 Python 3 manylinux: glibc 2.12+ x86-64

pyroscope_io-0.7.0-py2.py3-none-macosx_11_0_arm64.whl (2.3 MB view hashes)

Uploaded Python 2 Python 3 macOS 11.0+ ARM64

pyroscope_io-0.7.0-py2.py3-none-macosx_10_15_x86_64.whl (2.3 MB view hashes)

Uploaded Python 2 Python 3 macOS 10.15+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page