Class DebugUtils


  • public final class DebugUtils
    extends java.lang.Object
    Utilities for logging metric diagnostic issues.

    This is a publicly accessible class purely for testing.

    This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

    • Constructor Detail

      • DebugUtils

        private DebugUtils()
    • Method Detail

      • duplicateMetricErrorMessage

        public static java.lang.String duplicateMetricErrorMessage​(MetricDescriptor existing,
                                                                   MetricDescriptor conflict)
        Creates a detailed error message comparing two MetricDescriptors.

        Called when the metrics with the descriptors have the same name, but MetricDescriptor.equals(Object) is false.

        This should identify all issues between the descriptor and log information on where they are defined. Users should be able to find/fix issues based on this error.

        Visible for testing.

        Parameters:
        existing - The already registered metric stream.
        conflict - The about-to-be registered metric stream.
        Returns:
        A multi-line debugging string.