rollcage
rollcage copied to clipboard
Sends all nested exception's ex-data grouped in sub levels
This PR enables the client's option :indexed-ex-data
to be able to send all neted exception's ex-data
grouped under an indexed level.
Background
Currently Rollcage only uses one level for the exception ex-data
called custom
. Under that level, an ex-data
key would become custom.some_value
. However, when you send nested exceptions, you don't know which exception the key belongs to, and repeated keys are overwritten, preferring the deepest exception in the tree.
So, for an exception like this:
(def e (ex-info "Third level error"
{:name "Third error" :age 50 :extra {:jwt "THIRD ERROR"}}
(ex-info "Second level error"
{:name "Second error" :age 39 :extra {:jwt "SECOND ERROR"}}
(ex-info "First level error" {:name "First error" :age 20 :extra {:jwt "FIRST ERROR"}}))))
you currently see something like this:
with this information:
Proposal
This PR enables a client like (rollcage/client token {:indexed-ex-data "__exception" :block-fields [:jwt]})
to have the following information in Rollbar: