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

Uploaded Source

Built Distribution

django_py_zipkin-0.2.7-py2-none-any.whl (7.6 kB view details)

Uploaded Python 2

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

Hashes for django-py-zipkin-0.2.7.tar.gz
Algorithm Hash digest
SHA256 bab2eacaed84c9beeb89dc7ae4f03e4286c42345213b22e9a2a0f11afcd5025a
MD5 8861f8d637f35602cc91e7868c1b2c9f
BLAKE2b-256 cefa697e0c022e57638a506b7c328d2a477fa3ef4ebb21e6e813596c522f818f

See more details on using hashes here.

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

Hashes for django_py_zipkin-0.2.7-py2-none-any.whl
Algorithm Hash digest
SHA256 024115f34c1b6c5f1662080327b1c09097333a26eefcf7b1ab57ab49e426ed68
MD5 d25ea354a19ff98169572d56b924bac1
BLAKE2b-256 69f3151ee22be3c93557039ae213cce992452830c884511a4a00aaa2fcc4949a

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