Skip to content

nornagon/xray-python-opentracing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIP: xray-python-opentracing

MIT license

Python OpenTracing implementation for AWS X-Ray, a distributed tracing system.

WIP (but it works for us). Heavily based on the excellent LightStep Tracer.

Installation

xray-python-opentracing is not yet on PyPI, but you can add the following line to your requirements.txt:

git+git://github.com/nornagon/xray-python-opentracing.git@9a40fbc

Getting started

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

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

import opentracing
import xray_ot

if __name__ == "__main__":
  opentracing.tracer = xray_ot.Tracer(
    component_name='your_microservice_name',
    collector_host='127.0.0.1',
    collector_port=2000)

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

  opentracing.tracer.flush()

This library is an AWS X-Ray binding for OpenTracing. See the OpenTracing Python API for additional detail.

About

OpenTracing adapter for AWS X-Ray

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages