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

Uploaded Source

Built Distributions

django_py_zipkin-0.2.6-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

django_py_zipkin-0.2.6-py2-none-any.whl (6.0 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: django-py-zipkin-0.2.6.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.14

File hashes

Hashes for django-py-zipkin-0.2.6.tar.gz
Algorithm Hash digest
SHA256 c2fc18e9815bf74e62100d50d7265d192962d8402b97fc364cc94fa48eb74566
MD5 e01326e326d94b0c885c7544afe5482e
BLAKE2b-256 dc38669c91027b18f38b4b13a8b9ce7d8b97660670cc64914abb79ee29bb3834

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_py_zipkin-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3

File hashes

Hashes for django_py_zipkin-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 28bd94d5eeaa3b3949a6501248e6c616e447a1bc489c552cdeefa17f3006e54b
MD5 b15bda80eebe6ba56f146f238bb1aec2
BLAKE2b-256 711303675d4dd4cf78e14fa9c8a7f6dcb95b5c5a189372d258a8ea4852ae286c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_py_zipkin-0.2.6-py2-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.14

File hashes

Hashes for django_py_zipkin-0.2.6-py2-none-any.whl
Algorithm Hash digest
SHA256 cce97bb63f0bbc56928ab33d448e02512acbae3e3cd7b21613c76e14f8b47be6
MD5 20a5012472170bafa656119f0ec5a7df
BLAKE2b-256 200e786b6087f7df1e65b6e80d468bb011de257713824a1d397cc48a52a95b92

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