Top Description Fields Constructors Methods
com.mysql.cj.telemetry

public Class NoopTelemetryHandler

extends Object
implements TelemetryHandler
Class Inheritance
All Implemented Interfaces
com.mysql.cj.telemetry.TelemetryHandler

No-op implementation of TelemetryHandler.

Field Summary

Modifier and TypeField and Description
private static NoopTelemetryHandler

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static NoopTelemetryHandler
public TelemetrySpan
startSpan(TelemetrySpanName
the span name that identifies this telemetry span
spanName
,
Object...
arguments used for interpolating the specified span name via String#format(String, Object...)
args
)

Implements com.mysql.cj.telemetry.TelemetryHandler.startSpan.

Start a telemetry span.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static NoopTelemetryHandler INSTANCE

Constructor Detail

NoopTelemetryHandlerback to summary
private NoopTelemetryHandler()

Method Detail

getInstanceback to summary
public static NoopTelemetryHandler getInstance()
startSpanback to summary
public TelemetrySpan startSpan(TelemetrySpanName spanName, Object... args)

Implements com.mysql.cj.telemetry.TelemetryHandler.startSpan.

Doc from com.mysql.cj.telemetry.TelemetryHandler.startSpan.

Start a telemetry span. Additionally, the returned TelemetrySpan object must be made current so that it gets recorded by the telemetry tracer. A TelemetrySpan object must be closed in a finally block after being made current, e.g.:

TelemetrySpan span = telemetryHandler.startSpan(TelemetrySpanName.PING);
try (TelemetryScope scope = span.makeCurrent()) {
    // your code goes here
} finally {
    span.end();
}
Parameters
spanName:TelemetrySpanName

the span name that identifies this telemetry span

args:Object[]

arguments used for interpolating the specified span name via String#format(String, Object...)

Returns:TelemetrySpan

the newly-created span object

Annotations
@Override