{"repo":"kpn/py-timeexecution","free":true,"listed":false,"github":"https://github.com/kpn/py-timeexecution","clone":"git clone https://github.com/kpn/py-timeexecution.git","description":"Time Execution: record application metrics","language":"Python","stars":13,"topics":["elasticsearch","metrics","python"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"Time Execution This package is designed to record application metrics into specific backends. With the help of Grafana or Kibana you can easily use these metrics to create meaningful monitoring dashboards. Features Sending data to multiple backends (e.g. ElasticSearch) Custom backends Hooks to include additional data per metric. Available backends Elasticsearch client \\ =8,\\ =7,\\ =3.5. For example: Hooks time execution supports hooks where you can change the metric before its being sent to the backend. With a hook you can add additional and change existing fields. This can be useful for cases where you would like to add a column to the metric based on the response of the wrapped function. Simple callable hook A function which is called after calling the decorated function and before sending the metrics. It receives the following arguments: response : the returned value of the wrapped function exception : exception raised the wrapped function, if any metric : a dictionary containing the data to be sent to the backend func : the decorated function itself func args : original args received by the wrapped function. func kwargs : original kwargs received by the wrapped function. From within a hook you can change the name if you want the metrics to be split into multiple series. See the following example how to setup hooks. There is also possibility to create decorator with custom set of hooks. It is needed for example to track celery tasks. Generator hook A generator hook works si","default_branch":null,"files":null,"tree":[],"storefront":"/r/kpn","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kpn/py-timeexecution/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}