Skip to content
 
 

Repository files navigation

lightstep-tracer-python

PyPI Circle CI MIT license

The LightStep distributed tracing library for Python.

Installation

apt-get install python-dev
pip install lightstep

Getting started

Please see the example programs for examples of how to use this library. In particular:

You can run the examples by doing:

tox
source .tox/py27/bin/activate
python examples/nontrivial/main.py

Or if your python code is already instrumented for OpenTracing, you can simply switch to LightStep's implementation with:

import opentracing
import lightstep

if __name__ == "__main__":
  opentracing.tracer = lightstep.Tracer(
    component_name='your_microservice_name',
    access_token='{your_access_token}')

  with opentracing.tracer.start_span('TestSpan') as span:
    span.log_event('test message', payload={'life': 42})

  opentracing.tracer.flush()

This library is the LightStep binding for OpenTracing. See the OpenTracing Python API for additional detail.

About

The LightStep distributed tracing library for Python

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages