Class CustomMetric.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • namespace

        public CustomMetric.Builder namespace​(String namespace)
        Namespace in the Custom Metric.

        It defaults to oracle_apm_custom if not specified. If specified, the necessary OCI policies should be set to allow APM to write to that namespace.

        Parameters:
        namespace - the value to set
        Returns:
        this builder
      • name

        public CustomMetric.Builder name​(String name)
        Name of the Custom Metric.
        Parameters:
        name - the value to set
        Returns:
        this builder
      • description

        public CustomMetric.Builder description​(String description)
        Description of the Custom Metric.
        Parameters:
        description - the value to set
        Returns:
        this builder
      • resourceGroup

        public CustomMetric.Builder resourceGroup​(String resourceGroup)
        Resource Group of the Custom Metric.
        Parameters:
        resourceGroup - the value to set
        Returns:
        this builder
      • isAnomalyDetectionEnabled

        public CustomMetric.Builder isAnomalyDetectionEnabled​(Boolean isAnomalyDetectionEnabled)
        Indicates whether anomaly Detection should be performed on the generated metric.
        Parameters:
        isAnomalyDetectionEnabled - the value to set
        Returns:
        this builder
      • compartment

        public CustomMetric.Builder compartment​(String compartment)
        Compartment of the Monitoring Service.

        It defaults to the APM domain’s compartment if not specified. If specified, the necessary OCI policies should be set to allow APM to write to that compartment.

        Parameters:
        compartment - the value to set
        Returns:
        this builder
      • unit

        public CustomMetric.Builder unit​(String unit)
        Unit in which the metric value is reported.

        For example ‘ms’.

        Parameters:
        unit - the value to set
        Returns:
        this builder
      • isMetricPublished

        public CustomMetric.Builder isMetricPublished​(Boolean isMetricPublished)
        Used in conjunction with the dry run header.

        When the dry run header is set and the isPublishMetric flag is set to true, the scheduled query is not created, but validations happen to check if the right OCI policies have been set to write to the specified namespace/compartment.

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