Interface Metric.Builder<M extends Metric>

Enclosing interface:
Metric

public static interface Metric.Builder<M extends Metric>
Represents a builder for metric objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds the metric based on the properties given to this builder.
    withDescription(String description)
    Returns this Builder with the given description of the metric being built.
    withTag(String name, String value)
    Returns this Builder with the given tag added to the list of tags of the metric being built.
  • Method Details

    • withDescription

      Metric.Builder<M> withDescription(String description)
      Returns this Builder with the given description of the metric being built.
      Parameters:
      description - Description of the metric
      Returns:
      The builder with added description
    • withTag

      Metric.Builder<M> withTag(String name, String value)
      Returns this Builder with the given tag added to the list of tags of the metric being built.
      Parameters:
      name - Tag key
      value - Tag value
      Returns:
      The builder with added tag
    • build

      M build()
      Builds the metric based on the properties given to this builder.
      Returns:
      Ready-to-use metric