Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
public class Metrics {

    /** The registry that holds the metrics. */
 	private final MetricRegistry registry;

    /** The metrics reporters container. */
  	private final List<MetricsReporter> reporters;

	/** The metrics group. */
	private final MetricGroup metricGroup;

	/** Register metrics to MetricRegistry. 
 		@param name The name of metric.
		@param metric The metric to register.	
	*/
	public void registerMetrics(String name, Metric metric) {}
}

...

MetricGroup

MetricRegistry MetricGroup is a class responsible for metrics registering, there is a metrics container in it. It provides register method for each type of measurable metric, registering metrics will put metrics to the metrics container.

Code Block
languagejava
public class MetricRegistryMetricGroup {

	/** Map of gauge metrics. */
    private final Map<String, Gauge<?>> gauges = new HashMap<>();

    /** Map of counter metrics. */
    private final Map<String, Counter> counters = new HashMap<>();

	/** Register gauge metric. */
 	public void gauge(String name, Gauge gauge) {}

	/** Register counter metric. */
	public void counter(String name, Counter counter) {}

 	/** Add tag for metrics. */
	public void addTag(String tag, String value) {}  
}

MetricsReporter

MetricsReporter  is used to report metrics to external backend, Paimon will implement an out of box reporter as JMX `MetricsReporter`.

...