skip to navigation
skip to content

Not Logged In

pyramid_metrics 0.1.2

Performance metrics for Pyramid using StatsD

Latest Version: 0.2.0

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.
 
File Type Py Version Uploaded on Size
pyramid_metrics-0.1.2.tar.gz (md5) Source 2014-05-07 6KB
  • Downloads (All Versions):
  • 18 downloads in the last day
  • 97 downloads in the last week
  • 360 downloads in the last month