{ "info": { "author": "Ryan Hilfers, Haystack", "author_email": "haystack@expediagroup.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "[![Build Status](https://travis-ci.org/ExpediaDotCom/haystack-client-python.svg?branch=master)](https://travis-ci.org/ExpediaDotCom/haystack-client-python)\n[![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/ExpediaDotCom/haystack/blob/master/LICENSE)\n\n# Haystack bindings for Python OpenTracing API\nThis is Haystack's client library for Python that implements [OpenTracing](https://github.com/opentracing/opentracing-python/)\n\nFurther information can be found on [opentracing.io](https://opentracing.io/) \n\n## Using this library\nSee examples in /examples directory. See opentracing [usage](https://github.com/opentracing/opentracing-python/#usage) for additional information.\n\n\nFirst initialize the tracer at the application level by supplying a service name and recorder\n```python\nimport opentracing\nfrom haystack import HaystackAgentRecorder\nfrom haystack import HaystackTracer\n\nopentracing.tracer = HaystackTracer(\"a_service\", HaystackAgentRecorder())\n```\n\nStarting a span can be done as a managed resource using `start_active_span()`\n```python\nwith opentracing.tracer.start_active_span(\"span-name\") as scope:\n do_stuff()\n```\n\nor finish the span on your own terms with\n```python\nspan = opentracing.tracer.start_span(\"span-name\")\ndo_stuff()\nspan.finish()\n```\n\nNote: **If there is a Scope, it will act as the parent to any newly started Span** unless the programmer passes \n`ignore_active_span=True` at `start_span()/start_active_span()` time or specified parent context explicitly using \n`childOf=parent_context`\n\n#### Custom propagation headers\nIf necessary, default propagation headers can be replaced with custom ones by specifying custom propagator options. Register the new propagator with the tracer once configured. \n```python\nprop_opts = PropagatorOpts(\"X-Trace-ID\", \"X-Span-ID\", \"X-Parent-Span\", \"X-baggage-\")\nopentracing.tracer.register_propagator(opentracing.Format.HTTP_HEADERS, TextPropagator(prop_opts))\n```\n\n#### Logging\nAll modules define their logger via `logging.getLogger(__name__)`\n\nSo in order to define specific logging format or level for this library use `getLogger('haystack')` or configure the\nroot logger.\n\n## How to configure build environment\nCreate a python3 virtual environment, activate it and then `make bootstrap`\n\n## Running the example code\n`make example`\n\n## How to Release this library\nCreate a new release in github specifying a semver compliant tag greater than the current release version.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ExpediaDotCom/haystack-client-python", "keywords": "opentracing,haystack,tracing,microservices,distributed", "license": "", "maintainer": "", "maintainer_email": "", "name": "haystack-client", "package_url": "https://pypi.org/project/haystack-client/", "platform": "", "project_url": "https://pypi.org/project/haystack-client/", "project_urls": { "Homepage": "https://github.com/ExpediaDotCom/haystack-client-python" }, "release_url": "https://pypi.org/project/haystack-client/0.1.0/", "requires_dist": [ "opentracing (==2.0.0)", "requests (<3.0,>=2.19)", "requests-futures (<1.0,==0.9.9)", "protobuf (<4.0,>=3.6.0)", "grpcio (<2.0],>=1.18.0)" ], "requires_python": ">=3.5", "summary": "Haystack Python OpenTracing Implementation", "version": "0.1.0" }, "last_serial": 4934579, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4a56c5db08a14ecccfe77afc88bc69dd", "sha256": "4f616e53a0eb4635002f49ceefd27eec58bf93529f989ba645ef00282bae3529" }, "downloads": -1, "filename": "haystack_client-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4a56c5db08a14ecccfe77afc88bc69dd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 20288, "upload_time": "2019-03-13T13:29:50", "url": "https://files.pythonhosted.org/packages/f1/ad/88d03db55b328adcd773ecb31fd304f3484f3315fa96a8e322dc54866200/haystack_client-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "566930c887b94f110d1d79bb76791063", "sha256": "27157980b9fac7c8c062bbfe1b6e637a05e1c8bf9be96a503b8822bbee5a286c" }, "downloads": -1, "filename": "haystack-client-0.1.0.tar.gz", "has_sig": false, "md5_digest": "566930c887b94f110d1d79bb76791063", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 13376, "upload_time": "2019-03-13T13:29:52", "url": "https://files.pythonhosted.org/packages/22/3d/7f76034fdb8d1d2125511e660658f4664cce0c928a0a8307169a22699c8f/haystack-client-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4a56c5db08a14ecccfe77afc88bc69dd", "sha256": "4f616e53a0eb4635002f49ceefd27eec58bf93529f989ba645ef00282bae3529" }, "downloads": -1, "filename": "haystack_client-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4a56c5db08a14ecccfe77afc88bc69dd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 20288, "upload_time": "2019-03-13T13:29:50", "url": "https://files.pythonhosted.org/packages/f1/ad/88d03db55b328adcd773ecb31fd304f3484f3315fa96a8e322dc54866200/haystack_client-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "566930c887b94f110d1d79bb76791063", "sha256": "27157980b9fac7c8c062bbfe1b6e637a05e1c8bf9be96a503b8822bbee5a286c" }, "downloads": -1, "filename": "haystack-client-0.1.0.tar.gz", "has_sig": false, "md5_digest": "566930c887b94f110d1d79bb76791063", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 13376, "upload_time": "2019-03-13T13:29:52", "url": "https://files.pythonhosted.org/packages/22/3d/7f76034fdb8d1d2125511e660658f4664cce0c928a0a8307169a22699c8f/haystack-client-0.1.0.tar.gz" } ] }