DEV Community

Using Azure Application Insights with Spring Boot (4/7)

Julien Dubois on May 28, 2019

This blog post is part of a series on "deploying a Spring Boot and Angular application on Azure", here is the full list of posts: Creating a Spri...
Collapse
 
kishore39600433 profile image
Biju

Hi Julien,

I am using Spring reactive app and have spring-boot-starter-webflux dependency . When I try to integrate with Application insights , I am getting below error .

Application insights doesn't support Spring 5 reactive framework?

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.microsoft.applicationinsights.autoconfigure.ApplicationInsightsWebMvcAutoConfiguration]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.class] cannot be opened because it does not exist
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:599) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:302) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:242) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:589) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.access$900(ConfigurationClassParser.java:108) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.lambda$processGroupImports$1(ConfigurationClassParser.java:808) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at java.util.ArrayList.forEach(ArrayList.java:1540) ~[?:?]

Collapse
 
jdubois profile image
Julien Dubois • Edited

Hi Biju,
Unfortunately Spring Webflux is not supported at the date of this writing, see the documentation at docs.microsoft.com/bs-latn-ba/java... (last point of the prerequisites)

Collapse
 
kishore39600433 profile image
Biju

Okay. Thanks for the update.

Collapse
 
davidkarlsen profile image
davidkarlsen

I see azure-spring-boot-metrics-starter is deprecated now - will you still get the micrometer based metrics without it?

Collapse
 
sayedshakil01 profile image
sayedshakil01 • Edited

Hi Julien,
Is it possible to set package level or class level logging for Application Insights. Could you please share/show if yes.

Thanks,
Shakil Sayed