Class TelemetryUtil
- java.lang.Object
-
- net.snowflake.client.jdbc.telemetry.TelemetryUtil
-
public class TelemetryUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description TelemetryUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TelemetryDatabuildCrlData(String crlUrl, long crlBytes, int revokedCertificates, long downloadTime, long parseTime)static TelemetryDatabuildJobData(com.fasterxml.jackson.databind.node.ObjectNode obj)static TelemetryDatabuildJobData(String queryId, TelemetryField field, long value)Create a simple TelemetryData instance for Job metrics using given parametersstatic com.fasterxml.jackson.databind.node.ObjectNodecreateIBValue(String queryId, String sqlState, int errorNumber, TelemetryField type, String errorMessage, String reason)Helper function to create ObjectNode for IB telemetry log
-
-
-
Field Detail
-
NO_VENDOR_CODE
public static final int NO_VENDOR_CODE
- See Also:
- Constant Field Values
-
TYPE
@Deprecated public static final String TYPE
Deprecated.- See Also:
- Constant Field Values
-
QUERY_ID
@Deprecated public static final String QUERY_ID
Deprecated.- See Also:
- Constant Field Values
-
VALUE
@Deprecated public static final String VALUE
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
buildJobData
public static TelemetryData buildJobData(String queryId, TelemetryField field, long value)
Create a simple TelemetryData instance for Job metrics using given parameters- Parameters:
queryId- the id of the queryfield- the field to log (represents the "type" field in telemetry)value- the value to log for the field- Returns:
- TelemetryData instance constructed from parameters
-
buildJobData
public static TelemetryData buildJobData(com.fasterxml.jackson.databind.node.ObjectNode obj)
-
createIBValue
public static com.fasterxml.jackson.databind.node.ObjectNode createIBValue(String queryId, String sqlState, int errorNumber, TelemetryField type, String errorMessage, String reason)
Helper function to create ObjectNode for IB telemetry log- Parameters:
queryId- query IDsqlState- the SQL stateerrorNumber- the error number- Returns:
- ObjectNode for IB telemetry log
-
buildCrlData
@SnowflakeJdbcInternalApi public static TelemetryData buildCrlData(String crlUrl, long crlBytes, int revokedCertificates, long downloadTime, long parseTime)
-
-