Django tool for instrumenting
Project description
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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdfcb1b5ad95bb9318365c8442a47d9dd1318e45ea1b29be6738587cca9ef085 |
|
MD5 | 3761ef5ddd5b42a7f4169fe45de1eb06 |
|
BLAKE2b-256 | a72c2f04a65d6abb13ca081e6b6f37247ad96a58b41fab46bac2ceedc6614507 |
Close
Hashes for shopcloud_django_instrumenting-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fe937817cbfef257705c0b541b63fed204459c66e7edfe44a59c6a17d1e1086 |
|
MD5 | acb0882770a0d8abe8e8cbd3d13427ec |
|
BLAKE2b-256 | 519e5f0a5c747426ad9a347cce0dd72de52b3cba7fc4498ea0ef785f83a7f77b |