Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

wosc/pyramid_scales

Repository files navigation

pyramid_scales

ABANDONED Use https://pypi.org/project/prometheus-client/ instead

The excellent scales library to collect in-process metrics (see Coda Hale’s CodeConf talk "Metrics everywhere" among many others for reasons why you might want use it) comes with a flask-based HTTP server that allows viewing the collected measurements and dumping them as JSON. But if you already are in a web application using pyramid, there's no real need to spin up yet another thread, open another port etc. to do this.

Instead, you can simply include pyramid_scales like so:

import pyramid.config
config = pyramid.config.Configurator()
# rest of your configuration goes here
config.include('pyramid_scales')

This registeres a view below the URL /scales/ where you can view your application's metrics. If you need more control, register the pyramid_scales.scales_stats view yourself in whichever way you need.

This package is compatible with Python version 2.7 (scales itself does not support Python3 yet, so there's no point here).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages