Django opentracing middleware works with k8s and istio
Project description
Django-istio-opentracing
Django opentracing middleware works with k8s and istio
install:
pip install django-istio-opentracing
example:
Add a middleware to your Django middleware.
MIDDLEWARE += [
'django_istio_opentracing.middleware.Middleware'
]
And if you using requests,
jusing using the patch in maybe your __init__.py
file.
Hint: make sure the patch line before your code.
from django_istio_opentracing import monkey
monkey.patch_requests()
Then use requests whatever you want, every request you make will carry the b3 code in header without extra coding.
Also you can use it directly in view:
from django_istio_opentracing import get_opentracing_span_headers
def index(request):
print(get_opentracing_span_headers())
return HttpResponse('ok')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django_istio_opentracing-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0f40db54750db7f71b5138a21dee4afe67e54f69b2bf94f62bf42e72a671596 |
|
MD5 | e67840dfed460389f097ef9b07eb5832 |
|
BLAKE2b-256 | c6e0a5ebb3056b0deec503d8dde1644a7b23b636aad84a88fdb7ee3914be35c0 |