-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add support for sending arbitrary context data #41
Labels
Comments
In case anyone else is looking for how to do this (as of 1.1.0), I ended up doing: io.honeybadger.reporter.dto.Context context = new io.honeybadger.reporter.dto.Context();
context.put("thing", "data");
io.honeybadger.reporter.dto.Request request = new io.honeybadger.reporter.dto.Request(context, null, null, null, null);
reporter.reportError(exception, request); // reporter is an instance of HoneybadgerReporter Which isn't too pretty but works. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Ruby we can do:
and/or:
The first is registered globally and the second is registered only for that exception and merged into the global context.
The context object itself is a map which is sent in the JSON payload for the error under
payload['request']['context']
.The text was updated successfully, but these errors were encountered: