Skip to content

thepaulm/jaeger-client-python

 
 

Repository files navigation

Build Status Coverage Status PyPI version

Jaeger Bindings for Python OpenTracing API

This is a client-side library that can be used to instrument Python apps for distributed trace collection, and to send those traces to Jaeger. See the OpenTracing Python API for additional detail.

Installation

apt-get install python-dev
pip install jaeger-client

Getting Started

(under construction)

If your python code is already instrumented for OpenTracing, you can simply switch to Jaeger's implementation with:

from jaeger_client import Config, initializer

if __name__ == "__main__":
  config = Config(config={},  # usually read from some yaml config
                  service_name='your-app-name')
  initializer.initialize_with_local_agent(config=config)

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

  opentracing.tracer.close()  # flush any buffered spans

Configuration

(under construction)

See Config class.

License

The MIT License.

About

Jaeger Bindings for Python OpenTracing API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.0%
  • Makefile 2.0%