Skip to content

Commit

Permalink
add monitoring to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
azdanov committed May 19, 2024
1 parent a176559 commit 0367568
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The project consists of the following services:
- `webapp`: The web application frontend for the bookstore. It communicates with the backend services through the `api-gateway` and integrates with Keycloak for OAuth2 authentication.

### Infrastructure

The project includes the following infrastructure components:

- `catalog-db`, `orders-db`, `notifications-db`: PostgreSQL databases for the respective services.
Expand All @@ -28,6 +29,9 @@ The project includes the following infrastructure components:
- `keycloak`: An OAuth2 authentication server for securing the services and web application.

### Monitoring

![Monitoring diagram](./docs/monitoring.png "Monitoring diagram")

The project incorporates monitoring tools:

- `prometheus`: A monitoring system for collecting metrics from the services.
Expand Down
Binary file added docs/monitoring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions docs/monitoring.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

Container(webapp, "Webapp", "Spring Boot", "Provides the web interface for the bookstore")
Container(api_gateway, "API Gateway", "Spring Boot", "Routes requests to the appropriate services")
Container(catalog_service, "Catalog Service", "Spring Boot", "Manages the book catalog")
Container(order_service, "Order Service", "Spring Boot", "Handles order processing")
Container(notification_service, "Notification Service", "Spring Boot", "Sends notifications related to the bookstore")

Container(prometheus, "Prometheus", "Prometheus", "Collects metrics from the services")
Container(grafana, "Grafana", "Grafana", "Visualizes metrics, logs, and traces")
Container(loki, "Loki", "Loki", "Aggregates and stores logs")
Container(promtail, "Promtail", "Promtail", "Collects and sends logs to Loki")
Container(tempo, "Tempo", "Tempo", "Collects and stores distributed traces")

Rel(webapp, prometheus, "Exposes metrics to", "Prometheus metrics endpoint")
Rel(api_gateway, prometheus, "Exposes metrics to", "Prometheus metrics endpoint")
Rel(catalog_service, prometheus, "Exposes metrics to", "Prometheus metrics endpoint")
Rel(order_service, prometheus, "Exposes metrics to", "Prometheus metrics endpoint")
Rel(notification_service, prometheus, "Exposes metrics to", "Prometheus metrics endpoint")

Rel(prometheus, grafana, "Provides metrics to", "PromQL")

Rel(webapp, promtail, "Sends logs to", "Stdout/Stderr")
Rel(api_gateway, promtail, "Sends logs to", "Stdout/Stderr")
Rel(catalog_service, promtail, "Sends logs to", "Stdout/Stderr")
Rel(order_service, promtail, "Sends logs to", "Stdout/Stderr")
Rel(notification_service, promtail, "Sends logs to", "Stdout/Stderr")

Rel(promtail, loki, "Sends logs to", "HTTP API")
Rel(loki, grafana, "Provides logs to", "LogQL")

Rel(webapp, tempo, "Sends traces to", "Zipkin protocol")
Rel(api_gateway, tempo, "Sends traces to", "Zipkin protocol")
Rel(catalog_service, tempo, "Sends traces to", "Zipkin protocol")
Rel(order_service, tempo, "Sends traces to", "Zipkin protocol")
Rel(notification_service, tempo, "Sends traces to", "Zipkin protocol")

Rel(tempo, grafana, "Provides traces to", "Tempo API")

@enduml

0 comments on commit 0367568

Please sign in to comment.