[99s-extend] Metrics per request and handler

Loïc Hoguin essen at ninenines.eu
Mon Feb 10 10:49:24 CET 2014


You have the meta values in Req which are passed everywhere. You can 
easily set and retrieve them.

On 02/10/2014 10:41 AM, Łukasz Biedrycki wrote:
> Hi again,
> another idea is to make environment (Env), which is passed between
> middlewares, a part of Request record, so I could have an access to it in
> onresponse callback.
>
> Any of that makes sense?
>
> Cheers,
> Łukasz Biedrycki
>
>
> On Fri, Feb 7, 2014 at 5:56 PM, Łukasz Biedrycki <lukasz.biedrycki at gmail.com
>> wrote:
>
>> Hi,
>> in my application I would like to add some metrics per handler and per
>> response http status code.
>>
>> One way is to add on response callback function, but there I do not have
>> an information about handler and handler opts.
>>
>> Second way is to add a middleware, but then I do not have an information
>> about response status code.
>>
>> Frankly, I like second way more.
>> How do like an idea to add response status code to request record similar
>> to: resp_headers or resp_body ?
>>
>> Cheers,
>> Łukasz Biedrycki
>>
>
>
>
> _______________________________________________
> Extend mailing list
> Extend at lists.ninenines.eu
> https://lists.ninenines.eu/listinfo/extend
>

-- 
Loïc Hoguin
http://ninenines.eu



More information about the Extend mailing list