How to use Jaeger with Spring WebFlux?
We are trying to go reactive with Webflux. We are using Jaegar with Istio for instrumentation purposes.
Jaegar understands Spring MVC endpoints well, but don't seem to work at all for WebFlux.
I am looking for suggestions to make my webflux endpoints appear in Jaeger.
Thanks in advance.
spring-webflux istio opentracing jaeger
add a comment |
We are trying to go reactive with Webflux. We are using Jaegar with Istio for instrumentation purposes.
Jaegar understands Spring MVC endpoints well, but don't seem to work at all for WebFlux.
I am looking for suggestions to make my webflux endpoints appear in Jaeger.
Thanks in advance.
spring-webflux istio opentracing jaeger
add a comment |
We are trying to go reactive with Webflux. We are using Jaegar with Istio for instrumentation purposes.
Jaegar understands Spring MVC endpoints well, but don't seem to work at all for WebFlux.
I am looking for suggestions to make my webflux endpoints appear in Jaeger.
Thanks in advance.
spring-webflux istio opentracing jaeger
We are trying to go reactive with Webflux. We are using Jaegar with Istio for instrumentation purposes.
Jaegar understands Spring MVC endpoints well, but don't seem to work at all for WebFlux.
I am looking for suggestions to make my webflux endpoints appear in Jaeger.
Thanks in advance.
spring-webflux istio opentracing jaeger
spring-webflux istio opentracing jaeger
edited Nov 16 '18 at 6:50
Brian Clozel
31.7k677102
31.7k677102
asked Nov 15 '18 at 15:37
Anoop HallimalaAnoop Hallimala
132112
132112
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The best way to move forward in order to use Jaegar is NOT TO USE JAEGAR CLIENT!
Jaegar has the ability to collect Zipkin spans:
https://www.jaegertracing.io/docs/1.8/getting-started/#migrating-from-zipkin
You should take advantage of this and use the below Sleuth+Zipkin dependency and exclude Jaegar agent jars in your spring boot app.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
The above will send Zipkin spans to http://localhost:9411 by default. You can override this in your Spring Boot app to point to your Jaegar server easily by overriding the zipkin base URL.
spring.zipkin.base-url=http://your-jaegar-server:9411
Sleuth will do all the heavy lifting and the default logging will log the span and traceIds.
In the log4j2.xml file, all you have to mention is
[%X]
You can find the sample code here:
https://github.com/anoophp777/spring-webflux-jaegar-log4j2
An alternative is to start using github.com/opentracing-contrib/java-spring-cloud instead of Sleuth + Zipkin .. more here: medium.com/jaegertracing/…
– ebullient
Jan 16 at 13:23
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53322900%2fhow-to-use-jaeger-with-spring-webflux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The best way to move forward in order to use Jaegar is NOT TO USE JAEGAR CLIENT!
Jaegar has the ability to collect Zipkin spans:
https://www.jaegertracing.io/docs/1.8/getting-started/#migrating-from-zipkin
You should take advantage of this and use the below Sleuth+Zipkin dependency and exclude Jaegar agent jars in your spring boot app.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
The above will send Zipkin spans to http://localhost:9411 by default. You can override this in your Spring Boot app to point to your Jaegar server easily by overriding the zipkin base URL.
spring.zipkin.base-url=http://your-jaegar-server:9411
Sleuth will do all the heavy lifting and the default logging will log the span and traceIds.
In the log4j2.xml file, all you have to mention is
[%X]
You can find the sample code here:
https://github.com/anoophp777/spring-webflux-jaegar-log4j2
An alternative is to start using github.com/opentracing-contrib/java-spring-cloud instead of Sleuth + Zipkin .. more here: medium.com/jaegertracing/…
– ebullient
Jan 16 at 13:23
add a comment |
The best way to move forward in order to use Jaegar is NOT TO USE JAEGAR CLIENT!
Jaegar has the ability to collect Zipkin spans:
https://www.jaegertracing.io/docs/1.8/getting-started/#migrating-from-zipkin
You should take advantage of this and use the below Sleuth+Zipkin dependency and exclude Jaegar agent jars in your spring boot app.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
The above will send Zipkin spans to http://localhost:9411 by default. You can override this in your Spring Boot app to point to your Jaegar server easily by overriding the zipkin base URL.
spring.zipkin.base-url=http://your-jaegar-server:9411
Sleuth will do all the heavy lifting and the default logging will log the span and traceIds.
In the log4j2.xml file, all you have to mention is
[%X]
You can find the sample code here:
https://github.com/anoophp777/spring-webflux-jaegar-log4j2
An alternative is to start using github.com/opentracing-contrib/java-spring-cloud instead of Sleuth + Zipkin .. more here: medium.com/jaegertracing/…
– ebullient
Jan 16 at 13:23
add a comment |
The best way to move forward in order to use Jaegar is NOT TO USE JAEGAR CLIENT!
Jaegar has the ability to collect Zipkin spans:
https://www.jaegertracing.io/docs/1.8/getting-started/#migrating-from-zipkin
You should take advantage of this and use the below Sleuth+Zipkin dependency and exclude Jaegar agent jars in your spring boot app.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
The above will send Zipkin spans to http://localhost:9411 by default. You can override this in your Spring Boot app to point to your Jaegar server easily by overriding the zipkin base URL.
spring.zipkin.base-url=http://your-jaegar-server:9411
Sleuth will do all the heavy lifting and the default logging will log the span and traceIds.
In the log4j2.xml file, all you have to mention is
[%X]
You can find the sample code here:
https://github.com/anoophp777/spring-webflux-jaegar-log4j2
The best way to move forward in order to use Jaegar is NOT TO USE JAEGAR CLIENT!
Jaegar has the ability to collect Zipkin spans:
https://www.jaegertracing.io/docs/1.8/getting-started/#migrating-from-zipkin
You should take advantage of this and use the below Sleuth+Zipkin dependency and exclude Jaegar agent jars in your spring boot app.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
The above will send Zipkin spans to http://localhost:9411 by default. You can override this in your Spring Boot app to point to your Jaegar server easily by overriding the zipkin base URL.
spring.zipkin.base-url=http://your-jaegar-server:9411
Sleuth will do all the heavy lifting and the default logging will log the span and traceIds.
In the log4j2.xml file, all you have to mention is
[%X]
You can find the sample code here:
https://github.com/anoophp777/spring-webflux-jaegar-log4j2
answered Nov 16 '18 at 18:27
Anoop HallimalaAnoop Hallimala
132112
132112
An alternative is to start using github.com/opentracing-contrib/java-spring-cloud instead of Sleuth + Zipkin .. more here: medium.com/jaegertracing/…
– ebullient
Jan 16 at 13:23
add a comment |
An alternative is to start using github.com/opentracing-contrib/java-spring-cloud instead of Sleuth + Zipkin .. more here: medium.com/jaegertracing/…
– ebullient
Jan 16 at 13:23
An alternative is to start using github.com/opentracing-contrib/java-spring-cloud instead of Sleuth + Zipkin .. more here: medium.com/jaegertracing/…
– ebullient
Jan 16 at 13:23
An alternative is to start using github.com/opentracing-contrib/java-spring-cloud instead of Sleuth + Zipkin .. more here: medium.com/jaegertracing/…
– ebullient
Jan 16 at 13:23
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53322900%2fhow-to-use-jaeger-with-spring-webflux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown