Posts

Spring Boot, Google Cloud Key Management Service (KMS) - Encryption Decryption Example

Image
In this section,  we will learn  how to use the Spring Boot on Google Cloud Key Management Service (KMS) integration and how to encrypt and decrypt data using symmetric Cloud KMS keys. Cloud Key Management Service (Cloud KMS) allows you to create, import, and manage cryptographic keys and perform cryptographic operations in a single centralized cloud service. You can use these keys and perform these operations by using Cloud KMS directly, by using Cloud HSM or Cloud External Key Manager, or by using Customer-Managed Encryption Keys (CMEK) integrations within other Google Cloud services. More Info - click here Let's begin, 1. Create a GCP Project First, Sign into the Google console at  https://console.cloud.google.com . You can create a new project by first selecting the project dropdown in the top left and selecting " New Project ". Next, specify your GCP  Project name  and  Project ID . Then  Click on the " CREATE " button. Copy " Project ID " and ke

Spring Boot 3, Google Cloud Trace - Distributed tracing example

Image
In this section, we will  create 2 simple services  ( customer  &  product ) and add distributed tracing with  Micrometer Tracing , and use  Spring Cloud GCP  to forward the trace information to  Google Cloud Trace . Distributed tracing , also known as  distributed request tracing , is a method of  monitoring  and  observing  service requests in applications built on a  microservices architecture . When we have chained service to service calls, from  customer  to  product , it's important to understand that the calls were successful and also the latency at every step. Starting from  Spring Boot 3 , the old Spring Cloud Sleuth solution for tracing in Spring Boot is replaced with the new Micrometer Tracing library. Google Cloud Platform  has  Cloud Trace , which is a managed service that allows us to store trace data. In this example we will use  Spring Cloud GCP Trace , which smoothly integrates with  Micrometer Tracing  and forwards the trace data directly to  Google Cloud Tr