Class MetricsUtils

java.lang.Object
com.netflix.genie.web.util.MetricsUtils

public final class MetricsUtils extends Object
Utility methods for metrics.
Since:
3.1.0
  • Method Details

    • newSuccessTagsSet

      public static 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(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 Set<io.micrometer.core.instrument.Tag> newFailureTagsSetForException(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(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 tags
      throwable - the exception to be tagged