public class IncidentUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_BUILD_ID |
static String |
CLIENT_INFO |
static String |
CLIENT_TYPE |
static String |
CLIENT_VERSION |
static String |
DETAIL |
static String |
INC_DUMP_FILE_EXT |
static String |
INC_DUMP_FILE_NAME |
static String |
INCIDENT_ID |
static String |
INCIDENT_INFO |
static String |
INCIDENT_REPORT |
static String |
INCIDENT_TYPE |
static String |
JOB_ID |
static String |
REPORTER |
static String |
REQUEST_ID |
static String |
SIGNATURE |
static String |
STACKTRACE |
static String |
THROTTLE_SIGNATURE |
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 void |
generateIncident(SFSession session,
String signature,
String detail,
String requestId,
String jobUuid,
Throwable cause) |
static void |
generateIncident(String sessionToken,
String serverUrl,
String signature,
String detail,
String requestId,
String jobUuid,
Throwable cause)
Generates an incident report based on the parameters passed in and
triggers an incident with the EventHandler
|
static SFException |
generateIncidentWithException(SFSession session,
String requestId,
String jobUuid,
ErrorCode errorCode,
Object... params)
Creates an SFException without a cause to be thrown and generates/triggers
an incident based on that exception.
|
static SFException |
generateIncidentWithException(SFSession session,
String requestId,
String jobUuid,
Throwable cause,
ErrorCode errorCode,
Object... params) |
static SFException |
generateIncidentWithException(String sessionToken,
String serverUrl,
String requestId,
String jobUuid,
ErrorCode errorCode,
Object... params) |
static SFException |
generateIncidentWithException(String sessionToken,
String serverUrl,
String requestId,
String jobUuid,
Throwable cause,
ErrorCode errorCode,
Object... params)
Creates an SFException to be thrown and generates/triggers an incident
based on that exception.
|
static SFException |
generateIncidentWithSignatureAndException(SFSession session,
String requestId,
String jobUuid,
String signature,
ErrorCode errorCode,
Object... params)
Creates an SFException without a cause to be thrown and generates/triggers
an incident based on that exception with the specified signature.
|
static SFException |
generateIncidentWithSignatureAndException(String sessionToken,
String serverUrl,
String requestId,
String jobUuid,
String signature,
ErrorCode errorCode,
Object... params) |
static String |
oneLiner(Throwable thrown)
Produce a one line description of the throwable, suitable for error message
and log printing.
|
public static final String CLIENT_TYPE
public static final String CLIENT_VERSION
public static final String CLIENT_BUILD_ID
public static final String INCIDENT_ID
public static final String STACKTRACE
public static final String REQUEST_ID
public static final String JOB_ID
public static final String SIGNATURE
public static final String REPORTER
public static final String DETAIL
public static final String INCIDENT_TYPE
public static final String TIMESTAMP
public static final String INCIDENT_REPORT
public static final String CLIENT_INFO
public static final String INCIDENT_INFO
public static final String THROTTLE_SIGNATURE
public static final String INC_DUMP_FILE_NAME
public static final String INC_DUMP_FILE_EXT
public static SFException generateIncidentWithSignatureAndException(SFSession session, String requestId, String jobUuid, String signature, ErrorCode errorCode, Object... params)
session - session that will generate incidentrequestId - request idjobUuid - job uuidsignature - incident signature for identificationerrorCode - error code that caused the incidentparams - option parameterspublic static SFException generateIncidentWithSignatureAndException(String sessionToken, String serverUrl, String requestId, String jobUuid, String signature, ErrorCode errorCode, Object... params)
public static SFException generateIncidentWithException(SFSession session, String requestId, String jobUuid, ErrorCode errorCode, Object... params)
session - session that will generate incidentrequestId - request idjobUuid - job uuiderrorCode - error code that caused the incidentparams - option parameterspublic static SFException generateIncidentWithException(SFSession session, String requestId, String jobUuid, Throwable cause, ErrorCode errorCode, Object... params)
public static SFException generateIncidentWithException(String sessionToken, String serverUrl, String requestId, String jobUuid, Throwable cause, ErrorCode errorCode, Object... params)
sessionToken - session tokenserverUrl - snowflake urlrequestId - request idjobUuid - job uuidcause - cause of the incidenterrorCode - error code of the incidentparams - optional parameterspublic static SFException generateIncidentWithException(String sessionToken, String serverUrl, String requestId, String jobUuid, ErrorCode errorCode, Object... params)
public static void generateIncident(SFSession session, String signature, String detail, String requestId, String jobUuid, Throwable cause)
public static void generateIncident(String sessionToken, String serverUrl, String signature, String detail, String requestId, String jobUuid, Throwable cause)
sessionToken - session tokenserverUrl - server urlsignature - incident signaturedetail - incident detailrequestId - request idjobUuid - job uuidcause - cause of incidentpublic static String oneLiner(Throwable thrown)
thrown - thrown objectpublic static void dumpVmMetrics(String incidentId)
incidentId - incident idCopyright © 2017. All rights reserved.