appsignal / appsignal-elixir

🟪 AppSignal for Elixir package
https://www.appsignal.com/elixir
MIT License
285 stars 82 forks source link

Consider sharing exception "blame" information to aid debugging #927

Closed 1player closed 8 months ago

1player commented 9 months ago

I just got an error logged on my dashboard:

** (FunctionClauseError) no function clause matching in XXX.yyy/2

This is not enough to know to understand what exactly happened, and such information is available in the exception structure itself. The full body of the exception that can be extracted with Exception.blame/3 (https://hexdocs.pm/elixir/1.13/Exception.html#blame/3) which in this case would show the arguments passed to the function:

    The following arguments were given to XXX.yyy/2:

        # 1
        nil

        # 2
        []

    Attempted function clauses (showing 1 out of 1):

        def xxx(%Struct{} = a, b)
unflxw commented 8 months ago

HI @1player,

Unfortunately we cannot provide information about the specific arguments passed to the function, due to the risk of leaking personally identifiable information. However, the backtrace for the error should describe the shape of the arguments (in this example, the + operator is called with a string and an integer as arguments):

Screenshot 2024-03-11 at 14 18 42

This is, however, missing from errors reported via the error backend, as the backtrace is not accessible then.