public class IncidentUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
INC_DUMP_FILE_EXT |
static String |
INC_DUMP_FILE_NAME |
static String |
INCIDENT_INFO |
static String |
TIMESTAMP |
| Constructor and Description |
|---|
IncidentUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
dumpVmMetrics(String incidentId)
Dumps JVM metrics for this process.
|
static Throwable |
generateIncidentV2WithException(SFBaseSession session,
Throwable exc,
String jobId,
String requestId)
Makes a V2 incident object and triggers ir, effectively reporting the given exception to GS and
possibly to crashmanager
|
static Throwable |
generateIncidentV2WithException(String serverUrl,
String sessionToken,
HttpClientSettingsKey key,
Throwable exc,
String jobId,
String requestId)
Makes a V2 incident object and triggers it, effectively reporting the given exception to GS and
possibly to crashmanager.
|
static String |
oneLiner(String prefix,
Throwable thrown)
Produce a one line description of the throwable, suitable for error message and log printing
with a prefix
|
static String |
oneLiner(Throwable thrown)
Produce a one line description of the throwable, suitable for error message and log printing.
|
public static final String TIMESTAMP
public static final String INCIDENT_INFO
public static final String INC_DUMP_FILE_NAME
public static final String INC_DUMP_FILE_EXT
public static String oneLiner(Throwable thrown)
thrown - thrown objectpublic static String oneLiner(String prefix, Throwable thrown)
prefix - String to prefix oneliner summarythrown - thrown objectpublic static void dumpVmMetrics(String incidentId)
incidentId - incident idpublic static Throwable generateIncidentV2WithException(SFBaseSession session, Throwable exc, String jobId, String requestId)
session - SFSession object to talk to GS throughexc - the Throwable we should reportjobId - jobId that failedrequestId - requestId that failedpublic static Throwable generateIncidentV2WithException(String serverUrl, String sessionToken, HttpClientSettingsKey key, Throwable exc, String jobId, String requestId)
This function should be proceeded by a throw as it returns the originally given exception.
serverUrl - url of GS to report incident tosessionToken - session token to be used to report incidentexc - the Throwable we should reportjobId - jobId that failedrequestId - requestId that failedCopyright © 2022. All rights reserved.