http-metric
Measure HTTP requests
Last updated 7 years ago by camshaft .
MIT · Original npm · Tarball · package.json
$ cnpm install http-metric 
SYNC missed versions from official npm registry.

http-metric

Measure HTTP requests

Usage

To start measuring outgoing HTTP/HTTPS requests just require http-metric in your app code:

require('http-metric');

This will patch the built-in http methods to log requests:

measure=response_time val=171 units=ms code=200 method=GET path=/ host=www.google.com proto=http fn=request at=http
measure=response_time val=172 units=ms code=200 method=GET path=/ host=www.google.com proto=http fn=request at=http
measure=response_time val=176 units=ms code=200 method=GET path=/ host=www.google.com proto=https fn=request at=http

You can turn it off by default by calling debug:

require('http-metric').debug();

and conditionally show it by setting the DEBUG environment variable to http:request

Testing

$ npm test

Current Tags

  • 0.1.0                                ...           latest (7 years ago)

1 Versions

  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |