Django tool for instrumenting
Project description
Instrumenting
install
- install with your favorite Python package manager
pip3 install shopcloud-django-instrumenting
LogRequestMiddleware
add additional Information from request in AppEngine to Log
usage
add to MIDDLEWARE in django-app settings.py:
MIDDLEWARE = [
...
'shopcloud_django_instrumenting.middleware.LogRequestMiddleware',
]
tracing
from shopcloud_django_instrumenting import tracing
tr = tracing.Tracer('name_of_service', 'name_of_operation')
with tr.start_span('event.processing') as span:
pass
data = tr.close()
deploy
$ rm -rf build dist
$ pip3 install wheel twine
$ python3 setup.py sdist bdist_wheel
$ twine upload dist/*
develop
$ pytest
$ pip3 install coverage
# shell report
$ coverage run -m pytest && coverage report --show-missing
# html report
$ coverage run -m pytest && coverage html
$ cd htmlcov
$ python3 -m http.server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for shopcloud_django_instrumenting-1.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1468174a2fc38937f4b43c2795c2dbc18126316ad48afdf57b8d20f3e7c6ff3 |
|
MD5 | ffecdd3bb42fd4bd73afc91ed7225a23 |
|
BLAKE2b-256 | c44e5d4ee1b6ed6ab4535b67e39651875161d69bf5e384111378542cdf61a7f4 |
Close
Hashes for shopcloud_django_instrumenting-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04dd0c70512c5440efde7d16197504240be7d27fe59b0c30ac262a95cc5e91f6 |
|
MD5 | f10f1c2c359e12f1123ab21b73834081 |
|
BLAKE2b-256 | afedd5f617c3f1e83d9d3450aa5d3db3756e7b8bff786ed2b6bcfe42e81a19df |