{"id":18767792,"url":"https://github.com/lightstep/lightstep-tracer-python","last_synced_at":"2025-07-19T23:33:52.771Z","repository":{"id":147889474,"uuid":"51330008","full_name":"lightstep/lightstep-tracer-python","owner":"lightstep","description":"The Lightstep distributed tracing library for Python","archived":false,"fork":false,"pushed_at":"2024-08-02T20:34:13.000Z","size":2443,"stargazers_count":40,"open_issues_count":9,"forks_count":16,"subscribers_count":67,"default_branch":"master","last_synced_at":"2025-04-07T20:50:10.517Z","etag":null,"topics":["opentracing"],"latest_commit_sha":null,"homepage":"https://lightstep.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightstep.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-08T21:53:58.000Z","updated_at":"2024-07-03T15:37:13.000Z","dependencies_parsed_at":"2024-12-19T15:20:46.530Z","dependency_job_id":null,"html_url":"https://github.com/lightstep/lightstep-tracer-python","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/lightstep/lightstep-tracer-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Flightstep-tracer-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Flightstep-tracer-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Flightstep-tracer-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Flightstep-tracer-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightstep","download_url":"https://codeload.github.com/lightstep/lightstep-tracer-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Flightstep-tracer-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266041697,"owners_count":23867944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opentracing"],"created_at":"2024-11-07T19:08:35.962Z","updated_at":"2025-07-19T23:33:52.763Z","avatar_url":"https://github.com/lightstep.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lightstep-tracer-python\n\n\u003e ❗ **This instrumentation is no longer recommended**. Please review [documentation on setting up and configuring the OpenTelemetry Python Launcher](https://github.com/lightstep/otel-launcher-python) for more information on migrating to OpenTelemetry.\n\n[![PyPI](https://img.shields.io/pypi/v/lightstep.svg?maxAge=2592000)]() [![Circle CI](https://circleci.com/gh/lightstep/lightstep-tracer-python.svg?style=shield)](https://circleci.com/gh/lightstep/lightstep-tracer-python) [![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n\nThe LightStep distributed tracing library for Python.\n\n## Installation\n\n```bash\napt-get install python-dev\npip install lightstep\n```\n\n## Developer Setup\n\n### Prerequisites\n* [PyEnv](https://github.com/pyenv/pyenv)\n\n```python\npyenv install 2.7.15\npyenv install 3.4.9\npyenv install 3.5.6\npyenv install 3.6.6\npyenv install 3.7.0\npyenv local 2.7.15 3.4.9\n```\n\n* [Tox](https://pypi.org/project/tox/)\n```python\ntox\n```\n\n* Run the examples:\n```python\nsource .tox/py37/bin/activate\npython examples/nontrivial/main.py\n```\n\n* [Python-Modernize](https://github.com/python-modernize/python-modernize)\n\nOnly required for LightStep developers\n```python\npip install modernize\n```\n\n* [Protobuf Python Compiler](http://google.github.io/proto-lens/installing-protoc.html)\n\nOnly required for LightStep developers\n```python\nbrew install protobuf\n```\n\n* Generating the proto code\n```python\ncd ..\ngit clone https://github.com/googleapis/googleapis.git\ngit clone https://github.com/lightstep/lightstep-tracer-common.git\ncd lightstep-tracer-python\nmake proto\n```\n\n## Getting Started with Tracing\n\nPlease see the [example programs](examples/) for examples of how to use this library. In particular:\n\n* [Trivial Example](examples/trivial/main.py) shows how to use the library on a single host.\n* [Context in Headers](examples/http/context_in_headers.py) shows how to pass a `TraceContext` through `HTTP` headers.\n\nOr if your python code is already instrumented for OpenTracing, you can simply switch to LightStep's implementation with:\n\n```python\nimport opentracing\nimport lightstep\n\nif __name__ == \"__main__\":\n  opentracing.tracer = lightstep.Tracer(\n    component_name='your_microservice_name',\n    access_token='{your_access_token}')\n\n  with opentracing.tracer.start_active_span('TestSpan') as scope:\n    scope.span.log_event('test message', payload={'life': 42})\n\n  opentracing.tracer.flush()\n```\n\n### Thrift\nWhen using apache thrift rpc, make sure to both disable use_http by setting it to False as well\nas enabling use_thrift.\n\n```python\nreturn lightstep.Tracer(\n    ...\n    use_http=False,\n    use_thrift=True)\n```\n\nThis library is the LightStep binding for [OpenTracing](http://opentracing.io/). See the [OpenTracing Python API](https://github.com/opentracing/opentracing-python) for additional detail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightstep%2Flightstep-tracer-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightstep%2Flightstep-tracer-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightstep%2Flightstep-tracer-python/lists"}