Commit Graph

554 Commits

Author SHA1 Message Date
John Lees-Miller f80753fe40 Add linting and formatting 2020-04-17 09:14:35 +01:00
John Lees-Miller 113c2cc5ec Add CI badge 2020-04-17 09:13:04 +01:00
John Lees-Miller ad6b25e2c1 Add .circleci/config.yml 2020-04-17 09:10:47 +01:00
Jakob Ackermann ea767920fc [misc] fix unit tests 2020-04-01 16:40:15 +02:00
Henry Oswald 264e549fc5 bump io redis to 4.16.1 2020-03-31 09:40:44 +01:00
Eric Mc Sween 8131c5ac91 2.6.2 2020-03-25 09:53:54 -04:00
Eric Mc Sween ef7e3b0e7a Fix HTTP request timing metrics
The conversion between high resolution time and milliseconds was
incorrect.
2020-03-25 09:39:21 -04:00
Jakob Ackermann 2137c7a42c [misc] version bump to 1.9.1 2020-03-23 13:06:32 +01:00
Jakob Ackermann b049331777 [misc] fix decaff cleanup for reportedToSentry
Previously it would bailout of the loop after processing ANY attribute.
REF: 6fe4dcbf32720282821d42140ab92593866e0772
2020-03-23 10:48:55 +01:00
Eric Mc Sween a17843f3bf 2.6.1 2020-03-20 07:47:05 -04:00
Eric Mc Sween 25448bfef4 Downgrade all request logs to INFO
Commit 9056143fe36f1347a1ff985ef8592a1de7d798dd added logic to log
requests with different error levels depending on the status code. The
intention was to make the 5xx and 4xx requests stand out in Stackdriver.
Unfortunately, this also creates a lot of noise in Sentry since we log
the errors separately from the requests.

This commit brings back the former behaviour of logging all requests at
the INFO level. We can revisit this if we integrate the strategy
implemented in filestore of logging once per request.
2020-03-18 08:41:11 -04:00
Eric Mc Sween 62e82d7469 Send the status code with the HTTP request size metric 2020-03-12 06:24:46 -04:00
Eric Mc Sween 4a92be80ea Send HTTP request size metric
The metric is a "summary" called http_request_size_bytes.
2020-03-11 16:39:49 -04:00
Brian Gough 03e81153db avoid step effects in summary metrics
reduce the window size from 10 minutes to 1 minute,  so that short
spikes do not cause a 10 minute long "table" graph.
2020-03-10 15:01:09 +00:00
Simon Detheridge 74c2afc12d Bump package version 2020-03-04 10:31:12 +00:00
Simon Detheridge 9a8cddbbb6 Don't set UV_THREADPOOL_SIZE if already set 2020-03-03 17:09:35 +00:00
mserranom 2e35a7ccf9 removed grunt 2020-02-17 16:24:52 +01:00
mserranom c8617ff55e updated paths 2020-02-17 16:17:53 +01:00
mserranom fbbee7d499 removed coffeescript 2020-02-17 16:17:05 +01:00
decaffeinate ec32a2b1e2 decaffeinate: Run post-processing cleanups on AccessTokenEncryptorTests.coffee 2020-02-17 16:05:42 +01:00
decaffeinate d8832849aa decaffeinate: Convert AccessTokenEncryptorTests.coffee to JS 2020-02-17 16:05:42 +01:00
decaffeinate 45717e21fe decaffeinate: Rename AccessTokenEncryptorTests.coffee from .coffee to .js 2020-02-17 16:05:41 +01:00
decaffeinate 7df0e74feb decaffeinate: Run post-processing cleanups on AccessTokenEncryptor.coffee 2020-02-17 16:04:54 +01:00
decaffeinate 054bbee912 decaffeinate: Convert AccessTokenEncryptor.coffee to JS 2020-02-17 16:04:53 +01:00
decaffeinate b51f05bf5e decaffeinate: Rename AccessTokenEncryptor.coffee from .coffee to .js 2020-02-17 16:04:53 +01:00
John Lees-Miller 59156ec89e Fix incorrect expect 2020-01-27 10:45:31 +00:00
Brian Gough 2273978e7b fix gauge usage 2019-12-16 11:42:10 +00:00
Brian Gough 3a5374c6f9 increase minor version for backwards compatible addition 2019-12-16 10:22:50 +00:00
Brian Gough 93df87eff3 allow options for count 2019-12-16 10:18:30 +00:00
Simon Detheridge 620573c0ad Add an explicit test for a 2019 string 2019-12-09 16:07:25 +00:00
Simon Detheridge b8d5f6baeb Split methods to reduce code duplication 2019-12-09 15:35:22 +00:00
Simon Detheridge 73f293cf49 Remove unneeded 'async' dependency
Co-Authored-By: Jakob Ackermann <das7pad@outlook.com>
2019-12-09 15:01:31 +00:00
Simon Detheridge a9e39af24f Keep oldmethods and use old method when app uses an older label 2019-12-09 14:49:23 +00:00
Simon Detheridge c1cd5c65e7 Update dev dependencies 2019-12-05 08:58:49 +00:00
Simon Detheridge 120890bb08 Update lib/coffee/AccessTokenEncryptor.coffee
Co-Authored-By: Jakob Ackermann <das7pad@outlook.com>
2019-12-05 08:57:19 +00:00
Simon Detheridge c2fc2ed178 Replace deprecated createCipher with createCipheriv for new tokens
Co-authored-by: Alasdair Smith <ali@alasdairsmith.co.uk>
2019-12-04 10:09:39 +00:00
Simon Detheridge 4d6ed4fd3a Run tests via 'npm test' 2019-12-04 10:02:20 +00:00
Simon Detheridge 53aa2490f5 Merge pull request #20 from overleaf/spd-metrics-ttl
Add mechanism to expire old prometheus metrics
2019-10-28 17:21:57 +00:00
Simon Detheridge feecda8ea8 Use map instead of hash for metrics 2019-10-28 14:39:53 +00:00
Simon Detheridge e0cf10a886 Fix typo, gague -> gauge 2019-10-28 12:34:04 +00:00
Eric Mc Sween 7b7b6d0793 2.3.0 2019-10-25 07:17:43 -04:00
Eric Mc Sween 364cdf1fdb 1.9.0 2019-10-25 07:15:35 -04:00
Eric Mc Sween 166211b278 Stackdriver logging
When the environment variable STACKDRIVER_LOGGING is set to true, send
request logs in a format that Stackdriver knows how to interpret. Also,
set the log level accordint to the status code. 4xx responses are logged
as warnings and 5xx responses are logged as errors.
2019-10-24 22:05:12 -04:00
Eric Mc Sween cb300b79ea Add option to log to Stackdriver
When the environment variable STACKDRIVER_LOGGING is set to true, logs
are sent to Stackdriver in addition to stdout.
2019-10-24 17:15:29 -04:00
Eric Mc Sween 905d65931a Small cleanup, satisfy linter, add prettier 2019-10-24 17:15:29 -04:00
Simon Detheridge 07e4eb4dfb Add mechanism to expire old prometheus metrics
Adds a wrapper around the prometheus client, which keeps track of the
last time a metrics was accessed, and removes old ones once they have
not been accessed for a period of time.
2019-10-23 17:07:45 +01:00
Shane Kilkelly 1735e8f56b Upgrade to node 10, specify digest in pbkdf2 2019-10-08 15:53:08 +01:00
Brian Gough c8d50d0ee9 upgrade ioredis to v4.14.1 2019-10-01 16:44:04 +01:00
John Lees-Miller 626511fa73 Bump version number 2019-09-19 16:11:59 +01:00
Brian Gough d9214b6eeb check full reply in health check 2019-09-19 15:41:43 +01:00