Skip to main content

Customized Data Analysis and Display


1 Overview

Besides custom field reporting, CrashSight also supports real-time statistics computing and visualized display of specified fields. When reporting, specify the field type using the standard format (number, string and behavioral sequence types are supported at present) so that the field can be selected from the Custom Management tab on the page. Real-time statistic computing such as pie charts and histograms are supported. A webpage usage case is shown below:

Recommended max common sequences of sequence data
Config the sequence keywords to do max common sequences calculation:

The Max common sequences of Top20 issues are calculated and recommended by default. For other issues, recommendation calculation is triggered mannually through "Calculating Current Issues" button.

2 Customized Data Report Interface

Android:

CrashReport.putUserData(Context c, String key, String value)

iOS:

+(void)SetUserValue: (nonnull NSString*) value forKey: (nonnull NSString*)key

Windows:

void CS_SetUserValue(const char *key, const char *value)

Value of a custom field cannot include English colons or semicolons, or parsing may fail.

3 Data Format Introduction

Specify the types of fields to be computed. Specified types of fields will be processed by the backend, and computing and display methods depend on the type. The three currently supported data formats are numbers, strings, and behavioral sequences.

3.1 Pass Custom Fields with Formats through Interfaces

Interfaces overloads supporting custom fields in different formats are provided in Unity and UE plugins (Requires SDK version 4.3.2 or above. For versions below 4.3.2, please refer to the method in 3.2 to set the field type manually.).

Unity interfaces:

// Custom data of numeric type
public static void SetUserValue(string key, int value)

// Custom data of string type
public static void SetUserValue(string key, string value)

// Custom data of behavioral sequence type
public static void SetUserValue(string key, string[] value)

UE interfaces:

// Custom data of numeric type
static void SetUserValue(const char* key, int value);

// Custom data of string type
static void SetUserValue(const char* key, const char* value);

// Custom data of behavioral sequence type
static void SetUserValue(const char* key, const char** values, int count);

3.2 How to Manually Specify the Custom Fields to do Statistics?

The method used to specify field types reuses the original Key fields. When a new field type is added, the corresponding letter (I: number, K: string, S: behavioral sequence) is added before the Key and separated with #. Examples:
When reporting numeric type custom data

Key:I#key

Value:100

When reporting string type custom data:

Key:K#key2

Value:lobby

When reporting behavioral sequence type custom data:

Key:S#key3

Value:action1#action2#action3#action4#action5#action6

Behavioral sequence type data is connected with #. The backend will split it automatically and export the max common sequence for reproducing the issue. Data of specified types will receive extra processing in the process chain. Page selection and real-time statistics are supported. By default, data without a specific type won't be further processed.

When using the method of manually specifying the data format, call the following interface to pass in the customized data.

Unity interface:

public static void AddSceneData(string key, string value)

UE interface:

static void AddSceneData(const char* key, const char* value);