Class DebugUtils
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.state.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 Summary
Constructors Modifier Constructor Description private
DebugUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
duplicateMetricErrorMessage(MetricDescriptor existing, MetricDescriptor conflict)
Creates a detailed error message comparing twoMetricDescriptor
s.
-
-
-
Method Detail
-
duplicateMetricErrorMessage
public static java.lang.String duplicateMetricErrorMessage(MetricDescriptor existing, MetricDescriptor conflict)
Creates a detailed error message comparing twoMetricDescriptor
s.Called when the metrics with the descriptors have the same name, but
MetricDescriptor.equals(Object)
isfalse
.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.
-
-