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
Built Distribution
File details
Details for the file django-py-zipkin-0.2.7.tar.gz
.
File metadata
- Download URL: django-py-zipkin-0.2.7.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/36.6.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bab2eacaed84c9beeb89dc7ae4f03e4286c42345213b22e9a2a0f11afcd5025a |
|
MD5 | 8861f8d637f35602cc91e7868c1b2c9f |
|
BLAKE2b-256 | cefa697e0c022e57638a506b7c328d2a477fa3ef4ebb21e6e813596c522f818f |
File details
Details for the file django_py_zipkin-0.2.7-py2-none-any.whl
.
File metadata
- Download URL: django_py_zipkin-0.2.7-py2-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/36.6.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 024115f34c1b6c5f1662080327b1c09097333a26eefcf7b1ab57ab49e426ed68 |
|
MD5 | d25ea354a19ff98169572d56b924bac1 |
|
BLAKE2b-256 | 69f3151ee22be3c93557039ae213cce992452830c884511a4a00aaa2fcc4949a |