WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

This Repo Contians Example About Observability Into Spring Boot With Zipkin and Store Data Into DB Into Postegres

Notifications You must be signed in to change notification settings

youssefGamalMohamed/observability-spring-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Observability in Spring Boot

This repository provides an example of implementing observability in a Spring Boot application. Observability enables monitoring and understanding the internal state of a system by collecting and analyzing logs, metrics, and traces.

Features

  • Spring Boot Application: Demonstrates observability practices within a Spring Boot framework.
  • Docker Compose Integration: Orchestrates services, including the application and observability tools, using Docker Compose.
  • PostgreSQL Database: Integrates with a PostgreSQL database for data persistence.
  • Zipkin for Distributed Tracing: Implements Zipkin to collect and visualize trace data, aiding in performance monitoring and troubleshooting.
  • MapStruct for Object Mapping: Utilizes MapStruct for efficient and type-safe object mapping between DTOs and entities.
  • Spring Security: Secures application endpoints using Spring Security.
  • Swagger/OpenAPI Documentation: Provides interactive API documentation with Swagger UI.

Prerequisites

Ensure you have the following installed:

Getting Started

Clone the Repository

git clone https://github.com/youssefGamalMohamed/observability-spring-boot.git
cd observability-spring-boot

Build the Application

./mvnw clean install

Start Services with Docker Compose

docker-compose up

This command will start the Spring Boot application, PostgreSQL database, and Zipkin for tracing.

Access the Application

  • Application Endpoint: http://localhost:8080
  • Swagger UI: http://localhost:8080/swagger-ui.html
  • Zipkin Dashboard: http://localhost:9411

Observability Components

  • Metrics: Exposed via Spring Boot Actuator at http://localhost:8080/actuator/metrics.
  • Health Checks: Available at http://localhost:8080/actuator/health.
  • Distributed Tracing: Visualize traces using the Zipkin dashboard at http://localhost:9411.

Security

The application uses Spring Security to protect endpoints. Configure security settings in the application.yml file.

API Documentation

Interactive API documentation is available through Swagger UI at http://localhost:8080/swagger-ui.html.

Additional Resources

For further reading on observability in Spring Boot, consider exploring the following resources:

About

This Repo Contians Example About Observability Into Spring Boot With Zipkin and Store Data Into DB Into Postegres

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages