Package com.netflix.genie.web.util
Class MetricsUtils
java.lang.Object
com.netflix.genie.web.util.MetricsUtils
Utility methods for metrics.
- Since:
- 3.1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addFailureTagsWithException
(Set<io.micrometer.core.instrument.Tag> tags, Throwable throwable) Convenience method to add failure status and exception cause to an existing set of tags.static void
addSuccessTags
(Set<io.micrometer.core.instrument.Tag> tags) Convenience method to add success tag to an existing set of tags.static Set<io.micrometer.core.instrument.Tag>
Convenience method that creates a tag set pre-populated with failure status and exception details.static Set<io.micrometer.core.instrument.Tag>
Convenience method that creates a tag set pre-populated with success status.
-
Method Details
-
newSuccessTagsSet
Convenience method that creates a tag set pre-populated with success status.- Returns:
- a new set containing success tags
-
addSuccessTags
Convenience method to add success tag to an existing set of tags.- Parameters:
tags
- the set of tags to add success tags to
-
newFailureTagsSetForException
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(Set<io.micrometer.core.instrument.Tag> tags, 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
-