Class DebugUtils
java.lang.Object
io.opentelemetry.sdk.metrics.internal.state.DebugUtils
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic String
duplicateMetricErrorMessage
(MetricDescriptor existing, MetricDescriptor conflict) Creates a detailed error message comparing twoMetricDescriptor
s.
-
Constructor Details
-
DebugUtils
private DebugUtils()
-
-
Method Details
-
duplicateMetricErrorMessage
public static 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.
-