{ "info": { "author": "Carlos Alberto Cortez", "author_email": "calberto.cortez@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "#########################\nElasticSearch Opentracing\n#########################\n\nThis package enables distributed tracing for the Python elasticsearch-py and elasticsearch-dsl libraries.\n\nInstalation\n===========\n\nRun the following command:\n\n $ pip install elasticsearch_opentracing\n\nGetting started\n===============\n\nPlease see the examples directory. Overall, usage requires that a tracer gets set, and initialize the Elasticsearch client specifying `TracingTransport` as tracing class, and optionally set an active span (to be used as parent span when tracing the actual Elasticsearch statements):\n\n.. code-block:: python\n\n import elasticsearch_opentracing\n\n elasticsearch_opentracing.init_tracing(tracer) # An OpenTracing compatible tracer.\n es = Elasticsearch(transport_class=elasticsearch_opentracing.TracingTransport)\n\n elasticsearch_opentracing.set_active_span(main_span) # Optional.\n\n es.index(index='test-index', doc_type='tweet', id=99, body={\n 'author': 'linus',\n 'text': 'Hello there',\n 'timestamp': datetime.now(),\n })\n res = es.get(index='test-index', doc_type='tweet', id=99)\n\n elasticsearch_opentracing.clear_active_span()\n\nBy default, all Elasticsearch requests are traced. It's possible to have it set to false when initializing the library, and call `enable_tracing` and `disable_tracing` to explicitly trace statements happening within that section:\n\n.. code-block:: python\n\n elasticsearch_opentracing.init_tracing(tracer, trace_all_requests=False)\n\n elasticsearch_opentracing.enable_tracing()\n\n res1 = es.get(index='test-index', doc_type='tweet', id=99)\n res2 = es.get(index='test-index', doc_type='user', id=666)\n\n elasticsearch_opentracing.disable_tracing()\n\nWhen using `trace_all_requests`, any calls made to `enable_tracing` and `disable_tracing` are ignored.\n\nIn case of an exception happening under this block, an implicit call to `disable_tracing` will take place, with the request causing the error including error information with it.\n\nDSL\n===\n\nWhen using the `elasticsearch-dsl` library (which runs on top of `elasticsearch-py`), the same semantics and calls are used. When creating a default connection, the transport can be specified as well:\n\n.. code-block:: python\n\n # elasticsearch_dsl.connections.connections\n connections.create_connection(hosts=['127.0.0.1'],\n transport_class=elasticsearch_opentracing.TracingTransport)\n\n\nMultithreading\n==============\n\nTracing and parent span data is kept as thread local data, which means that applications using many threads (Django, Flask, Pyramid, etc) will work just fine.\n\nFurther information\n===================\n\nIf you\u2019re interested in learning more about the OpenTracing standard, please visit `opentracing.io`_ or `join the mailing list`_. If you would like to implement OpenTracing in your project and need help, feel free to send us a note at `community@opentracing.io`_.\n\n.. _opentracing.io: http://opentracing.io/\n.. _join the mailing list: http://opentracing.us13.list-manage.com/subscribe?u=180afe03860541dae59e84153&id=19117aa6cd\n.. _community@opentracing.io: community@opentracing.io\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/opentracing-contrib/python-elasticsearch/tarball/0.1.4", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/opentracing-contrib/python-elasticsearch/", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "elasticsearch-opentracing", "package_url": "https://pypi.org/project/elasticsearch-opentracing/", "platform": "any", "project_url": "https://pypi.org/project/elasticsearch-opentracing/", "project_urls": { "Download": "https://github.com/opentracing-contrib/python-elasticsearch/tarball/0.1.4", "Homepage": "https://github.com/opentracing-contrib/python-elasticsearch/" }, "release_url": "https://pypi.org/project/elasticsearch-opentracing/0.1.4/", "requires_dist": null, "requires_python": "", "summary": "OpenTracing support for Elasticsearch", "version": "0.1.4" }, "last_serial": 3864963, "releases": { "0.1.0": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c31a7a9759ba382874a92e2f64a30e49", "sha256": "c9c64169eda47f6d817188bf13d561fd7894c5ca5dd75dfdfe23014417c1c4c1" }, "downloads": -1, "filename": "elasticsearch_opentracing-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c31a7a9759ba382874a92e2f64a30e49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3079, "upload_time": "2017-04-27T16:13:59", "url": "https://files.pythonhosted.org/packages/c5/6a/47d8e353a691c8dc924726792b5ef6f16cb5c5d920514c1083a538e54b94/elasticsearch_opentracing-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "0b9967cc9992a55254ec706380fe5980", "sha256": "560ad1fe724079082820437556ecd336802075c00c58406bfd47260ee60c6486" }, "downloads": -1, "filename": "elasticsearch_opentracing-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0b9967cc9992a55254ec706380fe5980", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3406, "upload_time": "2017-05-13T16:02:55", "url": "https://files.pythonhosted.org/packages/9c/76/d6f57d74999b37eb021e59853f3835bbcf005e80c5de55b206e039c4e439/elasticsearch_opentracing-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "3d51f866e06c6ab391d7ccdb7c2f0566", "sha256": "710938ebbc79aaa7788e0381ddd189839e4e0c9020aacfe3f97df99de226791c" }, "downloads": -1, "filename": "elasticsearch_opentracing-0.1.3.tar.gz", "has_sig": false, "md5_digest": "3d51f866e06c6ab391d7ccdb7c2f0566", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3416, "upload_time": "2017-06-12T16:32:56", "url": "https://files.pythonhosted.org/packages/77/a6/abe0dd8483f04e25c01efde05789d20ab070bad1b12cbedf10d582d5c0a4/elasticsearch_opentracing-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "1ad85219aec7555e2340f883880b4066", "sha256": "f6cd985588c95e8e54c23587d19ece79f0ad0eeba6df185bfb3a8c6a6808a49c" }, "downloads": -1, "filename": "elasticsearch_opentracing-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1ad85219aec7555e2340f883880b4066", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7467, "upload_time": "2018-05-15T15:11:55", "url": "https://files.pythonhosted.org/packages/c1/04/8a322b42d3910537b76d0a45ac65b955bd1ab78ccb7ee9caf8aa9f5d880f/elasticsearch_opentracing-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1ad85219aec7555e2340f883880b4066", "sha256": "f6cd985588c95e8e54c23587d19ece79f0ad0eeba6df185bfb3a8c6a6808a49c" }, "downloads": -1, "filename": "elasticsearch_opentracing-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1ad85219aec7555e2340f883880b4066", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7467, "upload_time": "2018-05-15T15:11:55", "url": "https://files.pythonhosted.org/packages/c1/04/8a322b42d3910537b76d0a45ac65b955bd1ab78ccb7ee9caf8aa9f5d880f/elasticsearch_opentracing-0.1.4.tar.gz" } ] }