Open-tracing integration with spring-cloud-starter-netflix-eureka-serve
See original GitHub issueI am trying to setup open-tracing with spring eureka server. POM.xml
ApplicationRunner
@SpringBootApplication
@EnableEurekaServer
public class ApplicationRunner {
public static void main(String[] args) {
SpringApplication.run(ApplicationRunner.class);
}
@Bean
public JaegerTracer getTracer(){
Configuration.SamplerConfiguration samplerConfiguration = new Configuration.SamplerConfiguration();
samplerConfiguration.withType(ConstSampler.TYPE);
samplerConfiguration.withParam(1);
Configuration.SenderConfiguration senderConfiguration = new Configuration.SenderConfiguration();
senderConfiguration.withAgentHost("XXX.XXX.XX.X").withAgentPort(XYZ);
Configuration.ReporterConfiguration reporterConfiguration = new Configuration.ReporterConfiguration();
reporterConfiguration.withSender(senderConfiguration);
return new Configuration("ebs-eureka-server").withSampler(samplerConfiguration).withReporter(reporterConfiguration).getTracer();
}
}
Error Log
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.web.servlet.resource.ResourceHttpRequestHandler.afterPropertiesSet(ResourceHttpRequestHandler.java:378)
The following method did not exist:
'java.util.Map org.springframework.web.accept.ContentNegotiationManager.getMediaTypeMappings()'
The method's class, org.springframework.web.accept.ContentNegotiationManager, is available from the following locations:
jar:file:/Users/in-mayank.vaid/.m2/repository/org/springframework/spring-web/5.2.0.RELEASE/spring-web-5.2.0.RELEASE.jar!/org/springframework/web/accept/ContentNegotiationManager.class
It was loaded from the following location:
file:/Users/in-mayank.vaid/.m2/repository/org/springframework/spring-web/5.2.0.RELEASE/spring-web-5.2.0.RELEASE.jar
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Spring Cloud Netflix
This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring ...
Read more >Introduction to Spring Cloud Netflix - Eureka - Baeldung
In this tutorial, we'll introduce client-side service discovery via “Spring Cloud Netflix Eureka.” Client-side service discovery allows ...
Read more >How to integrate opentracing/jaeger with spring cloud, hystrix ...
The initial setup worked pretty nicely by simply adding the necessary spring (cloud) starter dependencies to our build files. Each time, a ...
Read more >Error creating bean with name 'io.opentracing.contrib.spring ...
Built on :: Spring Boot :: (v2.2.1. ... path resource [io/opentracing/contrib/java/spring/jaeger/starter/JaegerAutoConfiguration.class]: ...
Read more >Service Discovery with Netflix Eureka, Spring Boot ... - Medium
Netflix Eureka is one of the great libraries of Netflix OSS particularly focused on service discovery and Spring has a fluent integration with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The cloud instrumentation uses opentracing-spring-web which seems to use the right dependency
spring-webmvc
https://github.com/opentracing-contrib/java-spring-web/blob/master/opentracing-spring-web/pom.xml#L39.Try to exclude
opentracing-spring-cloud-gateway-starter
It is pulling inspring-web
https://github.com/opentracing-contrib/java-spring-cloud/blob/master/instrument-starters/opentracing-spring-cloud-gateway-starter/pom.xml#L40I’m not really able to do much testing for this, as I don’t have any app using Eureka Server, but I’ve got a PR up at #299.