bricks-analytics

0.1.1 • Public • Published

bricks-analytics

bricks-analytics adds basic route analytics and status information about the health of the http server.

Installing

npm install bricks-analytics

Usage

var analytics = require('bricks-analytics');

appServer.addRoute(".+", analytics, { section: "pre", top: true, keep: 100 /* default 10 */ });

Analytics are then available via two JSON requests:

$ curl http://host.name/bricks-status/analytics.json
$ curl http://host.name/bricks-status/status.json

or via an html page:

http://host.name/bricks-status/analytics.html

Methodology

bricks-analytics hooks into the call stack during and after execution. Given that bricks uses a stack-based routing system, adjustments to start times happen upon request. Also, given that a route can finish before the call stack is fully unwound, actual execution time could be less than the sum of each route.

Package Sidebar

Install

npm i bricks-analytics

Weekly Downloads

1

Version

0.1.1

License

MIT/X11

Last publish

Collaborators

  • jerrysievert