Comments (5)
@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.
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.
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.
@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.
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)
- Application Context fails to start due to dependency on org.springframework:spring-web
- spring-ws
- Application won't start with opentracing.spring.cloud.reactor.enabled=true HOT 1
- NoClassDefFoundError: org/springframework/cloud/openfeign/ribbon/LoadBalancerFeignClient when using spring-cloud-dependencies:2020.0.0 HOT 15
- DefaultAsyncAutoConfiguration override a implicit AsyncTaskExecutor
- Could not report to Jaeger when using spring cloud apigw
- Trace Span logs not appended to the loggers HOT 2
- What's the plan for supporting Spring Cloud 2020 HOT 1
- Spring boot messaging Failed to serialize object caused by jaeger HOT 1
- Does this support Honeycomb open tracing?
- Release of version 0.6.0 to maven central HOT 5
- TraceRequestHttpHeadersFilter Overrides headers
- not support ConcurrentTaskScheduler?
- Using OT side-by-side with NewRelic
- Update jaeger-client dependency due to CVE-2020-13949 HOT 4
- java.lang.NoSuchMethodError: 'io.opentracing.Scope io.opentracing.Tracer$SpanBuilder.startActive(boolean) HOT 1
- ignoreStatements not working for opentracing-spring-cloud-mongo-starter
- `opentracing-spring-cloud-redis-starter` RedisClusterConnection wrapped in TracingRedisConnection
- Dependency to opentracing-spring-jaeger-cloud-starter removes "http_server_requests_seconds_count" metric since SpringBoot 2.7.0
- `uber-trace-id` from incoming request overwrites client span in spring cloud gateway tracing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-spring-cloud.