sourcegraph / appdash

Application tracing system for Go, based on Google's Dapper.
https://sourcegraph.com
Other
1.72k stars 137 forks source link

httptrace: Collect Name & User after inner handler #92

Closed keegancsmith closed 8 years ago

keegancsmith commented 8 years ago

This allows inner handlers to run and set information which the MiddlewareConfig may want to use. A concrete example of this is having the middleware run before mux has had a chance to set a route name.

This could potentially break existing uses if the inner handlers destroy or mutate the information that MiddlewareConfig depended on.

slimsag commented 8 years ago

Nice! This looks great.

This could potentially break existing uses if the inner handlers destroy or mutate the information that MiddlewareConfig depended on.

Makes sense, I don't think inner handlers should attempt to meddle with MiddlewareConfig in most (all?) situations. It should be considered immutable in general, I think.

Thanks @keegancsmith !