Package com.netflix.genie.web.util
Class MetricsUtils
- java.lang.Object
-
- com.netflix.genie.web.util.MetricsUtils
-
public final class MetricsUtils extends java.lang.Object
Utility methods for metrics.- Since:
- 3.1.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addFailureTagsWithException(java.util.Set<io.micrometer.core.instrument.Tag> tags, java.lang.Throwable throwable)
Convenience method to add failure status and exception cause to an existing set of tags.static void
addSuccessTags(java.util.Set<io.micrometer.core.instrument.Tag> tags)
Convenience method to add success tag to an existing set of tags.static java.util.Set<io.micrometer.core.instrument.Tag>
newFailureTagsSetForException(java.lang.Throwable t)
Convenience method that creates a tag set pre-populated with failure status and exception details.static java.util.Set<io.micrometer.core.instrument.Tag>
newSuccessTagsSet()
Convenience method that creates a tag set pre-populated with success status.
-
-
-
Method Detail
-
newSuccessTagsSet
public static java.util.Set<io.micrometer.core.instrument.Tag> newSuccessTagsSet()
Convenience method that creates a tag set pre-populated with success status.- Returns:
- a new set containing success tags
-
addSuccessTags
public static void addSuccessTags(java.util.Set<io.micrometer.core.instrument.Tag> tags)
Convenience method to add success tag to an existing set of tags.- Parameters:
tags
- the set of tags to add success tags to
-
newFailureTagsSetForException
public static java.util.Set<io.micrometer.core.instrument.Tag> newFailureTagsSetForException(java.lang.Throwable t)
Convenience method that creates a tag set pre-populated with failure status and exception details.- Parameters:
t
- the exception- Returns:
- a new set containing failure tags
-
addFailureTagsWithException
public static void addFailureTagsWithException(java.util.Set<io.micrometer.core.instrument.Tag> tags, java.lang.Throwable throwable)
Convenience method to add failure status and exception cause to an existing set of tags.- Parameters:
tags
- the set of existing tagsthrowable
- the exception to be tagged
-
-