public class HoneybadgerReporter extends Object implements NoticeReporter
Throwable classes to the Honeybadger API.| Constructor and Description |
|---|
HoneybadgerReporter() |
HoneybadgerReporter(ConfigContext config) |
| Modifier and Type | Method and Description |
|---|---|
protected Set<String> |
aggregateTags(Iterable<String> tags)
Processes an
Iterable of Strings, discards invalid values and
aggregates all values into an ordered set. |
ConfigContext |
getConfig() |
NoticeReportResult |
reportError(Throwable error)
Send any Java
Throwable to the Honeybadger error
reporting interface. |
NoticeReportResult |
reportError(Throwable error,
Object request)
Send any Java
Throwable to the Honeybadger error
reporting interface. |
NoticeReportResult |
reportError(Throwable error,
Object request,
String message)
Send any Java
Throwable to the Honeybadger error
reporting interface. |
NoticeReportResult |
reportError(Throwable error,
Object request,
String message,
Iterable<String> tags)
Send any Java
Throwable to the Honeybadger error
reporting interface with the associated tags. |
NoticeReportResult |
reportError(Throwable error,
Object request,
String message,
Iterable<String> tags,
String fingerprint)
Send any Java
Throwable to the Honeybadger error
reporting interface. |
protected org.apache.http.client.fluent.Response |
sendToHoneybadger(String jsonError)
Send an error encoded in JSON to the Honeybadger API.
|
protected void |
setConfig(ConfigContext config) |
protected NoticeReportResult |
submitError(Throwable error,
Request request,
String message,
Set<String> tags,
String fingerprint) |
protected boolean |
supportsHttpServletRequest() |
protected boolean |
supportsPlayHttpRequest() |
public HoneybadgerReporter()
public HoneybadgerReporter(ConfigContext config)
public NoticeReportResult reportError(Throwable error)
Throwable to the Honeybadger error
reporting interface.reportError in interface NoticeReportererror - error to reportpublic NoticeReportResult reportError(Throwable error, Object request)
Throwable to the Honeybadger error
reporting interface.
Currently only HttpServletRequest objects
are supported as request properties.reportError in interface NoticeReportererror - error to reportrequest - Object to parse for request propertiespublic NoticeReportResult reportError(Throwable error, Object request, String message)
Throwable to the Honeybadger error
reporting interface.
Currently only HttpServletRequest objects
are supported as request properties.reportError in interface NoticeReportererror - error to reportrequest - Object to parse for request propertiesmessage - message to report instead of message associated with exceptionpublic NoticeReportResult reportError(Throwable error, Object request, String message, Iterable<String> tags)
NoticeReporterThrowable to the Honeybadger error
reporting interface with the associated tags.reportError in interface NoticeReportererror - error to reportrequest - Object to parse for request propertiesmessage - message to report instead of message associated with exceptiontags - tag values (duplicates will be removed)public NoticeReportResult reportError(Throwable error, Object request, String message, Iterable<String> tags, String fingerprint)
Throwable to the Honeybadger error
reporting interface.
Currently only HttpServletRequest objects
are supported as request properties.reportError in interface NoticeReportererror - error to reportrequest - Object to parse for request propertiesmessage - message to report instead of message associated with exceptionfingerprint - custom fingerprint (used to group errors)tags - tag values (duplicates will be removed)public ConfigContext getConfig()
getConfig in interface NoticeReporterprotected Set<String> aggregateTags(Iterable<String> tags)
Iterable of Strings, discards invalid values and
aggregates all values into an ordered set.tags - tag valuesprotected boolean supportsHttpServletRequest()
protected boolean supportsPlayHttpRequest()
protected NoticeReportResult submitError(Throwable error, Request request, String message, Set<String> tags, String fingerprint)
protected org.apache.http.client.fluent.Response sendToHoneybadger(String jsonError) throws IOException
jsonError - Error JSON payloadIOException - thrown when a network exception was encounteredprotected void setConfig(ConfigContext config)
Copyright © 2023 Honeybadger.io. All rights reserved.