Skip to content

Sends all nested exception's ex-data grouped in sub levels #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

josefigueroa-nedap
Copy link

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:

Screenshot from 2022-01-18 16-08-25

with this information:

Screenshot from 2022-01-18 16-09-16

Proposal

This PR enables a client like (rollcage/client token {:indexed-ex-data "__exception" :block-fields [:jwt]}) to have the following information in Rollbar:

Screenshot from 2022-01-18 16-08-49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant