mac- / hapi-statsd Goto Github PK
View Code? Open in Web Editor NEWA hapi plugin for sending request round trip metrics to statsd
License: MIT License
A hapi plugin for sending request round trip metrics to statsd
License: MIT License
hey there,
i was just going through the code, because i want to use this plugin. I'm just wondering if there's a reason you're using a cache for keeping track of the request ids ? looking at the latest hapi api, each request contains already a timestamp for when it came into the system. So to get the startDate
one can just use request.info.received
, which would make this cache object obsolete, the code simpler and the memory-footprint lower. if you're confident with that i would like to add a PR for that.
First of all, great work on this plugin. It works flawlessly and does a great job.
We are looking to use it and need to find a way to limit which endpoints we generate statistics on. We need a way to define which endpoints get statsd metrics, and which status codes. I have several questions about this:
We're asking these questions to decide whether we should attempt to contribute to this code base, or go with our own implementation.
Thanks!
When I try to add 'hapi-statsd' i get the error below. Looks like it requires Hapi.js 6.9.0 and current version is 6.11.0. Is it possible to adjust the version to e.g. "6.x.x" ?
npm ERR! peerinvalid The package hapi does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants hapi@>=2.x.x
npm ERR! peerinvalid Peer [email protected] wants hapi@>=2.x.x
npm ERR! peerinvalid Peer [email protected] wants hapi@>=2.x.x
npm ERR! peerinvalid Peer [email protected] wants hapi@>= 2.x < 7.x
npm ERR! peerinvalid Peer [email protected] wants [email protected]
statsdClient.timing(statName, startDate);
Shouldn't that be something like:
statsdClient.timing(statName, new Date() - startDate);
Otherwise you are just logging the start date and not the actual time it took to execute.
Any plan to port this to hapi 17?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.