{ "info": { "author": "Carlos Alberto Cortez", "author_email": "calberto.cortez@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Pyramid", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "###################\nPyramid Opentracing\n###################\n\nThis package enables distributed tracing in Pyramid projects 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 $ pip install pyramid_opentracing\n\nSetting up Tracing for All Requests\n===================================\n\nIn order to implement tracing in your system (for all the requests), add the following lines of code to your site's Configuration section to enable the tracing tween:\n\n.. code-block:: python\n\n # OpenTracing settings\n\n # defaults to True\n config.add_attributes({'ot.trace_all': True})\n\n # defaults to []\n # only valid if 'opentracing_trace_all' == True\n config.add_attributes({'ot.traced_attributes': ['host', 'method', ...]})\n\n # an optional module-level callable invoked after Span is created, taking\n # span and request as parameters.\n config.add_attributes({'ot.start_span_cb': 'my_main_module.start_span_cb'})\n\n # One valid underlying OpenTracing implementation as\n # one either ONE of these three values:\n\n # 1. A PyramidTracing object.\n config.add_attributes({'ot.tracing': PyramidTracing(my_ot_tracer)})\n\n # 2. A module-level callable, invoked once, returning a PyramidTracing\n # and receiving the settings, such as: create_tracing(**settings).\n config.add_attributes({'ot.tracing_callable', 'my_main_module.utils.create_tracing')\n\n # 3. OR a module-level callable, invoked once, returning an opentracing\n # compliant Tracer with optional parameters.\n config.add_attributes({'ot.tracer_callable', 'opentracing.Tracer'})\n config.add_attributes({'ot.tracer_parameters', ...})\n\n # enable the tween\n config.include('pyramid_opentracing')\n\nAlternatively, you can configure the tween through an INI file:\n\n.. code-block:: ini\n\n [app:myapp]\n ot.trace_all = true\n ot.start_span_cb = my_main_module.start_span_cb\n ot.traced_attributes = host\n method\n ot.tracing_callable = my_main_module.utils.create_tracing\n pyramid.includes = pyramid_opentracing\n\nOnce the tween has been included, **if** `ot.tracing` was not directly set, a new instance will be created and will exist in ``registry.settings['ot.tracing']`` for any further consumption.\n\n**Note:** Valid request attributes to trace are listed [here](http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#pyramid.request.Request). When you trace an attribute, this means that created spans will have tags with the attribute name and the request's value.\n\nTracing Individual Requests\n===========================\n\nIf you don't want to trace all requests to your site, you can use function decorators to trace individual view functions. This can be done by managing a globally unique ``PyramidTracing`` object yourself, and then adding the following lines of code to any file that has view functions:\n\n.. code-block:: python\n\n # get_tracer() should return a globally-unique PyramidTracing object.\n from my_tracing_mod import get_tracing\n\n tracing = get_tracing()\n\n # put the decorator after @view_config, if used\n @tracing.trace(optional_args)\n def some_view_func(request):\n ... #do some stuff\n\nThis tracing method doesn't use the tween, so there's no need to include that one.\n\nThe optional arguments allow for tracing of request attributes. For example, if you want to trace metadata, you could pass in `@tracing.trace('headers')` and request.headers would be set as a tag on all spans for this view function.\n\nExamples\n========\n\nHere is an `tween example`_ of a Pyramid application that uses the Pyramid tween to log all\nrequests:\n\n.. _tween example: https://github.com/opentracing-contrib/python-pyramid/tree/master/example/tween-example/main.py\n\nHere is an `client server example`_ of an application that acts as both a client and server,\nwith a manually managed tracer (you will need to install the `waitress` module).\n\n.. _client server example: https://github.com/opentracing-contrib/python-pyramid/tree/master/example/client-server/main.py\n\nOther examples are included under the examples directrory.\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* ``PyramidTracer`` has been renamed to ``PyramidTracing``, although ``PyramidTracer``\n can be used still as a deprecated name.\n* ``ot.base_tracer`` and ``ot.base_tracer_func`` still work, but have been deprecated.\n* When using the Tween layer, ``ot.trace_all`` defaults to ``True``.\n* When no ``opentracing.Tracer`` is provided, ``PyramidTracing`` will rely on the\n global tracer.\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-pyramid/tarball/1.0.0\n", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/opentracing-contrib/python-pyramid/", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "pyramid-opentracing", "package_url": "https://pypi.org/project/pyramid-opentracing/", "platform": "any", "project_url": "https://pypi.org/project/pyramid-opentracing/", "project_urls": { "Download": "https://github.com/opentracing-contrib/python-pyramid/tarball/1.0.0\n", "Homepage": "https://github.com/opentracing-contrib/python-pyramid/" }, "release_url": "https://pypi.org/project/pyramid-opentracing/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "OpenTracing support for Pyramid applications", "version": "1.0.0" }, "last_serial": 4477803, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9b94bec5fd39b614bb18876fe96d5499", "sha256": "ff87fd3ac4445e1165d47671a0ba8ea69890017a8abedf353eac17f7cec14351" }, "downloads": -1, "filename": "pyramid_opentracing-0.1.0-py2.7.egg", "has_sig": false, "md5_digest": "9b94bec5fd39b614bb18876fe96d5499", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 13060, "upload_time": "2017-03-06T01:45:56", "url": "https://files.pythonhosted.org/packages/96/2c/73d0933ba32312d681cec431953d424a48f122051ee928d5912dceceb873/pyramid_opentracing-0.1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "5d3b87e972202bab33f6ef3bc799c9db", "sha256": "6d9bc3cf9b45e814bb4dd18137f3dc09327bf177c308a0df56dd0ee47791cefa" }, "downloads": -1, "filename": "pyramid_opentracing-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "5d3b87e972202bab33f6ef3bc799c9db", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10975, "upload_time": "2017-03-06T01:45:50", "url": "https://files.pythonhosted.org/packages/cf/ec/0c1f94fa838b525595f9a760c14d613f2082dc399b0aaa879ef28705c1ba/pyramid_opentracing-0.1.0-py2-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1539b6df282f44a63babf82e7fb2d520", "sha256": "8c9238728db96184e1ec4ec259d25059960f2a6fd39868ab9d45c2516f73f6f5" }, "downloads": -1, "filename": "pyramid_opentracing-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1539b6df282f44a63babf82e7fb2d520", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7028, "upload_time": "2017-03-06T16:39:51", "url": "https://files.pythonhosted.org/packages/8f/51/288efe86f273277e234c02839b26eaa3a4b7feef3de1eba5500b5b856967/pyramid_opentracing-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d4344610c06f6d8a99ef0f2178bb25aa", "sha256": "d57170db23da72d68fbb50dd17d9695ba4437e664ae1479e2226bac6e37490c3" }, "downloads": -1, "filename": "pyramid_opentracing-0.1.2.tar.gz", "has_sig": false, "md5_digest": "d4344610c06f6d8a99ef0f2178bb25aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7102, "upload_time": "2017-03-08T01:52:16", "url": "https://files.pythonhosted.org/packages/9a/36/cf3d7c6ee06c4074c53eb8c0ee428f41639cdbf3e36f3c582147c9aa12c2/pyramid_opentracing-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "9b8b91f209ba6597ee4ac89b07b39768", "sha256": "35dcd8c041dc9989d9c9ff43138ebff8d508147965135b79275dc7df86bf7b96" }, "downloads": -1, "filename": "pyramid_opentracing-0.1.3.tar.gz", "has_sig": false, "md5_digest": "9b8b91f209ba6597ee4ac89b07b39768", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9485, "upload_time": "2017-03-15T00:32:56", "url": "https://files.pythonhosted.org/packages/60/f1/567df215be516ec1d519a4b40ed98075287ca4637dd0d98dea39a4095edb/pyramid_opentracing-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "e6e90525ce9b53a55e74a283aa2b128f", "sha256": "aad898730bcc0442bd01bbc21b6d8d75caba2174e357c34e45262e38b8d0a021" }, "downloads": -1, "filename": "pyramid_opentracing-0.1.4.tar.gz", "has_sig": false, "md5_digest": "e6e90525ce9b53a55e74a283aa2b128f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10008, "upload_time": "2017-06-26T15:51:00", "url": "https://files.pythonhosted.org/packages/06/3d/5fe5dbf645d7c626a2615cea2e1bd9ad5758b1a179d3cdd412a602533800/pyramid_opentracing-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "139e5241cf7b04fcf04ea29b5ae98880", "sha256": "a8ddd8aadb8ff248844a2a51fae054dc9d761e92ab7436199e955b2e0f74d999" }, "downloads": -1, "filename": "pyramid_opentracing-0.1.5.tar.gz", "has_sig": false, "md5_digest": "139e5241cf7b04fcf04ea29b5ae98880", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11814, "upload_time": "2018-05-15T16:50:08", "url": "https://files.pythonhosted.org/packages/bc/ea/6c07d3802829056f8bb5a4d72177dc111e158a3ecf8dfb95e1ca64f0c197/pyramid_opentracing-0.1.5.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "021afc3bf0129b7bd55f726e77fa1e86", "sha256": "126bcbf98afa999a4e1d380add9ebc3ba5b8bf0a02a7dedd738fa3f82d2ab50b" }, "downloads": -1, "filename": "pyramid_opentracing-1.0.0.tar.gz", "has_sig": false, "md5_digest": "021afc3bf0129b7bd55f726e77fa1e86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13380, "upload_time": "2018-11-12T15:35:53", "url": "https://files.pythonhosted.org/packages/5c/8c/39a94bd560b2fa64be753d11a02cbea2edd84dbacae044077b8e6252ed67/pyramid_opentracing-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "021afc3bf0129b7bd55f726e77fa1e86", "sha256": "126bcbf98afa999a4e1d380add9ebc3ba5b8bf0a02a7dedd738fa3f82d2ab50b" }, "downloads": -1, "filename": "pyramid_opentracing-1.0.0.tar.gz", "has_sig": false, "md5_digest": "021afc3bf0129b7bd55f726e77fa1e86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13380, "upload_time": "2018-11-12T15:35:53", "url": "https://files.pythonhosted.org/packages/5c/8c/39a94bd560b2fa64be753d11a02cbea2edd84dbacae044077b8e6252ed67/pyramid_opentracing-1.0.0.tar.gz" } ] }