opserver / Opserver

Stack Exchange's Monitoring System
https://opserver.github.io/Opserver/
MIT License
4.51k stars 828 forks source link

Add support for linkifying stack traces #253

Closed m0sa closed 7 years ago

m0sa commented 7 years ago

Stack traces will soon contain source link-ed URLs. Since source linked .dll / .pdb files are usually linked to the raw file content, we'd want the link to actually point to web UI for that file. This PR adds support for configuring regex-based replacements to generate deep links to the exact line of a file in the specific commit from the raw URI file. e.g:

// Stack trace frame text:
at StackExchange.Opserver.GlobalApplication.RegisterRoutes(RouteTable) in https://raw.githubusercontent.com/opserver/Opserver/f558041474587f094c9b81597de0554f8e77164b/Opserver/Global.asax.cs line 28

// actual URL we want to render:
https://github.com/opserver/Opserver/blob/f558041474587f094c9b81597de0554f8e77164b/Opserver/Global.asax.cs#L28
NickCraver commented 7 years ago

Awesome, merging in!