Package backtraceio.library.models.json
Class BacktraceReport
- java.lang.Object
-
- backtraceio.library.models.json.BacktraceReport
-
public class BacktraceReport extends java.lang.Object
Captured application error
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<java.lang.String>
attachmentPaths
Get all paths to attachmentsjava.util.Map<java.lang.String,java.lang.Object>
attributes
Get an report attributesjava.lang.String
classifier
Get a report classificationjava.util.ArrayList<BacktraceStackFrame>
diagnosticStack
Current report exception stackjava.lang.Exception
exception
Get a report exceptionjava.lang.Boolean
exceptionTypeReport
Get information about report type.java.lang.String
message
Get a custom client messagelong
timestamp
UTC timestamp in secondsjava.util.UUID
uuid
16 bytes of randomness in human readable UUID format server will reject request if uuid is already found
-
Constructor Summary
Constructors Constructor Description BacktraceReport(java.lang.Exception exception)
Create new instance of Backtrace report to send a report with application exceptionBacktraceReport(java.lang.Exception exception, java.util.List<java.lang.String> attachmentPaths)
Create new instance of Backtrace report to send a report with application exception, attributes and attachmentsBacktraceReport(java.lang.Exception exception, java.util.Map<java.lang.String,java.lang.Object> attributes)
Create new instance of Backtrace report to send a report with application exception and attributesBacktraceReport(java.lang.Exception exception, java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.List<java.lang.String> attachmentPaths)
Create new instance of Backtrace report to send a report with application exception, attributes and attachmentsBacktraceReport(java.lang.String message)
Create new instance of Backtrace report to send a report with custom client messageBacktraceReport(java.lang.String message, java.util.List<java.lang.String> attachmentPaths)
Create new instance of Backtrace report to send a report with custom client message, attributes and attachmentsBacktraceReport(java.lang.String message, java.util.Map<java.lang.String,java.lang.Object> attributes)
Create new instance of Backtrace report to send a report with custom client message and attributesBacktraceReport(java.lang.String message, java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.List<java.lang.String> attachmentPaths)
Create new instance of Backtrace report to send a report with custom client message, attributes and attachments
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.Object>
concatAttributes(BacktraceReport report, java.util.Map<java.lang.String,java.lang.Object> attributes)
Concat two dictionaries with attributesjava.lang.String
getExceptionClassifier(java.lang.Exception exception)
BacktraceData
toBacktraceData(android.content.Context context, java.util.Map<java.lang.String,java.lang.Object> clientAttributes)
BacktraceData
toBacktraceData(android.content.Context context, java.util.Map<java.lang.String,java.lang.Object> clientAttributes, boolean isProguardEnabled)
-
-
-
Field Detail
-
uuid
public java.util.UUID uuid
16 bytes of randomness in human readable UUID format server will reject request if uuid is already found
-
timestamp
public long timestamp
UTC timestamp in seconds
-
exceptionTypeReport
public java.lang.Boolean exceptionTypeReport
Get information about report type. If value is true the BacktraceReport has an error
-
classifier
public java.lang.String classifier
Get a report classification
-
attributes
public java.util.Map<java.lang.String,java.lang.Object> attributes
Get an report attributes
-
message
public java.lang.String message
Get a custom client message
-
exception
public java.lang.Exception exception
Get a report exception
-
attachmentPaths
public java.util.List<java.lang.String> attachmentPaths
Get all paths to attachments
-
diagnosticStack
public java.util.ArrayList<BacktraceStackFrame> diagnosticStack
Current report exception stack
-
-
Constructor Detail
-
BacktraceReport
public BacktraceReport(java.lang.String message)
Create new instance of Backtrace report to send a report with custom client message- Parameters:
message
- custom client message
-
BacktraceReport
public BacktraceReport(java.lang.String message, java.util.Map<java.lang.String,java.lang.Object> attributes)
Create new instance of Backtrace report to send a report with custom client message and attributes- Parameters:
message
- custom client messageattributes
- additional information about application state
-
BacktraceReport
public BacktraceReport(java.lang.String message, java.util.List<java.lang.String> attachmentPaths)
Create new instance of Backtrace report to send a report with custom client message, attributes and attachments- Parameters:
message
- custom client messageattachmentPaths
- path to all report attachments
-
BacktraceReport
public BacktraceReport(java.lang.String message, java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.List<java.lang.String> attachmentPaths)
Create new instance of Backtrace report to send a report with custom client message, attributes and attachments- Parameters:
message
- custom client messageattributes
- additional information about application stateattachmentPaths
- path to all report attachments
-
BacktraceReport
public BacktraceReport(java.lang.Exception exception)
Create new instance of Backtrace report to send a report with application exception- Parameters:
exception
- current exception
-
BacktraceReport
public BacktraceReport(java.lang.Exception exception, java.util.Map<java.lang.String,java.lang.Object> attributes)
Create new instance of Backtrace report to send a report with application exception and attributes- Parameters:
exception
- current exceptionattributes
- additional information about application state
-
BacktraceReport
public BacktraceReport(java.lang.Exception exception, java.util.List<java.lang.String> attachmentPaths)
Create new instance of Backtrace report to send a report with application exception, attributes and attachments- Parameters:
exception
- current exceptionattachmentPaths
- path to all report attachments
-
BacktraceReport
public BacktraceReport(java.lang.Exception exception, java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.List<java.lang.String> attachmentPaths)
Create new instance of Backtrace report to send a report with application exception, attributes and attachments- Parameters:
exception
- current exceptionattributes
- additional information about application stateattachmentPaths
- path to all report attachments
-
-
Method Detail
-
getExceptionClassifier
public java.lang.String getExceptionClassifier(java.lang.Exception exception)
-
concatAttributes
public static java.util.Map<java.lang.String,java.lang.Object> concatAttributes(BacktraceReport report, java.util.Map<java.lang.String,java.lang.Object> attributes)
Concat two dictionaries with attributes- Parameters:
report
- current reportattributes
- attributes to concatenate- Returns:
- concatenated map of attributes from report and from passed attributes
-
toBacktraceData
public BacktraceData toBacktraceData(android.content.Context context, java.util.Map<java.lang.String,java.lang.Object> clientAttributes)
-
toBacktraceData
public BacktraceData toBacktraceData(android.content.Context context, java.util.Map<java.lang.String,java.lang.Object> clientAttributes, boolean isProguardEnabled)
-
-