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 import samplers

settings = {
    'OPENCENSUS': {
        'TRACE': {
            'EXPORTER': print_exporter.PrintExporter(),
            'SAMPLER': samplers.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.

Source Distribution

opencensus-ext-pyramid-0.7.3.tar.gz (4.5 kB view hashes)

Uploaded source

Built Distribution

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 Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page