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 middle ware to your Django middleware
MIDDLEWARE += [
'django_istio_opentracing.middleware.Middleware'
]]
and if you using requests jusing using the patch in 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
if you want to use 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-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f090942acdaa1b7fedd0f24ed2cef1b52a104fb40f5e2bb8ec9873c32fa8362 |
|
MD5 | 55a95c71d3f9a8dbe672e31d6e54e965 |
|
BLAKE2b-256 | 7d1ecf440d1ceddf4218a9b24fbfd393a3254eb096edc2f1f300e467f2ca6d1c |