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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecbe883d5a2faf52acf18976932c4e3cba166b7d606f5400852def8b1fa7858b |
|
MD5 | 93544c5ff6a047a92cca378dedba7576 |
|
BLAKE2b-256 | c781b95dde1c6a968870fc1ec72e413ebd9e19c2638c9094966b2c53707aa81d |
Close
Hashes for shopcloud_django_instrumenting-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dee294f922bb5171d12cefdf65d907b1d596926442ccc420e84c2766c78f90de |
|
MD5 | b34c9e72671cee1739a4869a0ae27ec2 |
|
BLAKE2b-256 | 3908f03180ba7cefd2190b583a24b7091c22396013436716adcf07321aa2660b |