You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Mikhail Petrov (Jira)" <ji...@apache.org> on 2021/03/22 12:30:00 UTC
[jira] [Updated] (IGNITE-14376) JmxMetricExporter fails to export
discovery metrics
[ https://issues.apache.org/jira/browse/IGNITE-14376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Petrov updated IGNITE-14376:
------------------------------------
Description:
Reproducer:
{code:java}
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
JmxMetricExporterSpi jmxSpi = new JmxMetricExporterSpi();
cfg.setMetricExporterSpi(jmxSpi);
return cfg;
}
/** */
@Test
public void test() throws Exception {
IgniteEx srv = startGrid();
DynamicMBean mBean = metricRegistry(srv.name(), "io", "discovery");
mBean.getMBeanInfo();
}
{code}
The main reason: JMX exporter assumes that each metric must starts with the name of the registry it belongs to (see MetricRegistryMBean#getMBeanInfo), but discovery metrics do not obey this naming convection (see TcpDiscoveryStatistics/ZookeeperDiscoveryStatistics).
was:
Reproducer:
{code:java}
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
JmxMetricExporterSpi jmxSpi = new JmxMetricExporterSpi();
cfg.setMetricExporterSpi(jmxSpi);
return cfg;
}
/** */
@Test
public void test() throws Exception {
IgniteEx srv = startGrid();
DynamicMBean mBean = metricRegistry(srv.name(), "io", "discovery");
mBean.getMBeanInfo();
}
{code}
The main reason: JMX exporter assumes that each metric must starts with the name of the registry it belongs to(see MetricRegistryMBean#getMBeanInfo), but discovery metrics do not obey this naming convection (see TcpDiscoveryStatistics/ZookeeperDiscoveryStatistics).
> JmxMetricExporter fails to export discovery metrics
> ---------------------------------------------------
>
> Key: IGNITE-14376
> URL: https://issues.apache.org/jira/browse/IGNITE-14376
> Project: Ignite
> Issue Type: Bug
> Reporter: Mikhail Petrov
> Priority: Major
>
> Reproducer:
> {code:java}
> /** {@inheritDoc} */
> @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
> IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
> JmxMetricExporterSpi jmxSpi = new JmxMetricExporterSpi();
> cfg.setMetricExporterSpi(jmxSpi);
> return cfg;
> }
> /** */
> @Test
> public void test() throws Exception {
> IgniteEx srv = startGrid();
> DynamicMBean mBean = metricRegistry(srv.name(), "io", "discovery");
> mBean.getMBeanInfo();
> }
> {code}
> The main reason: JMX exporter assumes that each metric must starts with the name of the registry it belongs to (see MetricRegistryMBean#getMBeanInfo), but discovery metrics do not obey this naming convection (see TcpDiscoveryStatistics/ZookeeperDiscoveryStatistics).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)