{ "info": { "author": "Wavefront by VMware", "author_email": "chitimba@wavefront.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# wavefront-pyformance\n\n[![image](https://img.shields.io/pypi/v/wavefront-pyformance.svg)](https://pypi.org/project/wavefront-pyformance/)\n[![image](https://img.shields.io/pypi/l/wavefront-pyformance.svg)](https://pypi.org/project/wavefront-pyformance/)\n[![image](https://img.shields.io/pypi/pyversions/wavefront-pyformance.svg)](https://pypi.org/project/wavefront-pyformance/)\n[![travis build status](https://travis-ci.com/wavefrontHQ/wavefront-pyformance.svg?branch=master)](https://travis-ci.com/wavefrontHQ/wavefront-pyformance)\n\n\nThis is a plugin for [pyformance](https://github.com/omergertel/pyformance) which adds Wavefront reporters (via proxy or direct ingestion) and an abstraction that supports tagging at the host level. It also includes support for Wavefront delta counters.\n\n## Requirements\nPython 2.7+ and Python 3.x are supported.\n\n```\npip install wavefront-pyformance\n```\n\n## Usage\n\n### Wavefront Reporter\n\nThe Wavefront Reporters support tagging at the host level. Tags passed to a reporter will be applied to every metric before being sent to Wavefront.\n\n#### Create Wavefront Reporter\nYou can create a `WavefrontProxyReporter` or `WavefrontDirectReporter` as follows:\n\n```Python\nimport pyformance\nfrom wavefront_pyformance import wavefront_reporter\n\nreg = pyformance.MetricsRegistry()\n\n# report metrics to a Wavefront proxy every 10s\nwf_proxy_reporter = wavefront_reporter.WavefrontProxyReporter(\n host=host, port=2878, registry=reg,\n source='wavefront-pyformance-example',\n tags={'key1': 'val1', 'key2': 'val2'},\n prefix='python.proxy.',\n reporting_interval=10)\nwf_proxy_reporter.start()\n\n# report metrics directly to a Wavefront server every 10s\nwf_direct_reporter = wavefront_reporter.WavefrontDirectReporter(\n server=server, token=token, registry=reg,\n source='wavefront-pyformance-exmaple',\n tags={'key1': 'val1', 'key2': 'val2'},\n prefix='python.direct.',\n reporting_interval=10)\nwf_direct_reporter.start()\n```\n#### Flush and stop Wavefront Reporter\n After create Wavefront Reporter, `start()` will make the reporter automatically reporting every `reporting_interval` seconds.\n Besides that, you can also call `report_now()` to perform reporting immediately. `report_now()` should also be called before you stop the reporter as follows:\n ```Python\nwf_reporter.report_now()\nwf_reporter.stop()\n```\n\n### Delta Counter\n\nTo create a Wavefront delta counter:\n\n```Python\nimport pyformance\nfrom wavefront_pyformance import delta\n\nreg = pyformance.MetricsRegistry()\nd_0 = delta.delta_counter(reg, 'requests_delta')\nd_0.inc(10)\n```\n\nNote: Having the same metric name for any two types of metrics will result in only one time series at the server and thus cause collisions.\nIn general, all metric names should be different. In case you have metrics that you want to track as both a Counter and Delta Counter, consider adding a relevant suffix to one of the metrics to differentiate one metric name from another.\n\n### Wavefront Histogram\n\nTo create a [Wavefront Histogram](https://docs.wavefront.com/proxies_histograms.html):\n\n```Python\nimport pyformance\nfrom wavefront_pyformance import wavefront_histogram\n\nreg = pyformance.MetricsRegistry()\nh_0 = wavefront_histogram.wavefront_histogram(reg, 'requests_duration')\nh_0.add(10)\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/wavefrontHQ/wavefront-pyformance", "keywords": "PyFormance,Wavefront,Wavefront Pyformance", "license": "Apache-2.0", "maintainer": "", "maintainer_email": "", "name": "wavefront-pyformance", "package_url": "https://pypi.org/project/wavefront-pyformance/", "platform": "", "project_url": "https://pypi.org/project/wavefront-pyformance/", "project_urls": { "Homepage": "https://github.com/wavefrontHQ/wavefront-pyformance" }, "release_url": "https://pypi.org/project/wavefront-pyformance/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Wavefront Pyformance Library", "version": "1.0.0" }, "last_serial": 5001033, "releases": { "0.9.1": [ { "comment_text": "", "digests": { "md5": "3ff415c6a554e22f37be6fc97187bc8c", "sha256": "a0c4e86def15dbaff113d99e6d06a86791e355272ee8b8c05771ac34d67b0242" }, "downloads": -1, "filename": "wavefront_pyformance-0.9.1-py2-none-any.whl", "has_sig": false, "md5_digest": "3ff415c6a554e22f37be6fc97187bc8c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6551, "upload_time": "2018-06-05T20:52:45", "url": "https://files.pythonhosted.org/packages/3d/8e/bdf4961b5ea4b3456d9174b549fce704b6f279f55bbb004f15b0d47f7d78/wavefront_pyformance-0.9.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e16438fbc0d7aa8ee8b3d06685d7d69f", "sha256": "05a88ffbb279e1df33cc12bf2a04bdcd194a703dcca488cbf3c2b543764d4654" }, "downloads": -1, "filename": "wavefront_pyformance-0.9.1.tar.gz", "has_sig": false, "md5_digest": "e16438fbc0d7aa8ee8b3d06685d7d69f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4717, "upload_time": "2018-06-05T20:52:46", "url": "https://files.pythonhosted.org/packages/86/da/d666c014ac58d9aab909364d435b17ad10461b1dc7d7f5ab55820be6cf7a/wavefront_pyformance-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "5f3a4d0a5a2ec14c80d966b751ab26eb", "sha256": "df2eb6d399416fc94961418258cb6acb08dfec0921b755c749ad9f710b002cf9" }, "downloads": -1, "filename": "wavefront_pyformance-0.9.2-py2-none-any.whl", "has_sig": false, "md5_digest": "5f3a4d0a5a2ec14c80d966b751ab26eb", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6551, "upload_time": "2018-06-07T20:46:16", "url": "https://files.pythonhosted.org/packages/76/46/393ab28be400c66b2833493d93b3790c09ecc02a1fc485df584f44eb5a20/wavefront_pyformance-0.9.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "38d601fe0c04021d9cc5a2cd30fd9e1d", "sha256": "80312cc930c79c898b4de483897b3e5ef6c7ca4f86bdc99dfc1a679712bdf566" }, "downloads": -1, "filename": "wavefront_pyformance-0.9.2.tar.gz", "has_sig": false, "md5_digest": "38d601fe0c04021d9cc5a2cd30fd9e1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4725, "upload_time": "2018-06-07T20:46:17", "url": "https://files.pythonhosted.org/packages/c9/cc/5d90b1a097ddd4b19b299708bb44e85de5d5f5fcc374d109eae947fd25be/wavefront_pyformance-0.9.2.tar.gz" } ], "0.9.3": [ { "comment_text": "", "digests": { "md5": "137b55f00e8bc1b40d3558de7173f7d5", "sha256": "0cd7058acd21f6c90bccd1697e54f7422e253f57c2964da1769bf7ce9f9f6473" }, "downloads": -1, "filename": "wavefront_pyformance-0.9.3-py3-none-any.whl", "has_sig": false, "md5_digest": "137b55f00e8bc1b40d3558de7173f7d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11556, "upload_time": "2019-03-01T23:51:26", "url": "https://files.pythonhosted.org/packages/2d/24/b43b2fb6160680f142fb7275f41db298a5fd3af386639b2de42094521ce4/wavefront_pyformance-0.9.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a5f0dcfa0eaa90dfc15d5874a4779cf7", "sha256": "dadff82934d9390c0b9db06708988115058705922fb3ac9cf365781569479c89" }, "downloads": -1, "filename": "wavefront-pyformance-0.9.3.tar.gz", "has_sig": false, "md5_digest": "a5f0dcfa0eaa90dfc15d5874a4779cf7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5881, "upload_time": "2019-03-01T23:51:27", "url": "https://files.pythonhosted.org/packages/0a/9c/23ba05169757644ad223db4cf88ded6d40369c57b7f8ba5ce1da5b756e6c/wavefront-pyformance-0.9.3.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "4802257b302f1999e955597ea14f2874", "sha256": "a2ddb7dec8a278881f06648f9af7c00660039ab0cfef3306dea102578b88c803" }, "downloads": -1, "filename": "wavefront-pyformance-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4802257b302f1999e955597ea14f2874", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6012, "upload_time": "2019-03-29T00:01:42", "url": "https://files.pythonhosted.org/packages/f2/22/8f4337801f159170b1ac973a436ccf487d57a71c7f82dfffef4b9e5094bc/wavefront-pyformance-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4802257b302f1999e955597ea14f2874", "sha256": "a2ddb7dec8a278881f06648f9af7c00660039ab0cfef3306dea102578b88c803" }, "downloads": -1, "filename": "wavefront-pyformance-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4802257b302f1999e955597ea14f2874", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6012, "upload_time": "2019-03-29T00:01:42", "url": "https://files.pythonhosted.org/packages/f2/22/8f4337801f159170b1ac973a436ccf487d57a71c7f82dfffef4b9e5094bc/wavefront-pyformance-1.0.0.tar.gz" } ] }