public void maybeAddClientInstanceMetrics(Uuid clientInstanceId) {
            // If one sensor of the metrics has been registered for the client instance,
            // then all other sensors should have been registered; and vice versa.
            if (metrics.getSensor(PLUGIN_EXPORT + "-" + clientInstanceId) != null) {
                return;
            }

            Map<String, String> tags = Collections.singletonMap(ClientMetricsConfigs.CLIENT_INSTANCE_ID, clientInstanceId.toString());

            Sensor throttleCount = metrics.sensor(ClientMetricsStats.THROTTLE + "-" + clientInstanceId);
            throttleCount.add(createMeter(metrics, new WindowedCount(), ClientMetricsStats.THROTTLE, tags));
            sensorsName.add(throttleCount.name());

            Sensor pluginExport = metrics.sensor(ClientMetricsStats.PLUGIN_EXPORT + "-" + clientInstanceId);
            pluginExport.add(createMeter(metrics, new WindowedCount(), ClientMetricsStats.PLUGIN_EXPORT, tags));
            pluginExport.add(metrics.metricName(ClientMetricsStats.PLUGIN_EXPORT_TIME + "-avg",
                ClientMetricsStats.GROUP_NAME, "Average time broker spent in invoking plugin exportMetrics call", tags), new Avg());
            pluginExport.add(metrics.metricName(ClientMetricsStats.PLUGIN_EXPORT_TIME + "-max",
                ClientMetricsStats.GROUP_NAME, "Maximum time broker spent in invoking plugin exportMetrics call", tags), new Max());
            sensorsName.add(pluginExport.name());

            Sensor pluginErrorCount = metrics.sensor(ClientMetricsStats.PLUGIN_ERROR + "-" + clientInstanceId);
            pluginErrorCount.add(createMeter(metrics, new WindowedCount(), ClientMetricsStats.PLUGIN_ERROR, tags));
            sensorsName.add(pluginErrorCount.name());
        }
Computes the SubscriptionId as a unique identifier for a client instance's subscription set,
the id is generated by calculating a CRC32C of the configured metrics subscriptions including
the PushIntervalMs, XORed with the ClientInstanceId.
server/src/main/java/org/apache/kafka/server/ClientMetricsManager.java