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.4.tar.gz
(5.0 kB
view hashes)
Built Distributions
Close
Hashes for django_py_zipkin-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a594fcea136e73df227c069e416c60c5e757c6c7dcb27cd46beaecf367de1e0 |
|
MD5 | 028f059eb80b4195e260c98ae93bef1d |
|
BLAKE2b-256 | 2c068c3c53775b277df8f31a4cedc202ee56ab30f9359a51401b7e412b612626 |
Close
Hashes for django_py_zipkin-0.2.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1381cb7285c27c62d5cb6b513f7af7dbbe9ef45ca3e5c3dde000bc449cdfd65 |
|
MD5 | 04608b038c07055ef0d1ae0150b43d7a |
|
BLAKE2b-256 | 0b142e1ac686e9af788d6f17ead93d995957152542a0b74670c27f68fad8c26d |