sourcegraph / appdash

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

Usage from a Martini app #60

Closed slimsag closed 9 years ago

slimsag commented 9 years ago

Currently it's very tricky to utilize Appdash from a Martini application because httptrace primarily exposes a Negroni HTTP middleware which Martini doesn't seem to support at all.

We need to determine: what is the best way to use a Negroni HTTP middleware from within a Martini app? I imagine many others will run into this question in the future.

A hacky workaround for now: https://gist.github.com/slimsag/a7e1de60844656ec6a65

beyang commented 9 years ago

Is this a use case we want to support, given that Martini's creator has advocated using Negroni instead, since it is more idiomatic Go? http://codegangsta.io/blog/2014/05/19/my-thoughts-on-martini/

slimsag commented 9 years ago

@beyang

Good point (I wasn't aware that Jeremy was the creator of Martini, actually), I'll close this issue.

Either way, it seems to me that the issue is really with Martini not supporting Negroni middleware handlers properly (rather than us needing to support it somehow).