-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring web tracing #2
Spring web tracing #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - might want to get Charles or Ales to also take a look.
Although the tests seem to be failing on Travis.
README.md
Outdated
* Spring Web | ||
|
||
## Configuration | ||
Just drop the following dependency on classpath: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on classpath is misleading - should just say "Just add the following dependency in your maven pom:"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's basically classpath :P
README.md
Outdated
, and provide OpenTracing tracer bean: | ||
```java | ||
@Bean | ||
public io.opnetracingTracer tracer() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io.opentracing.Tracer
opentracing-spring-cloud/pom.xml
Outdated
<dependency> | ||
<groupId>io.opentracing</groupId> | ||
<artifactId>opentracing-mock</artifactId> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be a test dependency? and if so, should then move below the spring-web-autoconfigure dependency.
looks like you created multi module project. Maybe it is better to have one project without modules but with different packages for Web, Feign, RxJava etc? |
Yes, we want one artifact which would instrument everything and currently it is |
As I remember I had an issue with @Bean
@LoadBalanced
public RestTemplate restTemplate() {
return new RestTemplate();
} It was not automatically instrumented by java-spring-web. @PostConstruct
public void addRestTemplateInterceptor() {
// We need manually add tracing interceptor because of @LoadBalanced RestTemplate
restTemplate.getInterceptors().add(new TracingRestTemplateInterceptor(tracer));
} I didn't look how |
I will have a look at it tomorrow but I believe it can also be handled by Ribbon instrumentation ( |
@malafeev I had a look at it and Example code: |
@alesj @cmoulliard feel free to comment later, I will merge to not block @malafeev |
This pulls auto-configs from
ot-spring-web
.