Skip to main content

Pinpoint Python Agent

License Python

The Python Agent for Pinpoint APM, an open-source Application Performance Management tool for large-scale distributed systems.

Pinpoint Python Agent enables you to monitor Python applications using Pinpoint. Name your application, start it through pinpoint-run, and 35 first-party integrations — web frameworks, HTTP clients, databases, caches, message queues — collect traces, analyze distributed call chains, and visualize service maps in the Pinpoint Web UI, with no changes to your code. The tracing hot path runs in the embedded pinpoint-cpp-agent.

Requirements

Requirement Version
Pinpoint Collector 3.1.0+
Python 3.11+ (CPython)
OS Linux, macOS (Windows is not supported)

Wheels bundle the native extension, so nothing is compiled at install time. An sdist install builds it and additionally needs CMake ≥ 3.21 and a C++17 compiler.

Installation

pip install pinpoint-python-agent

Building from Source

Clone the repository with its submodules (the C++ agent lives in a git submodule):

git clone --recurse-submodules https://github.com/pinpoint-apm/pinpoint-python-agent.git

Or, if you already cloned without the flag:

git submodule update --init --recursive third_party/pinpoint-cpp-agent

Then install from the checkout:

pip install .

See the Development Guide for building the extension in place, running the test suite, and the dev shell that resolves the native libraries.

Getting Started

Zero-code: pinpoint-run

The launcher starts the agent before any of your code runs and activates auto-instrumentation for every supported library your application imports:

pinpoint-run --app-name my-service --agent-name my-service-web \
    --collector localhost -- python my_app.py

In-code: init() + autoload()

Call init() early in startup, then activate auto-instrumentation. Libraries already imported are instrumented immediately; everything else the moment it is imported.

import pinpoint
import pinpoint.autoload

pinpoint.init(
    application_name="my-service",   # required
    agent_name="my-service-web",     # optional display label
    server_info="Flask",             # server metadata shown in the UI
    collector_host="localhost",
)
pinpoint.autoload.autoload()

import flask
app = flask.Flask(__name__)

Configuration comes from init() kwargs, PINPOINT_PY_* environment variables, or a YAML config file — see the Configuration Guide for every option and the precedence rules.

Manual tracing

For code paths no integration covers — cron jobs, queue consumers, in-house workers — open a span or a span event with the decorators:

import pinpoint

@pinpoint.span("nightly_billing", rpc_point="/cron/billing")   # a new transaction
def nightly_billing():
    charge(100)

@pinpoint.spanevent("billing.charge")                          # a child of the current span
def charge(amount):
    ...

Both work on async def too. Background hand-offs, context managers, annotations and header propagation are covered in the Custom Instrumentation Guide.

Examples

The examples/ directory holds one subdirectory per integration — the demo application plus a run.sh that starts its backing container and smoke-tests the stack. Each demo's module docstring carries its exact pinpoint-run command and a curl to hit it.

Documentation

Document Description
Getting Started Guide Step-by-step setup: install, configure, first traced request
Configuration Guide Every option, as an init() kwarg, environment variable and config-file key, with precedence rules
Auto-Instrumentation Catalog The 35 supported libraries, what each records, and how to turn one off
Custom Instrumentation Guide Python API reference: spans, span events, annotations, async hand-offs, distributed tracing
API Contracts Threading, end-exactly-once and overflow rules the agent enforces on spans, events and annotations
Pre-fork Integration Guide Running the agent under gunicorn, uWSGI and multiprocessing
Troubleshooting Startup verification, agent logs, common issues and solutions
Development Guide Contributors: building the native extension from source, running the tests, and adding a bundled integration

Contributing

We are looking forward to your contributions via pull requests.

To report bugs or request features, please create an Issue.

Community

License

Pinpoint Python Agent is licensed under the Apache License, Version 2.0. See LICENSE for full license text.

Metadata

Release files for pinpoint-python-agent 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pinpoint-python-agent 1.0.0
File Size Uploaded Provenance
pinpoint_python_agent-1.0.0.tar.gz 1.1 MB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for pinpoint-python-agent 1.0.0
File
pinpoint_python_agent-1.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
pinpoint_python_agent-1.0.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
pinpoint_python_agent-1.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
pinpoint_python_agent-1.0.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
pinpoint_python_agent-1.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
pinpoint_python_agent-1.0.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
pinpoint_python_agent-1.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
pinpoint_python_agent-1.0.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details

Total release size: 122.1 MB

Release files / pinpoint_python_agent-1.0.0.tar.gz

Download URL pinpoint_python_agent-1.0.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
9ea7a45ec2e943dbef9c410bf0ebb6c1cdff3d1438858af0f1775dd7a47a8f3e
BLAKE2b-256 checksum
How to use checksums
db5ae38a39bd8186d9dc181b1c6c797d21fe5286d8c6bc13924905f0c8ad198f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pinpoint_python_agent-1.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pinpoint_python_agent-1.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 21.0 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ab9360b4bda2f3102c577b2bf100c5122b44a0a70c28ed5ca21bf60ab5230f5b
BLAKE2b-256 checksum
How to use checksums
f9c2bcc4babc1fa362d722469f88dceee49c0b28048bf66bfd5d2b3b6c3397e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pinpoint_python_agent-1.0.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL pinpoint_python_agent-1.0.0-cp314-cp314-macosx_11_0_arm64.whl
Size 9.3 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6cd38bdb0a8df210138fcb309475c2196be05e301ca91d042c0b50dbeffca0de
BLAKE2b-256 checksum
How to use checksums
4d449a7400798093cc7549e0f9bcf49409d3b07183e91d17d84d0d4b27a821c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pinpoint_python_agent-1.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pinpoint_python_agent-1.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 21.0 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a9862a4070d155ed408668d88368486a6a6405f9535cb3636847535dc8dcfbc7
BLAKE2b-256 checksum
How to use checksums
32311774a01c394d8776899e5fcdc80cf8416a11acb71b97ea00ea82b6a1312b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pinpoint_python_agent-1.0.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL pinpoint_python_agent-1.0.0-cp313-cp313-macosx_11_0_arm64.whl
Size 9.3 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b3940cb6fd644d1ae8326d652de9b5eed9c7c0e476fe06a152dbd7ebe642e8dd
BLAKE2b-256 checksum
How to use checksums
a0836b34835c45e780c6d26856ec3a867842b3f98e597d98cc5370d642a5038a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pinpoint_python_agent-1.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pinpoint_python_agent-1.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 21.0 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e6dcf2625ded2f083e76f3a1a431caac18cc21fec83c5b2f32be9e85dd7df95d
BLAKE2b-256 checksum
How to use checksums
470d1e5b7f2cfb417766d800f7bff8b66252b7d9016b327dd123e33a59ad42d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pinpoint_python_agent-1.0.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL pinpoint_python_agent-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
Size 9.3 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
27bb210b332fb0f23fca2efa07a2f5a14708ead48353776f298d1b5727b870dd
BLAKE2b-256 checksum
How to use checksums
bfc9743b7a5c2019c7a71c438708bb0d17e8a08b3dafad0519ce2e4e08bf36ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pinpoint_python_agent-1.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pinpoint_python_agent-1.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 21.0 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
dd6bc191d1a80b6c27d97dad9fe8704ffe246dee0a98ac99a817f12763fccebb
BLAKE2b-256 checksum
How to use checksums
e61c20aef9d662b0e53abad6fd8c0a0ff9b418e0f7d07f954677341be6a047cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pinpoint_python_agent-1.0.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL pinpoint_python_agent-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Size 9.3 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2d76511e0869d4f8515ebb5d83e1a923a7e23236b60ddfdbc38cc4c7196bae08
BLAKE2b-256 checksum
How to use checksums
094c92eb66546b740d0798ff4f4f62738e99eebbc54aa2cce769e77ac5facab3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for pinpoint-python-agent 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page