segmentio / stats

Go package for abstracting stats collection
https://godoc.org/github.com/segmentio/stats
MIT License
208 stars 32 forks source link

httpstats: fix handler #112

Closed abraithwaite closed 5 years ago

abraithwaite commented 5 years ago

This PR fixes the httpstats reporting.

Before this fix, if you tried tagging the httpstats with a new tag, it wouldn't go through because the tags weren't initialized. That's because before this PR, we are passing the original request down to the wrapped handler and only initializing the tags on the responseWriter's reference to req.

Want to figure out how to test it before we merge.