Commit Graph

102 Commits

Author SHA1 Message Date
Álvaro
5c491a25cf
Use env vars and fix tests 2020-12-16 16:32:32 +01:00
Daniel García Aubert
28f70f6877 Logger: rename key 'msg' => 'event_message' 2020-07-23 14:01:34 +02:00
Daniel García Aubert
b9198b59a1 Logger: rename 'error' => 'exception' to avoid name clashing in E/S 2020-07-21 17:53:46 +02:00
Daniel García Aubert
3937b8c271 Adapt JSON output to the standard structure 2020-07-21 16:36:23 +02:00
Daniel García Aubert
b32a073ac3 Metro: stop aggregating log per request id, use new config.json file 2020-07-20 19:33:33 +02:00
Daniel García Aubert
74116523b4 Merge branch 'master' into dgaubert/ch78384/maps-api-replace-log4js-logger-by-pino 2020-06-22 12:12:45 +02:00
Daniel García Aubert
6cddec562a Profiler don't log times if there is no one task done at least 2020-06-19 11:42:46 +02:00
Daniel García Aubert
578f543c01 log user 2020-06-11 18:21:13 +02:00
Daniel García Aubert
f6c8796c8a Do not duplicate timer 2020-06-11 10:12:27 +02:00
Daniel García Aubert
e49ecda321 Don't create a new metric for each request, use the same label to send to statsd 2020-06-10 17:21:35 +02:00
Daniel García Aubert
9c21194c68 Set cache buster equal to 0 when there is no affected tables in the mapconfig 2020-06-09 12:21:47 +02:00
Daniel García Aubert
a5c83edef6 Introducing @carto/metro, the carto logs and metrics transport. 2020-06-08 20:16:00 +02:00
Daniel García Aubert
b115bca07e Be able to tag requests with labels as easier way to provide business metrics 2020-06-08 16:29:22 +02:00
Daniel García Aubert
02c8e28494 Finalize request's log 2020-06-05 20:08:40 +02:00
Daniel García Aubert
d28744a5e3 Be able to pass the logger to the analysis creation (camshaft) while instantiating a named map with analysis 2020-06-05 20:08:08 +02:00
Daniel García Aubert
adeffd2018 Centralize common headers, this will help up to move biz metrics out of the process 2020-06-04 17:45:15 +02:00
Daniel García Aubert
6945cfc93c Add TODO 2020-06-04 12:10:15 +02:00
Daniel García Aubert
7b53b7c30a Stop using profiling wrongly. Now it only saves custom events from backends (tile, map, attributes, etc..) and calculates the response time. Besides, removed tags to know whether overviews are being used. 2020-06-03 19:51:56 +02:00
Daniel García Aubert
210f5b01ec Make sure all errors use the serializer set for the logger 2020-06-03 17:32:16 +02:00
Daniel García Aubert
1dda183a31 typo 2020-06-03 16:19:42 +02:00
Daniel García Aubert
0eadfe6ee9 Simpligy error middleware 2020-06-03 15:52:24 +02:00
Daniel García Aubert
c37e3f173d Handle error properly in user middleware, it will logged in error middleware 2020-06-03 15:39:02 +02:00
Daniel García Aubert
107a97aa9e Honor @oleurud's comment 2020-06-03 15:11:08 +02:00
Daniel García Aubert
1e89821d97 Use standard serializers for error, request, and response 2020-06-03 14:28:35 +02:00
Daniel García Aubert
29c6505252 Do not set header 'x-tiler-profiler' and log it instead 2020-06-02 17:09:06 +02:00
Daniel García Aubert
7d8d05b865 Log errors and do not send 'X-Tiler-Errors' header 2020-06-02 16:15:01 +02:00
Daniel García Aubert
afeb91dc86 Bring back logger for windshaft 2020-06-02 13:20:57 +02:00
Daniel García Aubert
b60116410a Use req/res logger instead of the one bound to global object 2020-06-02 12:31:18 +02:00
Daniel García Aubert
48c28aea0b Do not bind logger to global object, now it's a part of serverOptions 2020-06-02 11:49:54 +02:00
Daniel García Aubert
62d66f2dbc Do not use global logger in middlewares, use the one initialized in res.locals instead 2020-06-02 09:00:45 +02:00
Daniel García Aubert
163c546236 Replace log4js by pino as logger:
- Logs to stdout, disabled while testing
- Change log calls signature when needed
- Use development version of camshaft
- Removes unused log cofiguration
- Bind request id to log req/res
- Log req at the begining of the cycle and res at the end
2020-06-01 19:18:15 +02:00
Daniel García Aubert
6bcf477532 Avoid custom headers to be undefined 2020-05-29 16:06:16 +02:00
Daniel García Aubert
f82232194c Under if 2020-05-26 16:31:53 +02:00
Daniel García Aubert
aff5c9a614 Add test to check the headers exist while instantiating a map 2020-05-26 16:28:44 +02:00
Daniel García Aubert
ddefb1a6ca Add 'Carto-Stat-Tag', 'Carto-User-Id', and 'Carto-Client' headers 2020-05-26 13:15:35 +02:00
Daniel García Aubert
4dfc898587 Don't log when metrics where sent successfully 2020-05-01 13:25:03 +02:00
Daniel García Aubert
8c38ecf808 Missing substring 2020-04-30 13:24:41 +02:00
Daniel García Aubert
a196a26ab4 Get templateHash for static tile request and errored named map instantiations 2020-04-30 13:09:12 +02:00
Daniel García Aubert
d5348dd9d4 Rename fields from headers of metrics 2020-04-29 18:48:10 +02:00
Daniel García Aubert
7e31b956bf Send stat_tag metric when available 2020-04-29 18:25:01 +02:00
Daniel García Aubert
dbc5d65d90 Send template_hash as part of the metrics event 2020-04-29 17:26:33 +02:00
Daniel García Aubert
798d010776 Ensure "map_id" and "cache_buster" as part of the event 2020-04-29 14:32:08 +02:00
Daniel García Aubert
70f0b6ea50 Avoid to use "pubsub" for the name of modules, middlewares, variables, etc.. 2020-04-29 10:40:45 +02:00
Daniel García Aubert
4e3ef96374 Add test to chek we still send events when errored map static tile 2020-04-29 10:28:10 +02:00
Daniel García Aubert
c88a14bf43 Send metrics for map instantiations (named, anonymous and static) with the new format. 2020-04-28 19:17:00 +02:00
Daniel García Aubert
c5cb2ea4cb Add FIXME comment 2020-04-27 13:35:19 +02:00
Daniel García Aubert
fe9610abe9 Missing logger argument 2020-04-27 13:35:07 +02:00
Daniel García Aubert
1bbde4f5e3 Let to the caller to choose how to handle the call to a method 2020-04-27 13:27:05 +02:00
Daniel García Aubert
e90c196598 Simplified metrics middleware and backend 2020-04-27 12:46:27 +02:00
Daniel García Aubert
42dc2915ea Send pubsub metrics once the response has finished 2020-04-27 11:41:37 +02:00