Tanmay Ambre created IGNITE-13855:
-------------------------------------

             Summary: Integration with micrometer.io as part of integration 
with spring-boot
                 Key: IGNITE-13855
                 URL: https://issues.apache.org/jira/browse/IGNITE-13855
             Project: Ignite
          Issue Type: Wish
          Components: general
    Affects Versions: 2.9
            Reporter: Tanmay Ambre


hi,

I run Ignite server nodes as Spring-boot applications. We use actuator, 
micrometer and prometheus meter registries for monitoring. 

I implemented a new MetricExporterSpi to push metrics as gauges in micrometer. 
So that we can easily monitor the metrics using our prometheus-grafana 
dashboards. However, the problem is the MetricExporterSpi never gets attached. 
Reason for that is as follows:
 # I use an xml file to configure ignite. 
 # After I do Ignition.start(configFilePath) - I perform 
ignite.configuration().setMetricExporterSpi(). - however, after this call the 
spiStart method of the MetricExporterSpi is not called. 
 # If I configure ExporterSpi in the ignite config xml file - the exporterSpi 
lifecycle methods are invoked as part of Ignition.start(). But then I can't 
inject the micrometer registry in my custom ExporterSpi. 
 # If i call the spi.start() manually - it doesnt work because the 
setReadOnlyMetricRegistry is not invoked. 

Any suggestions? I can use Opencensus - and then export metrics to Prometheus - 
however - this would require me to start a HTTP Server inside ignite. This can 
be become cumbersome when deployed in container mode (on K8S, Openshift, etc). 

 

Code of my IgniteConfig is shown below

 
{quote}@Configuration
public class IgniteConfig
{
 @Autowired
 ApplicationConfig applicationConfig;

 @Autowired
 MicrometerMetricsExporterSpi mmes;

 @Bean
 public Ignite ignite()
 {
 Ignite igniteInstance = 
Ignition.start(applicationConfig.getIgniteConfig().getConfigFile());
 MetricExporterSpi[] metricSpis = 
igniteInstance.configuration().getMetricExporterSpi();

 igniteInstance.configuration().setMetricExporterSpi(mmes);
 if (applicationConfig.getIgniteConfig().isAutoActivateCluster())
 {
 igniteInstance.cluster().state(ClusterState.ACTIVE);
 }
 return igniteInstance;
 }
}{quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to