Class TelemetryMetrics (3.10.3)

public class TelemetryMetrics

Enables export of metrics to OpenTelemetry. Since it keeps track of whether metrics are enabled/disabled, it simplifies calling code by removing the need for tedious if clauses to check whether metrics are enabled/disabled. Also, GlobalOpenTelemetry.get() should only be called after client application has already installed the necessary meter provider.

Inheritance

java.lang.Object > TelemetryMetrics

Methods

recordConnectionEnd(String errorCode)

public void recordConnectionEnd(String errorCode)
Parameter
Name Description
errorCode String

recordConnectionStart()

public void recordConnectionStart()

recordConnectionStartWithRetry()

public void recordConnectionStartWithRetry()

recordNetworkLatency(Duration latency)

public void recordNetworkLatency(Duration latency)
Parameter
Name Description
latency Duration

recordResponse(long messageSize, long rowCount, String errorCode, boolean isRetry)

public void recordResponse(long messageSize, long rowCount, String errorCode, boolean isRetry)
Parameters
Name Description
messageSize long
rowCount long
errorCode String
isRetry boolean

refreshOpenTelemetryTableNameAttributes(String tableName)

public void refreshOpenTelemetryTableNameAttributes(String tableName)
Parameter
Name Description
tableName String