How to integrate splunk with spring cloud sleuth in Spring Boot project? - spring-boot

we are developing microservices using spring boot. we want to track the progress of microservices using Spring Cloud Sleuth and wants to show that logs using Splunk on some dashboard etc.
For demo purpose we have are building three services, Service A calls service B which in turns call Service C. we want to trace their calls using slueth and consolidate them in splunk.
how to implement distributed tracing with Sleuth and Splunk?
any help would be greatly appreciated.

Related

Spring Boot 3 Micrometer Tracing Example

If I understand the answer to this question correctly, Spring Cloud Sleuth will be replaced by Micormeter Tracing with Spring Boot 3. My experiments with Spring Boot 3 milestone 3 to implement tracing have failed so far. Is there an example project somewhere that I can use to guide me.
BTW: Here are my experiments https://github.com/stse/spring-boot-otel. I try to use micrometer tracing and open telemetry to push traces to new relic via Otlp and Grpc.
This blogpost from Spring Team will help to set it up: https://spring.io/blog/2022/10/12/observability-with-spring-boot-3
Also, I have come up with a sample Spring Boot 3 + Micrometer project here - https://github.com/kishorek/java/tree/main/spring-observability-demo.
I am using Zipkin Brave as distributed tracing implementation. I have created a python service consumed by the Spring boot service. Please refer to the README.

Can Spring Cloud Stream work with Spring Cloud Kubernetes?

I haven't seen any example of combining the two, even though it makes sense they'll work together (because of being both subprojects of Spring Cloud). I want to use Spring Cloud Stream (Reactive Processing) for reading from Kafka and writing to MongoDB with the Reactive Mongo driver. Can I use Spring Cloud Config and Spring Cloud Kubernetes for a remote git configuration server, even though the application is an event-driven application and not a requests-based API?
It's pretty unclear how to plug these Kubernetes and config projects into Spring Cloud Stream, and in general, it's unclear to me if all of the other Spring Cloud projects can work with Spring Cloud Stream reactively. For instance, I couldn't also find a reference for using Spring Cloud Sleuth & Zipkin with Spring Cloud Stream. Can someone make it clearer for me and reference code examples if exists?

Using Spring Cloud Data Flow with Azure Service Bus

I am trying to find some examples of Spring Cloud Data Flow and Azure Service Bus setup. .
I have found https://github.com/microsoft/spring-cloud-azure/tree/master/spring-cloud-azure-stream-binder/spring-cloud-azure-servicebus-topic-stream-binder but it is still in RC and I do not see any examples (which cover Spring Cloud Data Flow) there.
Could you please help me to understand if I can use Spring Cloud Data Flow and Azure Service Bus together?
I was able to run examples with Kafka and RabbitMQ, but I cannot find anything about Azure Service Bus that can be used as the integration solution for Spring Cloud Data Flow
Spring Cloud Data Flow doesn't necessarily need to know what messaging layer you choose to run your applications on. Hence, your question is more likely related to how one can run the application with Azure Service Bus using Spring Cloud Stream.
This is one such a sample: https://learn.microsoft.com/en-us/java/azure/spring-framework/configure-spring-cloud-stream-binder-java-app-azure-event-hub?view=azure-java-stable
Once the application is built using Spring Cloud Stream (using the Azure event hub binder), you can then manage these applications using Spring Cloud Data Flow as Streaming applications.

Spring Cloud Data Flow - can it be used without spring boot?

Can Spring Cloud Data Flow be used in Spring5 applications - NOT Spring Boot - my current employer seems to view Spring Boot applications as insecure (I've no idea why) in anyway I'd like to try use this stack for an integration project, so is it possible to use it without Spring Boot?
With Spring Cloud Data Flow you can deploy streams, tasks and batches.
This is all based on Spring, Spring Cloud and Spring Boot. Spring Boot is nothing else as a preconfigured Spring stack.
Spring Data Flow is a runitme that usually needs a cloud infrastructure like Kubernets.
I'm not sure if you really are looking for that or more for something like https://spring.io/projects/spring-integration

Spring Boot Java8 Microservice Simple Message Subscription service

I am new to Microservice and JMS likes to know how can I
create a subscription
read the subscription
Using Spring Boot and JMS
To get started with Spring Boot and JMS use this getting started guide https://spring.io/guides/gs/messaging-jms/
Once you have that sorted then adding the microservices is just a matter of adding the Spring MVC and Rest components which you could first experiment as a standalone project and then integrate with the JMS application.
To get started with Spring Book and Microservices use the getting started guide https://spring.io/guides/gs/rest-service/
JMS not part of Java SE. You need Java EE or Spring.
I'm not sure queues are the best way to solve the problem.
I'd recommend Spring Boot.
Subscription maintenance isn't something that the queue would do.
A simple REST service would manage this nicely. You'll need a persistence layer to save subscription information.

Resources