sourcegraph / appdash

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

Can't figure how to mount traceapp to anything other than "/" #180

Open ansel1 opened 8 years ago

ansel1 commented 8 years ago

The traceapp.New() function seems to indicate it supports being mounted to a subpath, but I haven't been able to make it work. I've tried passing in a gorilla mux subrouter, and tried wrapping the App in http.StripPrefix, but in both cases, images and links on the home page are absolute (see root.html), so they don't work.

Also, I'm curious why the other templates use the {{.BaseURL}} template var to construct absolute URLs for everything, instead of just using relative URLs.

slimsag commented 7 years ago

Yes, I think our handling of mounting at subpaths is not good / is buggy. The code here probably needs some extensive cleanup.