Tong, I may have misread your e-mail. I missed the “s” in http(s).

I don’t see anything that would be special about http requests, so they should 
just work.

Cheers
Felix

> On 10 Nov 2016, at 17:02, Felix Geisendörfer <fe...@felixge.de> wrote:
> 
> Hi Tong,
> 
> the README example shows logging request related information (method, url) in 
> addition to the response related stuff.
> 
> Most of the request related information is easy to get directly from the 
> request object, so I didn’t implement any special support for that yet.
> 
> That being said, I could imagine adding a `Read` metrics field for the number 
> of bytes read from the request’s body.
> 
> What sort of metrics did you have in mind?
> 
> Cheers
> Felix
> 
>> On 10 Nov 2016, at 16:55, Tong Sun <suntong...@gmail.com 
>> <mailto:suntong...@gmail.com>> wrote:
>> 
>> That's very interesting Felix. Can it handle https requests as well? 
>> 
>> 
>> On Thursday, November 10, 2016 at 6:09:32 AM UTC-5, Felix Geisendoerfer 
>> wrote:
>> Hi all,
>> 
>> while working on instrumenting my application, I ran into the fact that 
>> capturing metrics such as status codes from my own http.Handlers is 
>> surprisingly difficult to get right.
>> 
>> Therefor I created a package that hopefully avoids most of the common 
>> pitfalls. 
>> 
>> https://github.com/felixge/httpsnoop <https://github.com/felixge/httpsnoop>
>> 
>> I would love for net/http experts to take a look at the "Why this package 
>> exists" section of the README, as well as the horrible hack required to make 
>> things work:
>> 
>> https://github.com/felixge/httpsnoop/blob/master/wrap.go#L44-L163 
>> <https://github.com/felixge/httpsnoop/blob/master/wrap.go#L44-L163>
>> 
>> Please let me know if you have suggestions for simpler approaches and/or 
>> spot any bugs in my implementation.
>> 
>> Thanks a lot!
>> Felix Geisendörfer
>> 
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "golang-nuts" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/golang-nuts/-I5IZgJosYE/unsubscribe 
>> <https://groups.google.com/d/topic/golang-nuts/-I5IZgJosYE/unsubscribe>.
>> To unsubscribe from this group and all its topics, send an email to 
>> golang-nuts+unsubscr...@googlegroups.com 
>> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to