Page MenuHomePhabricator

Investigate how to send request metrics
Closed, ResolvedPublic

Description

Investigate whether it makes sense to use / build on top of the service runner template, or whether we should roll our own.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 26 2019, 11:11 AM
Jakob_WMDE moved this task from To Do to Doing on the Wikidata-Termbox-Iteration-19 board.
Jakob_WMDE added a comment.EditedJul 3 2019, 3:23 PM

The only type of metrics emitted via the service runner template are response times. The place of the metrics call is linked in the task description and "proof" that it's the only one can be seen here: https://github.com/wikimedia/service-template-node/search?utf8=%E2%9C%93&q=metrics&type=

It does not look like the service-runner-template code is going to be easily reusable (without copy&pasting it), as it is indeed meant as a template for new services. The function wrapping routes to emit response times looks almost exactly like the example for the express/response-time middleware. The endTiming statsd method used in service-runner-template is only a facade to the timing method seen in the example. This tempts me to try and implement this using the response-time middleware.

looks done to me

Tarrow closed this task as Resolved.Jul 15 2019, 8:37 AM