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

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

opencensus-ext-django-0.7.5.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

opencensus_ext_django-0.7.5-py2.py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 2 Python 3

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