GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lightstep/lightstep-tracer-python: The Lightstep distributed tracing library for Python

BranchesTags
Open more actions menu

Latest commit

 

History

290 Commits
290 Commits

Folders and files

NameName
Last commit message
Last commit date
.circleci
.circleci
 
 
.github/workflows
.github/workflows
 
 
ci
ci
 
 
docs
docs
 
 
examples
examples
 
 
lightstep
lightstep
 
 
scripts
scripts
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
RELEASING.md
RELEASING.md
 
 
VERSION
VERSION
 
 
pylintrc
pylintrc
 
 
requirements-test.txt
requirements-test.txt
 
 
requirements.txt
requirements.txt
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 
tox.ini
tox.ini
 
 

Repository files navigation

lightstep-tracer-python

❗ This instrumentation is no longer recommended. Please review documentation on setting up and configuring the OpenTelemetry Python Launcher for more information on migrating to OpenTelemetry.

PyPI Circle CI MIT license

The LightStep distributed tracing library for Python.

Installation

apt-get install python-dev
pip install lightstep

Developer Setup

Prerequisites

  • PyEnv
pyenv install 2.7.15
pyenv install 3.4.9
pyenv install 3.5.6
pyenv install 3.6.6
pyenv install 3.7.0
pyenv local 2.7.15 3.4.9
  • Tox
tox
  • Run the examples:
source .tox/py37/bin/activate
python examples/nontrivial/main.py
  • Python-Modernize

Only required for LightStep developers

pip install modernize
  • Protobuf Python Compiler

Only required for LightStep developers

brew install protobuf
  • Generating the proto code
cd ..
git clone https://github.com/googleapis/googleapis.git
git clone https://github.com/lightstep/lightstep-tracer-common.git
cd lightstep-tracer-python
make proto

Getting Started with Tracing

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

  • Trivial Example shows how to use the library on a single host.
  • Context in Headers shows how to pass a TraceContext through HTTP headers.

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_active_span('TestSpan') as scope:
    scope.span.log_event('test message', payload={'life': 42})

  opentracing.tracer.flush()

Thrift

When using apache thrift rpc, make sure to both disable use_http by setting it to False as well as enabling use_thrift.

return lightstep.Tracer(
    ...
    use_http=False,
    use_thrift=True)

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

About

The Lightstep distributed tracing library for Python

lightstep.com

Topics

opentracing

Resources

Readme
MIT license

Contributing

Contributing
Activity
Custom properties

Stars

40 stars

Watchers

64 watching

Forks

15 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.