Skip to main content

getTelemetry()

This operation returns the telemetry manager for the connected client.

java
public ClientTelemetryManager getTelemetry()

RETURN TYPE:

ClientTelemetryManager

RETURNS:

The telemetry manager for the connected client, or null when telemetry is not available.

PARAMETERS:

  • telemetry (ClientTelemetryManager) -

    The ClientTelemetryManager instance for the connected client. Check telemetry support with isSupported(), register a server-pushed command handler with registerCommandHandler(), and read the active configuration with getConfig().

EXCEPTIONS:

  • MilvusClientException

    This exception will be raised when any error occurs during this operation.

Example​

java
MilvusClientV2 client = new MilvusClientV2(ConnectConfig.builder()
.uri("YOUR_CLUSTER_ENDPOINT")
.token("YOUR_CLUSTER_TOKEN")
.build());

ClientTelemetryManager telemetry = client.getTelemetry();
if (telemetry != null && telemetry.isSupported()) {
telemetry.registerCommandHandler("custom_command", command -> {
// Handle a server-pushed telemetry command.
return TelemetryCommandReply.of(command);
});
}
Minimum SDK versionv3.0.x
Was this page helpful?