question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Open-tracing integration with spring-cloud-starter-netflix-eureka-serve

See original GitHub issue

I am trying to setup open-tracing with spring eureka server. POM.xml

image

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:closed
  • Created 3 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
pavolloffaycommented, Jul 13, 2020

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 in spring-web https://github.com/opentracing-contrib/java-spring-cloud/blob/master/instrument-starters/opentracing-spring-cloud-gateway-starter/pom.xml#L40

0reactions
Zettencommented, Jul 29, 2020

I’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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found