Class Datapoint.Builder

  • Enclosing class:
    Datapoint

    public static class Datapoint.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • timestamp

        public Datapoint.Builder timestamp​(Date timestamp)
        Timestamp for this metric value.

        Format defined by RFC3339. For a data point to be posted, its timestamp must be near current time (less than two hours in the past and less than 10 minutes in the future).

        Example: 2023-02-01T01:02:29.600Z

        Parameters:
        timestamp - the value to set
        Returns:
        this builder
      • value

        public Datapoint.Builder value​(Double value)
        Numeric value of the metric.

        Example: 10.23

        Parameters:
        value - the value to set
        Returns:
        this builder
      • count

        public Datapoint.Builder count​(Integer count)
        The number of occurrences of the associated value in the set of data.

        Default is 1. Value must be greater than zero.

        Parameters:
        count - the value to set
        Returns:
        this builder