getTelemetry()

This operation returns the telemetry manager for the connected client.

public ClientTelemetryManager getTelemetry()

RETURNS:

ClientTelemetryManager

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

EXCEPTIONS:

Example

import io.milvus.grpc.CommandReply;
import io.milvus.telemetry.ClientTelemetryManager;
import io.milvus.v2.client.ConnectConfig;
import io.milvus.v2.client.MilvusClientV2;

MilvusClientV2 client = new MilvusClientV2(ConnectConfig.builder()
        .uri("http://localhost:19530")
        .token("root:Milvus")
        .build());

ClientTelemetryManager telemetry = client.getTelemetry();
if (telemetry != null && telemetry.isSupported()) {
    telemetry.registerCommandHandler("custom_command", command -> {
        // Handle a server-pushed telemetry command.
        return CommandReply.newBuilder().setSuccess(true).build();
    });
}

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?