Create USDT probes and instrument your Python application dynamically.
# Dependencies
At the moment this package only runs on Linux and requires
[libstapsdt](https://github.com/sthima/libstapsdt) to be installed to create
runtime probes.
## Ubuntu 16.04
To install libstapsdt, run:
```bash
sudo add-apt-repository ppa:sthima/oss
sudo apt-get update
sudo apt-get install libstapsdt0 libstapsdt-dev
```
## Other
Build from [libstapsdt](https://github.com/sthima/libstapsdt).
# Install
```bash
pip install stapsdt
```
# Example
The following code will create a probe named `firstProbe`.
```python
from time import sleep
import stapsdt
provider = stapsdt.Provider("pythonapp")
probe = provider.add_probe(
"firstProbe", stapsdt.ArgTypes.uint64, stapsdt.ArgTypes.int32)
provider.load()
while True:
print("Firing probe...")
if probe.fire("My little probe", 42):
print("Probe fired!")
sleep(1)
```
You can then trace this probe with any tool able to trace Systemtap's probes.
Here's an example with eBPF/bcc:
```bash
sudo trace -p PID 'u::firstProbe "%s - %d", arg1, arg2'
```
Metadata
Release files for stapsdt 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stapsdt-0.1.1.tar.gz | 3.0 kB | Without provenance | Details for stapsdt-0.1.1.tar.gz |
Release files / stapsdt-0.1.1.tar.gz
| Download URL | stapsdt-0.1.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fabc2ca82a7c7f7307bd5326a1a1cace720aa6e1682a53afe09f6cb20218e636
|
|
BLAKE2b-256 checksum How to use checksums |
e271cb26f3dda412814e22b3ed538bac58379cdf2c003345579aefe7e0d13677
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for stapsdt 0.1.1
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.