Skip to main content

OpenCensus Django Integration

Project description

pypi

Installation

pip install opencensus-ext-django

Usage

For tracing Django requests, you will need to add the following line to the MIDDLEWARE section in the Django settings.py file.

MIDDLEWARE = [
    ...
    'opencensus.ext.django.middleware.OpencensusMiddleware',
]

Additional configuration can be provided, please read Customization for a complete reference.

OPENCENSUS = {
    'TRACE': {
        'SAMPLER': 'opencensus.trace.samplers.ProbabilitySampler(rate=1)',
        'EXPORTER': '''opencensus.ext.ocagent.trace_exporter.TraceExporter(
            service_name='foobar',
        )''',
    }
}

References

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for opencensus-ext-django, version 0.7.6
Filename, size File type Python version Upload date Hashes
Filename, size opencensus_ext_django-0.7.6-py2.py3-none-any.whl (6.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size opencensus-ext-django-0.7.6.tar.gz (6.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page