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 details)

Uploaded Source

Built Distribution

opencensus_ext_pyramid-0.7.3-py2.py3-none-any.whl (5.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file opencensus-ext-pyramid-0.7.3.tar.gz.

File metadata

  • Download URL: opencensus-ext-pyramid-0.7.3.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2

File hashes

Hashes for opencensus-ext-pyramid-0.7.3.tar.gz
Algorithm Hash digest
SHA256 1fb5c40aa0ffffba986a3b18552af1479ee401a630b88d430d72fd7b571bc9e5
MD5 b0471c0af0381c97b2cc676038be5a65
BLAKE2b-256 af8099756ae58b53eecd44f0e041157c5cc6ebd4733ace4efbaa7250dd190360

See more details on using hashes here.

File details

Details for the file opencensus_ext_pyramid-0.7.3-py2.py3-none-any.whl.

File metadata

  • Download URL: opencensus_ext_pyramid-0.7.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2

File hashes

Hashes for opencensus_ext_pyramid-0.7.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a7b031621e72855b83d1e67c65a1bae8e6e4101dd727c72533e506a9e5e9fd4b
MD5 d61d6564cee1f1499f7154b44a6c5a15
BLAKE2b-256 e0711ecd9fda60bf92aab859fea6f09303aaf386de230616c7e9678f2c541b42

See more details on using hashes here.

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