{ "info": { "author": "Kathy Camenzind", "author_email": "kcamenzind@lightstep.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "#################\nFlask-OpenTracing\n#################\n\nThis package enables distributed tracing in Flask applications via `The OpenTracing Project`_. Once a production system contends with real concurrency or splits into many services, crucial (and formerly easy) tasks become difficult: user-facing latency optimization, root-cause analysis of backend errors, communication about distinct pieces of a now-distributed system, etc. Distributed tracing follows a request on its journey from inception to completion from mobile/browser all the way to the microservices. \n\nAs core services and libraries adopt OpenTracing, the application builder is no longer burdened with the task of adding basic tracing instrumentation to their own code. In this way, developers can build their applications with the tools they prefer and benefit from built-in tracing instrumentation. OpenTracing implementations exist for major distributed tracing systems and can be bound or swapped with a one-line configuration change.\n\nIf you want to learn more about the underlying python API, visit the python `source code`_.\n\nIf you are migrating from the 0.x series, you may want to read the list of `breaking changes`_.\n\n.. _The OpenTracing Project: http://opentracing.io/\n.. _source code: https://github.com/opentracing/opentracing-python\n.. _breaking changes: #breaking-changes-from-0-x\n\nInstallation\n============\n\nRun the following command:\n\n.. code-block:: \n\n $ pip install Flask-Opentracing\n\nUsage\n=====\n\nThis Flask extension allows for tracing of Flask apps using the OpenTracing API. All\nthat it requires is for a ``FlaskTracing`` tracer to be initialized using an\ninstance of an OpenTracing tracer. You can either trace all requests to your site, or use function decorators to trace certain individual requests.\n\n**Note:** `optional_args` in both cases are any number of attributes (as strings) of `flask.Request` that you wish to set as tags on the created span\n\nInitialize\n----------\n\n`FlaskTracing` wraps the tracer instance that's supported by opentracing. To create a `FlaskTracing` object, you can either pass in a tracer object directly or a callable that returns the tracer object. For example:\n\n.. code-block:: python\n\n import opentracing\n from flask_opentracing import FlaskTracing\n\n opentracing_tracer = ## some OpenTracing tracer implementation\n tracing = FlaskTracing(opentracing_tracer, ...)\n\nor\n\n.. code-block:: python\n\n import opentracing\n from flask_opentracing import FlaskTracing\n\n def initialize_tracer():\n ...\n return opentracing_tracer\n\n tracing = FlaskTracing(initialize_tracer, ...)\n\n\nTrace All Requests\n------------------\n\n.. code-block:: python\n\n import opentracing\n from flask_opentracing import FlaskTracing\n\n app = Flask(__name__)\n\n opentracing_tracer = ## some OpenTracing tracer implementation\n tracing = FlaskTracing(opentracing_tracer, True, app, [optional_args])\n\nTrace Individual Requests\n-------------------------\n\n.. code-block:: python\n\n import opentracing\n from flask_opentracing import FlaskTracing\n\n app = Flask(__name__)\n\n opentracing_tracer = ## some OpenTracing tracer implementation \n tracing = FlaskTracing(opentracing_tracer)\n\n @app.route('/some_url')\n @tracing.trace(optional_args)\n def some_view_func():\n \t... \n \treturn some_view \n\nAccessing Spans Manually\n------------------------\n\nIn order to access the span for a request, we've provided an method `FlaskTracing.get_span(request)` that returns the span for the request, if it is exists and is not finished. This can be used to log important events to the span, set tags, or create child spans to trace non-RPC events. If no request is passed in, the current request will be used.\n\nTracing an RPC\n--------------\n\nIf you want to make an RPC and continue an existing trace, you can inject the current span into the RPC. For example, if making an http request, the following code will continue your trace across the wire:\n\n.. code-block:: python\n\n @tracing.trace()\n def some_view_func(request):\n new_request = some_http_request\n current_span = tracing.get_span(request)\n text_carrier = {}\n opentracing_tracer.inject(span, opentracing.Format.TEXT_MAP, text_carrier)\n for k, v in text_carrier.iteritems():\n new_request.add_header(k,v)\n ... # make request\n\nExamples\n========\n\nSee `examples`_ to view and run an example of two Flask applications\nwith integrated OpenTracing tracers.\n\n.. _examples: https://github.com/opentracing-contrib/python-flask/tree/master/example\n\n`This tutorial `_ has a step-by-step guide for using `Flask-Opentracing` with `Jaeger `_.\n\nBreaking changes from 0.x\n=========================\n\nStarting with the 1.0 version, a few changes have taken place from previous versions:\n\n* ``FlaskTracer`` has been renamed to ``FlaskTracing``, although ``FlaskTracing``\n can be used still as a deprecated name.\n* When passing an ``Application`` object at ``FlaskTracing`` creation time,\n ``trace_all_requests`` defaults to ``True``.\n* When no ``opentracing.Tracer`` is provided, ``FlaskTracing`` will rely on the\n global tracer.\n\nFurther Information\n===================\n\nIf you're 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", "description_content_type": "text/x-rst", "docs_url": "https://pythonhosted.org/Flask-OpenTracing/", "download_url": "https://github.com/opentracing-contrib/python-flask/tarball/1.1.0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/opentracing-contrib/python-flask", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "Flask-OpenTracing", "package_url": "https://pypi.org/project/Flask-OpenTracing/", "platform": "any", "project_url": "https://pypi.org/project/Flask-OpenTracing/", "project_urls": { "Download": "https://github.com/opentracing-contrib/python-flask/tarball/1.1.0", "Homepage": "http://github.com/opentracing-contrib/python-flask" }, "release_url": "https://pypi.org/project/Flask-OpenTracing/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "OpenTracing support for Flask applications", "version": "1.1.0", "yanked": false, "yanked_reason": null }, "last_serial": 6009912, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "453fe9682278c7d35bcc5a0db9fd40f9", "sha256": "023c311d384b7d0284d8bef58eea070ef8aa173e4e1fbbe5fd35c560a60b7b6e" }, "downloads": -1, "filename": "Flask-OpenTracing-0.1.0.tar.gz", "has_sig": false, "md5_digest": "453fe9682278c7d35bcc5a0db9fd40f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4040, "upload_time": "2016-07-11T22:31:36", "upload_time_iso_8601": "2016-07-11T22:31:36.541822Z", "url": "https://files.pythonhosted.org/packages/fc/f6/ef830814c0b530013ccf343f30c14afb3063a2482c485f4f0b4d1dc18055/Flask-OpenTracing-0.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0a815950405f97a933f92b6219234fc5", "sha256": "d3238cb02dd02537db5e69d085781dcb4b23d69426373537b42a6cb7e890fd2d" }, "downloads": -1, "filename": "Flask-OpenTracing-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0a815950405f97a933f92b6219234fc5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4896, "upload_time": "2016-07-22T00:03:52", "upload_time_iso_8601": "2016-07-22T00:03:52.361921Z", "url": "https://files.pythonhosted.org/packages/51/20/391c24bdd44aead5fc41b162073e06bd4539a3aa9939b0acdd1819d76cfc/Flask-OpenTracing-0.1.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "1fefd31638d33dd4f70aaaf1bbc8bf07", "sha256": "6dff388239993d5d584e879fd3055c64142ff1a311749417d01deff686fa17ae" }, "downloads": -1, "filename": "Flask-OpenTracing-0.1.2.tar.gz", "has_sig": false, "md5_digest": "1fefd31638d33dd4f70aaaf1bbc8bf07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4910, "upload_time": "2016-07-27T21:09:58", "upload_time_iso_8601": "2016-07-27T21:09:58.879050Z", "url": "https://files.pythonhosted.org/packages/7b/0d/0d24eb2ed3b85a35697eeab610d3f51faaa0d32856d2bcbafca4196478b8/Flask-OpenTracing-0.1.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "cd82511268611357a2c81e6dbfffddf1", "sha256": "179fb35cd0c2d24f175da3d239c1e7483234d0bb903bd541c776ea4486bad6cd" }, "downloads": -1, "filename": "Flask-OpenTracing-0.1.3.tar.gz", "has_sig": false, "md5_digest": "cd82511268611357a2c81e6dbfffddf1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4916, "upload_time": "2016-07-27T22:07:24", "upload_time_iso_8601": "2016-07-27T22:07:24.161965Z", "url": "https://files.pythonhosted.org/packages/27/1e/5fca0f1becf0b7faa400dcc4d3d28e590378399446e567c31b1f3c2368a3/Flask-OpenTracing-0.1.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "d58895fdbe5668c8a825d5f051c77083", "sha256": "976adc34e8c71e68b16cc8642e0b0a8b8bb205a4cdd6b3bdf1dfbeef6ccd0259" }, "downloads": -1, "filename": "Flask-OpenTracing-0.1.4.tar.gz", "has_sig": false, "md5_digest": "d58895fdbe5668c8a825d5f051c77083", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5849, "upload_time": "2016-07-29T18:30:12", "upload_time_iso_8601": "2016-07-29T18:30:12.594303Z", "url": "https://files.pythonhosted.org/packages/71/8e/98fb3c92cf120687b4f8f38a2fb38cb7eab231672814ff0f8c8f75e8bef7/Flask-OpenTracing-0.1.4.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "2f6284e922d848b306f00f0d053f119f", "sha256": "27042e96968496f52b133cd78d959763bd6c41894406b813fd73af885bc3d550" }, "downloads": -1, "filename": "Flask-OpenTracing-0.1.5.tar.gz", "has_sig": false, "md5_digest": "2f6284e922d848b306f00f0d053f119f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5851, "upload_time": "2016-07-29T18:46:52", "upload_time_iso_8601": "2016-07-29T18:46:52.180550Z", "url": "https://files.pythonhosted.org/packages/3f/8c/a3a51222f1c6045a43e4a7f23b339681523fafcc63d36832e26c393e8436/Flask-OpenTracing-0.1.5.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "9293a666ff4085c0003daed714dc013f", "sha256": "b13940856a74d095a9786192a661d99941bd60cc31be45fe18a033d4eeaa0e83" }, "downloads": -1, "filename": "Flask-OpenTracing-0.1.6.tar.gz", "has_sig": false, "md5_digest": "9293a666ff4085c0003daed714dc013f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5823, "upload_time": "2016-08-20T22:23:26", "upload_time_iso_8601": "2016-08-20T22:23:26.414504Z", "url": "https://files.pythonhosted.org/packages/78/4a/5c00c6d8eef87c2d9254fd11200df993a4f686626fc8c5a5f77545dab684/Flask-OpenTracing-0.1.6.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "99bf162c71fc70ad4bd82a792238f6fb", "sha256": "9041c3d98f1fef578f1f6a31bc6e893d50e877820c38a0b932ab6b93bc28dc97" }, "downloads": -1, "filename": "Flask-OpenTracing-0.1.7.tar.gz", "has_sig": false, "md5_digest": "99bf162c71fc70ad4bd82a792238f6fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5827, "upload_time": "2016-08-20T22:31:29", "upload_time_iso_8601": "2016-08-20T22:31:29.382390Z", "url": "https://files.pythonhosted.org/packages/cc/a1/ce401a098d54acde42c015750bcc899385c704a8e691b28625b4ff683106/Flask-OpenTracing-0.1.7.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "016ef610af93ec050e5a34121bce3355", "sha256": "f322b3e05fdee62ca6cc19d5d683a5669672af30590a48099be28ed5cb902414" }, "downloads": -1, "filename": "Flask_OpenTracing-0.1.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "016ef610af93ec050e5a34121bce3355", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8715, "upload_time": "2018-01-08T15:06:16", "upload_time_iso_8601": "2018-01-08T15:06:16.833864Z", "url": "https://files.pythonhosted.org/packages/5d/8c/59ddf49c45b157516d09ee0cd9dd1304c5531146180eb27dc4c715a381e1/Flask_OpenTracing-0.1.8-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "401ef2d9e34122b55856e95934b02699", "sha256": "1babcb000b90cb217bf36372a1326d24c7e3c65805fa8e67850ab39528fab0db" }, "downloads": -1, "filename": "Flask-OpenTracing-0.1.8.tar.gz", "has_sig": false, "md5_digest": "401ef2d9e34122b55856e95934b02699", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6024, "upload_time": "2018-01-08T15:06:18", "upload_time_iso_8601": "2018-01-08T15:06:18.725788Z", "url": "https://files.pythonhosted.org/packages/94/8c/6142dca2f70069ae7457890b373e4f1cfd4114f819a5886e092dc5d9a84e/Flask-OpenTracing-0.1.8.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4da86132cc4f5a569331579070734237", "sha256": "e78797dc6c0c1c1ef6eced8738a1480fd7de3717931013a5e53d57edc3ce935f" }, "downloads": -1, "filename": "Flask_OpenTracing-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4da86132cc4f5a569331579070734237", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8903, "upload_time": "2018-05-08T10:36:00", "upload_time_iso_8601": "2018-05-08T10:36:00.881895Z", "url": "https://files.pythonhosted.org/packages/1d/c4/0546b854a3f42af9ef959df9bd1108903698e175e7a07c057cdfaeeef718/Flask_OpenTracing-0.2.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "1478864bca77de6bb04601f19b8477b3", "sha256": "e53536921422c5c569497e70e3d0de106c370fcbf3abc3ebd8df19cd2d6393d5" }, "downloads": -1, "filename": "Flask-OpenTracing-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1478864bca77de6bb04601f19b8477b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6156, "upload_time": "2018-05-08T10:36:02", "upload_time_iso_8601": "2018-05-08T10:36:02.410361Z", "url": "https://files.pythonhosted.org/packages/46/85/203e9de75f231355735de7dc2fdf5847cf0535ac6dc7efd0ed967922e8d0/Flask-OpenTracing-0.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "00022f9b43e86990e10a5b535b5ba01a", "sha256": "3df24834ee21d8d519f7302101488bd28a0dd68ff9b79812925732d56df87d18" }, "downloads": -1, "filename": "Flask-OpenTracing-1.0.0.tar.gz", "has_sig": false, "md5_digest": "00022f9b43e86990e10a5b535b5ba01a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8548, "upload_time": "2018-11-13T16:29:21", "upload_time_iso_8601": "2018-11-13T16:29:21.009652Z", "url": "https://files.pythonhosted.org/packages/2b/ac/aafffcb47bce79f1be14bd89b27fe60c4489258f8373774c0a50391d2e10/Flask-OpenTracing-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "bca73af08061ef72318853ce3118763d", "sha256": "a9a39d367fbe7e9ed9c77b90ac48159c1a3e82982a5abf84d3f4d710d24580ac" }, "downloads": -1, "filename": "Flask-OpenTracing-1.1.0.tar.gz", "has_sig": false, "md5_digest": "bca73af08061ef72318853ce3118763d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8222, "upload_time": "2019-10-22T00:20:30", "upload_time_iso_8601": "2019-10-22T00:20:30.887787Z", "url": "https://files.pythonhosted.org/packages/58/6c/6417701ba5ecc8854670c6db3207bcc3e5fbc96289a7cb18d5516d99a1c6/Flask-OpenTracing-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bca73af08061ef72318853ce3118763d", "sha256": "a9a39d367fbe7e9ed9c77b90ac48159c1a3e82982a5abf84d3f4d710d24580ac" }, "downloads": -1, "filename": "Flask-OpenTracing-1.1.0.tar.gz", "has_sig": false, "md5_digest": "bca73af08061ef72318853ce3118763d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8222, "upload_time": "2019-10-22T00:20:30", "upload_time_iso_8601": "2019-10-22T00:20:30.887787Z", "url": "https://files.pythonhosted.org/packages/58/6c/6417701ba5ecc8854670c6db3207bcc3e5fbc96289a7cb18d5516d99a1c6/Flask-OpenTracing-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }