Skip to main content

OpenCensus Pyramid Integration

Project description

pypi

Installation

pip install opencensus-ext-pyramid

Usage

In your application, add the pyramid tween and your requests will be traced.

def main(global_config, **settings):
    config = Configurator(settings=settings)

    config.add_tween('opencensus.ext.pyramid'
                     '.pyramid_middleware.OpenCensusTweenFactory')

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

from opencensus.trace import print_exporter
from opencensus.trace.samplers import probability

settings = {
    'OPENCENSUS': {
        'TRACE': {
            'EXPORTER': print_exporter.PrintExporter(),
            'SAMPLER': probability.ProbabilitySampler(rate=0.5),
        }
    }
}

config = Configurator(settings=settings)

References

Project details


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-pyramid, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size opencensus_ext_pyramid-0.3.0-py2.py3-none-any.whl (6.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page