Skip to main content

Performance metrics for Pyramid using StatsD

Project description

Performance metrics for Pyramid using StatsD. The project aims at providing ways to instrument a Pyramid application in the least intrusive way.

Installation

Install using setuptools, e.g. (within a virtualenv):

$ pip install pyramid_metrics

Setup

Once pyramid_metrics is installed, you must use the config.include mechanism to include it into your Pyramid project’s configuration. In your Pyramid project’s __init__.py:

config = Configurator(.....)
config.include('pyramid_metrics')

Alternately you can use the pyramid.includes configuration value in your .ini file:

[app:myapp]
pyramid.includes = pyramid_metrics

Usage

Pyramid_metrics configuration (values are defaults):

[app:myapp]
metrics.host = localhost
metrics.port = 8125

metrics.prefix = application.stage

metrics.route_performance = true

Currently implemented

  • Collection utility as a request method

  • Ability to send metrics per Pyramid route

  • Simple time marker mechanism

  • Simple counter

TODO

  • Full StatsD metric types

  • Extensions for automatic metrology (SQLAlchemy, MongoDB, Requests…)

  • Whitelist/blacklist of metrics

  • Time allocation per subsystem (using the time marker mechanism)

Considerations

  • The general error policy is: always failsafe. Pyramid_metrics should NEVER break your application.

  • The DNS resolution is done during configuration to avoid recurring latencies.

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

pyramid_metrics-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file pyramid_metrics-0.1.0.tar.gz.

File metadata

File hashes

Hashes for pyramid_metrics-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b4cb55e6cf006f2336edd54e86ae14979ccc5b1b9977ce343112ab66ec73866f
MD5 695fab49abd3d57110e6e62994d0c5ed
BLAKE2b-256 9217617358e399529541bee7e54ec7c14eee913ab3895fe3d757a6f9ab6d1c98

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page