Skip to content
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

Passing up parameters does not work #90

Open
anthonygeranio opened this issue May 21, 2018 · 0 comments
Open

Passing up parameters does not work #90

anthonygeranio opened this issue May 21, 2018 · 0 comments

Comments

@anthonygeranio
Copy link

Overview

I am trying to log custom exceptions using Airbrake to pair with our existing web client integration.

Usage

I am performing custom logging like so:

let exception = NSException(name: .init(rawValue: title), reason: subtitle, userInfo: nil)
ABNotifier.logException(exception, parameters: ["userId":"anthony"]

It looks like Airbrake is logging the error itself just fine, but not attaching any of the parameters to the environment section on the website.

After doing some further research, it looks like in ABNotifier.m under logException:withParameters we do not add the exceptionParameters to the final dictionary we pass to Airbrake. The dictionary only contains the exception name, reason, and call stack. It is missing the exception parameters and current view controller.

Specifically,

NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
                                        [exception name], ABNotifierExceptionNameKey,
                                        [exception reason], ABNotifierExceptionReasonKey,
                                        [exception callStackSymbols], ABNotifierCallStackKey,
                                        exceptionParameters, ABNotifierExceptionParametersKey,
#if TARGET_OS_IPHONE
                                        ABNotifierCurrentViewController(), ABNotifierControllerKey,
#endif
                                        nil];

screen shot 2018-05-21 at 3 30 41 pm

Expected Behavior

I would expect that the parameters properly get passed up and then I can view them in Environment unless I am not looking in the right place.

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

No branches or pull requests

1 participant