Skip to main content

Posts

Showing posts from October, 2024

Monitoring Spring WebFlux Microservices with New Relic

 In this guide, we’ll go over how to monitor a reactive Spring Boot application using WebFlux, with New Relic’s @Trace annotation for detailed transaction tracking, custom parameters, and distributed tracing for complex service chains. Prerequisites A Spring Boot WebFlux application. The New Relic Java agent configured in your application. Enable distributed tracing in newrelic.yml : distributed_tracing:   enabled: true Step 1: Instrument the Main Endpoint Our main entry point is the processRequest endpoint, which handles validation, external API calls, and data processing. Here’s how we add @Trace with dispatcher = true to make it a main transaction. @RestController public class SampleController {     private static final Logger logger = LoggerFactory.getLogger(SampleController.class);     private final SampleService sampleService;     private final WebClient webClient;     public SampleController(SampleService sampleService, WebClient...

How Encryption Happens Between Client and Server: A Step-by-Step Guide

In the modern web, securing the communication between a client (like a browser) and a server is crucial. Every time you visit a website with "HTTPS" in the URL, encryption is happening behind the scenes. But how does this encryption process actually work? In this blog, we'll break down the encryption process step by step, focusing on the TLS/SSL handshake , which is the protocol used to establish a secure connection. We'll also include a flow diagram to make it easier to understand! What is TLS/SSL? Transport Layer Security (TLS) and its predecessor Secure Sockets Layer (SSL) are protocols that provide encryption between a client and a server. They ensure that any data transmitted between the two parties remains confidential and cannot be intercepted or tampered with by third parties. Here’s how the process works: Step-by-Step: How Encryption Happens Between Client and Server 1. Client Hello The encryption process begins when the client (typically a web browser) wa...