use of org.apache.ignite.spi.metric.sql.SqlViewMetricExporterSpi in project ignite by apache.
the class ConfiguringMetrics method sqlExporter.
@Test
void sqlExporter() {
// tag::sql-exporter[]
IgniteConfiguration cfg = new IgniteConfiguration();
SqlViewMetricExporterSpi jmxExporter = new SqlViewMetricExporterSpi();
// export cache metrics only
jmxExporter.setExportFilter(mreg -> mreg.name().startsWith("cache."));
cfg.setMetricExporterSpi(jmxExporter);
// end::sql-exporter[]
Ignition.start(cfg).close();
}
use of org.apache.ignite.spi.metric.sql.SqlViewMetricExporterSpi in project ignite by apache.
the class ConfiguringMetrics method newMetrics.
@Test
void newMetrics() {
// tag::new-metric-framework[]
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setMetricExporterSpi(new JmxMetricExporterSpi(), new SqlViewMetricExporterSpi());
Ignite ignite = Ignition.start(cfg);
// end::new-metric-framework[]
ignite.close();
}
Aggregations