Question using additional info
Closed this issue · 2 comments
jwoertink commented
I'm not sure if I have this setup correctly or not. Is this the proper way to use this?
def catch_exception(error : Exception, context : HTTP::Server::Context )
Raven.extra_context({
headers: context.request.headers.to_h,
params: context.request.query_params.to_h,
path: context.request.path
})
Raven.capture(error)
end
Sija commented
Well, IT depends ;) Do you use any framework?
- If yes, and that's Kemal you might want to checkout Kemal integration
- If yes, and that's Amber you're temporarily out of luck since Amber integration is broken ATM :(
- If no, there's
Raven::HTTPHandler
module, which should give you an idea how to attachhttp
interface, see relevant part:raven.cr/src/raven/integrations/http/handler.cr
Lines 61 to 68 in 1845fc5
jwoertink commented
Using Lucky 😄 Thanks for the info! I think that will help clarify for me.