LightStep Streaming: Our Streaming Python Tracer
The Streaming Python Tracer, is an OpenTracing tracer which sends data to LightStep Satellites.
This tracer sends data to multiple Satellites concurrently using non-blocking I/O writes. Memory is carefully managed so that spans are only copied a single time during the reporting process and streamed to Satellites as they are generated to avoid filling up memory. The Streaming Python Tracer is written in C++. There is a thin Python wrapper around this C++ core so the library can be imported just like any other Python module.
Setup
If you aren't familiar with OpenTracing or LightStep, we recommend reading up before continuing.
Before installing, make sure that you system meets these requirements:
- Linux
- Python 2.7 or >= 3.2.0 (and pip)
- opentracing PyPI Module (>=2.2.0)
To install the Streaming Python Tracer, run pip install lightstep-streaming.
Getting Started
The beauty of OpenTracing is that all tracers follow a well-defined API. The only step which varies from tracer to tracer is the setup step when lightstep_streaming.Tracer's constructor is called. Below is a sample program which illustrates how to create a new Tracer object using the Streaming Python Tracer. For more details on how to use a Tracer object once it has been created, checkout the OpenTracing Python API Guide.
import lightstep_streaming
tracer = lightstep_streaming.Tracer(
component_name='[your service name]',
access_token='[your LightStep access token]',
# Use these defaults unless you know what you're doing
use_stream_recorder=True,
collector_plaintext=True,
# You can put any number of Satellite endpoints in this list and the tracer
# will rotate through them and send spans to each one.
satellite_endpoints=[{'host': 'localhost', 'port': 8360}],
# Turns off verbose logging, which is really only useful for debugging.
verbose=False
)
# Generates one span
with tracer.start_active_span('[your operation name]'):
pass
# Makes sure that the tracer has sent the span to a Satellite
tracer.flush()
A complete list of Streaming Python Tracer configuration parameters can be found in tracer_configuration.schema.json. If you are interested in peeking at the source code, this is available in the LightStep C++ Tracer repo.
Metadata
Release files for lightstep-streaming 0.14.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lightstep_streaming-0.14.0-cp32-abi3-manylinux1_x86_64.whl | CPython 3.2 | abi3 | Linux glibc 2.5+ x86-64 | Details |
| lightstep_streaming-0.14.0-cp27-cp27mu-manylinux1_x86_64.whl | CPython 2.7 | CPython 2.7 pymalloc wide-unicode | Linux glibc 2.5+ x86-64 | Details |
| lightstep_streaming-0.14.0-cp27-cp27m-manylinux1_x86_64.whl | CPython 2.7 | CPython 2.7 pymalloc | Linux glibc 2.5+ x86-64 | Details |
Total release size: 3.0 MB
Release files / lightstep_streaming-0.14.0-cp32-abi3-manylinux1_x86_64.whl
| Download URL | lightstep_streaming-0.14.0-cp32-abi3-manylinux1_x86_64.whl |
|---|---|
| Size | 994.2 kB |
| Tags | CPython 3.2 Linux glibc 2.5+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
bd1e28655c6916c65886f0f494218098aa51b3dd55a879e750abc3b1d98c6f20
|
|
BLAKE2b-256 checksum How to use checksums |
7504b26ef51829ad7b86cbde2c06060431abded440d2aeba4953255495039dc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/2.7.17
|
Release files / lightstep_streaming-0.14.0-cp27-cp27mu-manylinux1_x86_64.whl
| Download URL | lightstep_streaming-0.14.0-cp27-cp27mu-manylinux1_x86_64.whl |
|---|---|
| Size | 993.9 kB |
| Tags | CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
9dbea42825c2bf4dc9d773f936b067e9b24dbe6dcd6e0d26bbf85b7f8605aaad
|
|
BLAKE2b-256 checksum How to use checksums |
88e73f1c9eafb3525a4626f9ad95ba720c0caad23309b47edfcd905ee0a6f5c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/2.7.17
|
Release files / lightstep_streaming-0.14.0-cp27-cp27m-manylinux1_x86_64.whl
| Download URL | lightstep_streaming-0.14.0-cp27-cp27m-manylinux1_x86_64.whl |
|---|---|
| Size | 994.0 kB |
| Tags | CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
b6bd25f88a5b34ccc695fa013f72feb626483fccd063e16c9dfd4d1b6450f86e
|
|
BLAKE2b-256 checksum How to use checksums |
520b4257ef28a3a4ed5f506946d1bef9c64db8e87876b58607afeda1f257e83c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/2.7.17
|
Security for lightstep-streaming 0.14.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.