Giter Club home page Giter Club logo

Comments (5)

cmoulliard avatar cmoulliard commented on June 7, 2024 1

@pavolloffay I'm sorry to say that but this is not clear. Example to configure the jaeger or zipkin bean should be proposed such as this one with more detail about Configuration

Jaeger

    @Bean
    public Tracer jaegerTracer() {
        return new Configuration("spring-boot",
           new Configuration.SamplerConfiguration(ProbabilisticSampler.TYPE, 1),
           new Configuration.ReporterConfiguration(true,System.getenv("HOSTNAME"),null,null, null))
           .getTracer();
    }

As you can see, it is required too to pass System.getenv("HOSTNAME") otherwise Spring app where opentracing spring cloud is included will not be able to communicate with the agent

from java-spring-cloud.

pavolloffay avatar pavolloffay commented on June 7, 2024

I think this is clear for spring users. If you ask them to provide the bean, then it indicates to inject it when it is necessary.

from java-spring-cloud.

pavolloffay avatar pavolloffay commented on June 7, 2024

I think Gary wants to document how to obtain the tracer bean and use it e.g.:

@Autowire
Tracer tracer;
....

public void foo() {
   Span s = tracer.buildSpan("name").start();
   // some code
   s.finish();
}

@cmoulliard there might be a lot of variations how you configure the tracer. I would rather see this section in jaeger java client repo. But I totally see your point as the tracer config is sometimes not trivial.

About the jaeger's binding to spring ecosystem we can create a separate project in snowdrop which would provide jaeger bean for this instrumentation with spring configuration capabilities. For example I would like to configure service name, sampling, reporter directly in spring yml.

from java-spring-cloud.

objectiser avatar objectiser commented on June 7, 2024

@pavolloffay I created the issue as @cmoulliard had asked about how to obtain the tracer. So depends whether he thinks this needs documenting? Otherwise can be closed.

from java-spring-cloud.

cmoulliard avatar cmoulliard commented on June 7, 2024

About the jaeger's binding to spring ecosystem we can create a separate project in snowdrop which would provide jaeger bean for this instrumentation

Ok for this proposition. If we do that than we can keep in a certain way the doc abstract here and add link to the projects where they can find how we have instrumented = implemented the Tracer (jaeger, Zipkin, ....)

from java-spring-cloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.