private ClientMetricsInstance createClientInstanceAndUpdateCache(Uuid clientInstanceId,
        ClientMetricsInstanceMetadata instanceMetadata) {

        ClientMetricsInstance clientInstance = createClientInstance(clientInstanceId, instanceMetadata);
        // Maybe add client metrics, if metrics not already added. Metrics might be already added
        // if the client instance was evicted from the cache because of size limit.
        clientMetricsStats.maybeAddClientInstanceMetrics(clientInstanceId);
        clientInstanceCache.put(clientInstanceId, clientInstance);
        return clientInstance;
    }
Handles client telemetry metrics requests/responses, subscriptions and instance information.
server/src/main/java/org/apache/kafka/server/ClientMetricsManager.java