Opentelemetry agent vs spring cloud sleuth - spring-boot

I’m looking for some distributed tracing technologies for our spring boot services, in the internet, I see we have 2 popular choices I.e opentelemetry agent and spring cloud sleuth.
I see both of the them have good integration support, I’m confused to which one to go for, please give me some suggestions

As of today, you can find the following announcement on the Sleuth's Spring page:
Spring Cloud Sleuth’s last minor version is 3.1. You can check the 3.1.x branch for the latest commits. The core of this project got moved to Micrometer Tracing project and the instrumentations will be moved to Micrometer and all respective projects (no longer all instrumentations will be done in a single repository).
Additionally, sleuth is not playing nicely when trying to integrate tracing with other java-but-not-spring-exclusive libraries. To afford any such implementation you would need to configure Sleuth to use the open-telemetry tracer.
Thus, my advice would be to go for open-telemetry, unless you have an exclusive reason not to do that.
As for my current approach, I was introducing otel into an established project that is due for a Spring Boot 3 migration next year. I thus opted to use non-sleuth Spring otel libraries to avoid coupling with Sleuth in this short period.
I am not sure if that's a good approach, but with a lack of proper Spring 2 -> 3 migration, this way will not be a blocker until you can migrate other deps over

Related

Netflix Hystrix Support

Netflix Hystrix seems to be going to a maintenance mode. Would like to
understand what is SAP's take on this? Will there be any change going
forward?
As per the S4SDK blog Click here! , SAP S4 cloud archetype is using Hystrix library for resilience. From the Netflix Hystrix library,https://github.com/Netflix/Hystrix, it states that there won't be any new developments and it continues to be in maintenance mode. They have recommended using resilience4j going forward.
Need to understand, what is SAP's recommendation going forward in terms of S4SDK for using Hystrix?
Update: Starting with version 3.0.0 of the SAP Cloud SDK we replaced Hystrix with Resilience4J as our go-to resilience framework.
For more details checkout our updated tutorial here.
We are currently heavily investigating into replacing Hystrix with Resilience4J.
As a workaround you could handle the resilience of your commands yourself using Resilience4J (wrapping your logic into the decorators needed) instead of extending the SDKs ErpCommand.
I will update this answer when we can share details/results.

Version of dependencies to Spring Cloud projects in one microservice network

Question regarding correct set up of microservice infrastructure with Spring Cloud projects. Let's assume there are service discovery, Gateway, config service and some custom service. All of them have dependecy to Spring Cloud projects of version Camden.
And it is necessary to upgrade one of them (let say Gateway) to version Edware.
Should the rest of microservice also be upgraded to version Edware or can safety stay with Camden?
By looking at release notes of Edgware.SR3, seems like there are couple of fixes in config but thing to notice is Eureka is moved to 1.7.2
Not sure which Camden release you are on but supposedly, if you are on Camden.SR7 and planning to migrate to Edgware.M1, there are many releases in between which you have to keep track of and changes that occured in between.
You can find the release dates & sequence here
Other than that, there are no more changes so far(atleast not in the release document) that could affect your discussed architecture.
Best bet would be to try and test.

BPMN for spring boot 2

We have started new project on spring stack and using latest versions. But we have workflow requirement and I used activiti in past. But as I see there is no spring boot 2 support for activiti and camunda. Can anybody suggest which BPM is best that can be integrated with spring boot 2.
You will find a bunch of Spring Boot 2 starters in the Flowable github repo.
The documentation explains step-by-step how to create a BPM enabled Spring Boot application. There is also the blog post The road to Spring Boot 2.0 that the improved support for Flowable within Spring Boot as part of the Flowable 6.3.0 release.
You ask for suggestions on which BPM is best. Well, I cannot be objective since I am part of the Flowable Team, but I can say that our Spring Boot implementation is pretty neat:
All engines are supported (BPMN, CMMN, DMN), both embedded and exposing their respective REST APIs.
There is an automatic configuration of Spring Security to use the Flowable IDM engine (in case no other custom security is configured).
There is no "EE" version of the starter. Flowable provides Spring Boot 2 support 100% Open Source.
The Spring Actuator integration is quite powerful.
Did I mention Open Source? ;-)
In order to get the all engines you would need to use the flowable-spring-boot-starter(-rest) dependency. The (-rest) needs to be used if you want the Flowable REST APIs to be automatically configured.
There is also the option to run the BPMN, CMMN or DMN engines in standalone mode. For that you would need one of the following dependencies:
flowable-spring-boot-starter-process(-rest)
flowable-spring-boot-starter-cmmn(-rest)
flowable-spring-boot-starter-dmn(-rest)
So, compare for yourself, but for me, it's pretty clear and of course I am open to discussion.
The Activiti is working on Activiti Cloud fully based on Spring Boot 2 and Spring Cloud Finchley (targeting kubernetes deployments, but it can be used outside kubernetes if that is not your thing) if you are looking for a BPMN runtime for Cloud Native applications. We are working hard on releasing the first Beta1 release at the moment, and we will very welcome feedback about it. Hope this helps.
If you use the camunda-bpm-spring-boot-starter you can write self contained services running camunda process engine with spring boot 2.

spring cloud three releases difference Angel, Brixton and Camden

I see there are three product lines on spring cloud. I am a newer of spring cloud and want to add to my project, which product line should I use?
Take a look at the versions of dependencies towards the bottom of the Spring Cloud project page.
You'll want to use the most current version for the most part since they are all marked GA, but also make sure they are compatible with whatever else you are using in your project.
So for example if you are using Spring Boot 1.2 then go with Angel, 1.3 then Brixton, 1.4+ then Camden is probably your best bet. Even then you can always get things working by resolving dependency conflicts yourself.
If its a brand new project, just go with Camden and call it a day.

Spring Integration (not Basic Spring) support for Drools

Do we have examples or out of box support to use Spring Integration(not Basic Spring) as opposed to Camel with Drools like in link here?
What I would looking for is a way to build/set-up Decision Tables
and be able to use Spring Integration framework already existing in my application.
I have read about Spring but what I am looking for is Integration Framework support - specifically Spring-Integration as opposed to Apache Camel
Any pointers for basic set-up appreciated.
I think would be better if I move my comment to the answer to close this question:
I'd say that you should use that Drools-Camel fusion and route the result to the Spring Integration MessageChannel http://camel.apache.org/springintegration.html. Spring Integration doesn't support directly Drools and there is no plans.
The main reason - "do not reinvent the wheel".
Since Drools lives in JBOSS very well and has that Camel integration, there is no reason to find alternative solution.
Right, it's not a position of Spring Integration developer, but we just don't want to start a new holy war "Camel VS Spring Integration" :-).

Resources