Commit graph

800 commits

Author SHA1 Message Date
Shane Kilkelly
a5aec5b812 Test failure to wrap method 2017-03-16 10:02:19 +00:00
Shane Kilkelly
40b238271d Add tests for methods producing errors, and logger 2017-03-16 09:55:07 +00:00
Shane Kilkelly
c3b18618bf Add unit tests 2017-03-16 09:49:45 +00:00
Shane Kilkelly
e99a7f6a87 refactor 2017-03-15 16:07:36 +00:00
Shane Kilkelly
3cb0ab2784 Add a 'timeAsyncMethod' helper 2017-03-15 15:06:54 +00:00
James Allen
aebaff829b Update package.json 2017-03-06 12:09:37 +00:00
Brian Gough
dfb2a069c0 use try catch around sentry logging 2017-03-03 16:05:56 +00:00
Brian Gough
5fc5a86b31 upgrade to latest raven 2017-03-03 14:43:41 +00:00
Brian Gough
68b941357e avoid uninitialised last error timestamp 2017-02-23 09:42:01 +00:00
Brian Gough
6e3f102fb2 rate limit on sentry reporting 2017-02-23 09:29:52 +00:00
James Allen
caeac717fc Set UV_THREADPOOL_SIZE to 128 for all processes 2016-10-24 10:50:44 +01:00
Brian Gough
cf0e106153 release 1.5.1 2016-04-01 15:52:42 +01:00
Brian Gough
24e097d263 don't force message over exception but include it as description 2016-04-01 15:52:28 +01:00
Brian Gough
7bdf2ef26b release 1.5 2016-04-01 15:35:54 +01:00
Brian Gough
fdc1ad2898 use logger.error message as title of sentry report 2016-04-01 15:35:14 +01:00
Brian Gough
04529c0019 release 1.4 2016-03-30 14:30:05 +01:00
Brian Gough
e04e6332e8 add fatal exception reporting
split out capture exception code into separate method
2016-03-29 12:53:16 +01:00
Shane Kilkelly
9c6df30031 remove deps 2016-03-25 14:51:52 +00:00
Shane Kilkelly
e6e3fb6948 change to be a class, with settings passed in 2016-03-25 14:33:38 +00:00
Shane Kilkelly
7786ef9ed8 set package to private 2016-03-25 11:06:11 +00:00
Shane Kilkelly
fc3c0d1384 init (copied from thirdpartydatastore-sharelatex) 2016-03-25 11:04:46 +00:00
Brian Gough
2df5845444 updated version to 1.5.0 2016-03-17 09:40:40 +00:00
Brian Gough
622bbe3123 return timeSpan from timers
to allow additional calculation
2016-03-15 13:52:40 +00:00
Brian Gough
29177f8de8 add support for statsd count method 2016-03-15 13:52:32 +00:00
Brian Gough
e8b8cfd9e0 release version 1.3.1 2016-01-26 16:42:08 +00:00
Brian Gough
17cf288e4c recreate Error objects from plain objects when logging to sentry 2016-01-26 16:41:52 +00:00
Brian Gough
2e21da050c add logging of request parameters to sentry 2016-01-05 13:34:50 +00:00
Brian Gough
fd70f23e5c updated version to 1.2.1 2015-12-18 10:58:03 +00:00
Brian Gough
06662f869f capture id's as tags, and pass attributes to sentry 2015-12-17 16:41:32 +00:00
Brian Gough
f1abe1e03b allow passing options to sentry 2015-12-08 10:30:18 +00:00
James Allen
8db30020ae Monitor event loop by looking for skew
If we monitor with setImmediate, we miss big blocking loops. For example,
suppose we have 1000 1ms loops then a single bad 1000ms loop. setImmediate
will only be called at the right time 1/1000 of the time (it has to be the
loop just before the bad one). So this monitoring method gives a good average
if the std dev is low, but doesn't pick up spikes.

Instead, we can monitor the skew from the expected time between setIntervals.
In the case above, with a setInterval for 1000ms, we will pick up a skew
proportional to the amount of time that it overlaps the bad loop. So 50%
change of picking up skew > 500ms, and thus getting a good sense of any
spikes.
2015-12-03 16:32:20 +00:00
Henry Oswald
30bfae5b35 upgraded bunyan 2015-12-01 20:51:08 +00:00
James Allen
738363a6de Set maxSockets to Infinity for all services 2015-08-31 14:02:03 +01:00
Brian Gough
0215b12a5f log memory usage every minute 2015-08-20 17:03:58 +01:00
Brian Gough
f237f7c3cc remove bug in optional argument handling 2015-08-18 11:23:10 +01:00
Brian Gough
27c382416a fix whitespace 2015-08-17 15:19:13 +01:00
Brian Gough
e3e8d80466 remove non-working metrics from graphite 2015-08-17 15:19:07 +01:00
Brian Gough
d2af7b24a0 remove randomisation to avoid shutdown problems 2015-08-17 15:18:18 +01:00
Brian Gough
577a3759c0 bugfix for memory chunk size 2015-08-14 15:44:24 +01:00
Brian Gough
46ec20ef9c add memory check and periodic gc 2015-08-14 14:38:24 +01:00
Brian Gough
175e3efd5f update package version to 1.2.0 2015-08-06 09:40:58 +01:00
Brian Gough
349b499f85 add compatibility with v2 mongo driver 2015-07-30 08:57:43 +01:00
Brian Gough
ffa523bced added monitoring of event loop time
should indicate if node is blocking on libuv threads
as described in https://nodejs.org/api/dns.html#dns_dns_lookup
2015-06-23 10:51:48 +01:00
James Allen
90e6c85e54 Send errors to Sentry if configured 2015-06-16 16:50:18 +01:00
Henry Oswald
5637678b48 bumped bunyan version to work with node 0.12 2015-06-08 10:01:45 +01:00
Henry Oswald
9329249bc9 Revert "reduce memory capture in http logger"
This reverts commit fc2e043b20204e04f240814d4efc05762db7df96.

Had to revert this because req.route.path is not set until a matching
route has been hit, so it was always null inside res.end meaning
statsd data was never sent over.

This commit did not actually stop the memory leak so reverting it
has not short term repocusion
2015-05-14 16:14:24 +01:00
Brian Gough
1e0a991fcd reduce memory capture in http logger
only capture the properties of 'req' that we need, to avoid leaking
the whole req object for responses that never call res.end()
2015-05-05 10:50:59 +01:00
Brian Gough
fa7e068ebb update minor version, due to addition of new close() method 2015-01-05 16:46:44 +00:00
Brian Gough
30070f23b8 add a close() method to terminate the module cleanly
closes the statsd connection and cancels registered interval timers
prevents express from hanging when trying to shutdown
2015-01-05 16:45:32 +00:00
Henry Oswald
3334a55944 bump package 2014-11-20 12:50:31 +00:00