py2 & py3 compatible zipkin for Django
Project description
Django middleware and tracing utilities for submitting traces to Zipkin. py2 / py3 compatible.
Usage
Set the settings, if not set it’ll use defaults:
- ZIPKIN_SERVICE_NAME: unknown
The name to use when identifying the service being traced.
- ZIPKIN_TRANSPORT_HANDLER: django_py_zipkin.transport.zipkin_transport
Transport to use to submit traces to Zipkin. The default one submits in the background via Celery.
- ZIPKIN_ADD_LOGGING_ANNOTATION: True
Whether to add a ‘logging_end’ annotation when py_zipkin finishes logging spans
- ZIPKIN_TRACING_ENABLED: False
Whether or not to enable tracing, requires explicit enabling.
- ZIPKIN_TRACING_SAMPLING: 1.00
The sampling threshold
- ZIPKIN_BLACKLISTED_PATHS: []
List of regular expressions to ignore from tracing.
Add the middleware
MIDDLEWARE = [ ... 'django_py_zipkin.middleware.ZipkinMiddleware', ... ]
Or instrument your code with the context manager:
with trace('span-name', request.zipkin_tracer) as context traced_value = do_something_that_takes_time() context.update({ 'some.key': traced_value, })
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
django-py-zipkin-0.2.3.tar.gz
(5.0 kB
view hashes)
Built Distributions
Close
Hashes for django_py_zipkin-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d4c2b9111d5ad302dd5829c6500ebb7dca1d96492108416df9d1ce09341da57 |
|
MD5 | 4e3a52fb2b1ed34f49f23b0ac4524601 |
|
BLAKE2b-256 | af322fd2d84f4fb194009fcae0640e3277691c11dce77440bd568336a4ca5897 |
Close
Hashes for django_py_zipkin-0.2.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c72249cbf681c1f9df0a1a27d37800a0f98b9249d5790c6521ed5bb8e078e3f |
|
MD5 | fabc597f3f2462150e285955e6b78495 |
|
BLAKE2b-256 | 942844205da237f3b152110c87dcad7ce57136ad8ce2d8e60f31564178c49897 |