Skip to main content

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


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.5.tar.gz (5.1 kB view details)

Uploaded Source

Built Distributions

django_py_zipkin-0.2.5-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

django_py_zipkin-0.2.5-py2-none-any.whl (7.5 kB view details)

Uploaded Python 2

File details

Details for the file django-py-zipkin-0.2.5.tar.gz.

File metadata

File hashes

Hashes for django-py-zipkin-0.2.5.tar.gz
Algorithm Hash digest
SHA256 c08502a8d1eecb8f829b9f8530a31853a083684cdaf8abc7614faefedec3e590
MD5 0a91aa94e4ac5e46e9c05ed72bcc7dd4
BLAKE2b-256 4de961d640bfee15c13786a0a2acd6fce33dba4200c68dce99c439a5a38043a2

See more details on using hashes here.

File details

Details for the file django_py_zipkin-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for django_py_zipkin-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 702cd9378567936ecb35e330783f47bbed12031392ca666073b66d84687c21dd
MD5 aec10a26bdd0604dd5614862fbeccae7
BLAKE2b-256 58324430bd03b0e17cd38b31d13996657397aacff8c2565dc14dcdbce2f4a1be

See more details on using hashes here.

File details

Details for the file django_py_zipkin-0.2.5-py2-none-any.whl.

File metadata

File hashes

Hashes for django_py_zipkin-0.2.5-py2-none-any.whl
Algorithm Hash digest
SHA256 d9392ec8cafba071f5611211a87bbca1565c4ef756a6bc180c02ba452672176d
MD5 53c629e3aaf1c017d29389405333fc5f
BLAKE2b-256 de6ed1b64c13f3338048ed943aa4c58c5507ed80b82da525c406492d56c7d800

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page