Class PartitionMetricUtils

java.lang.Object
io.confluent.kafka.multitenant.metrics.utils.PartitionMetricUtils

public final class PartitionMetricUtils extends Object
  • Constructor Details

    • PartitionMetricUtils

      public PartitionMetricUtils()
  • Method Details

    • tenantPartitionMetricTags

      public static Map<String,String> tenantPartitionMetricTags(String tenant, org.apache.kafka.common.TopicPartition tp, boolean isCpcEnabled)
      Generates the metric tags used to index a metric by tenant and topic partition.
      Parameters:
      tenant - id of the tenant
      tp - topic partition
      isCpcEnabled - whether CPC mode is active
      Returns:
      metric tags as a map
    • tenantPartitionMetricTags

      public static Map<String,String> tenantPartitionMetricTags(String tenant, org.apache.kafka.common.TopicPartition tp, boolean isCpcEnabled, io.confluent.kafka.common.StorageClass storageClass)
      Generates the metric tags used to index a metric by tenant, topic partition, and (when present) storage class.
      Parameters:
      tenant - id of the tenant
      tp - topic partition
      isCpcEnabled - whether CPC mode is active
      storageClass - the storage class of the partition's topic, or null when unresolved
      Returns:
      metric tags as a map