Class Utils
java.lang.Object
io.confluent.telemetry.provider.Utils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceBuilderFacadebuildResourceFromAllLabelsWithId(org.apache.kafka.common.metrics.MetricsContext metricsContext, String id) static ResourceBuilderFacadebuildResourceFromLabels(org.apache.kafka.common.metrics.MetricsContext metricsContext) Build aResourcefrom tags in theMetricsContextmetadata.static ResourceBuilderFacadebuildResourceFromLabelsWithId(org.apache.kafka.common.metrics.MetricsContext metricsContext, String id) static io.confluent.telemetry.api.events.EventconfigEvent(Map<String, ?> cfg, Predicate<String> configPredicate, io.opentelemetry.proto.resource.v1.Resource res, Provider provider, String eventType) configPredicate(String regexString) getNonResourceLabels(Map<String, String> metricsCtxMetadata) getResourceLabels(Map<String, String> metricsCtxMetadata) Extract the resource labels from the metrics context metadata and remove metrics context prefix.static booleannotEmptyString(Map<String, ?> m, String key) Validate that the map contains the key and the key is a non-empty stringstatic booleanvalidateRequiredLabels(Map<String, String> metadata) Validate that theMetricsContextmetadata has tags for - _namespace - type - version - cluster idstatic booleanvalidateRequiredResourceLabels(Map<String, String> metadata)
-
Field Details
-
LABEL_CLUSTER_ID
- See Also:
-
RESOURCE_LABEL_CLUSTER_ID
- See Also:
-
LABEL_RESOURCE_ID
- See Also:
-
KAFKA_BROKER_ID
- See Also:
-
KAFKA_NODE_ID
- See Also:
-
KAFKA_CLUSTER_ID
- See Also:
-
KAFKA_CELL_ID
- See Also:
-
KAFKA_PROCESS_ROLES
- See Also:
-
KAFKA_CONTROLLER_ROLE
- See Also:
-
KAFKA_BROKER_ROLE
- See Also:
-
CONNECT_KAFKA_CLUSTER_ID
- See Also:
-
CONNECT_GROUP_ID
- See Also:
-
CONNECT_WORKER_ID
- See Also:
-
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
notEmptyString
-
getResourceLabels
-
getNonResourceLabels
-
buildResourceFromLabels
public static ResourceBuilderFacade buildResourceFromLabels(org.apache.kafka.common.metrics.MetricsContext metricsContext) Build aResourcefrom tags in theMetricsContextmetadata.- Returns:
-
buildResourceFromLabelsWithId
public static ResourceBuilderFacade buildResourceFromLabelsWithId(org.apache.kafka.common.metrics.MetricsContext metricsContext, String id) -
buildResourceFromAllLabelsWithId
public static ResourceBuilderFacade buildResourceFromAllLabelsWithId(org.apache.kafka.common.metrics.MetricsContext metricsContext, String id) -
validateRequiredLabels
-
validateRequiredResourceLabels
-
configPredicate
-
configEvent
-