Socket
Book a DemoInstallSign in
Socket

opencensus-ext-django

Package Overview
Dependencies
Maintainers
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencensus-ext-django

OpenCensus Django Integration

0.8.0
pipPyPI
Maintainers
4

OpenCensus Django Integration

|pypi|

.. |pypi| image:: https://badge.fury.io/py/opencensus-ext-django.svg :target: https://pypi.org/project/opencensus-ext-django/

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.

.. code:: python

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

Additional configuration can be provided, please read Customization <https://github.com/census-instrumentation/opencensus-python#customization>_ for a complete reference.

.. code:: python

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

References

  • OpenCensus Project <https://opencensus.io/>_

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.