https://github.com/jmix-framework/jmix-observability-logging-sample
https://github.com/jmix-framework/jmix-observability-logging-sample
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jmix-framework/jmix-observability-logging-sample
- Owner: jmix-framework
- Created: 2025-04-19T08:59:24.000Z (11 months ago)
- Default Branch: release_2_5
- Last Pushed: 2025-06-17T14:33:12.000Z (9 months ago)
- Last Synced: 2025-06-17T15:41:49.309Z (9 months ago)
- Language: Java
- Size: 7.18 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jmix Observability Logging Sample
This project is part of the **Jmix Observability Guide Series** and demonstrates how to integrate centralized logging across multiple Jmix applications.
The goal of the guide series is to showcase how Jmix applications can be monitored, traced, and analyzed using modern, open-source observability tooling. This includes the use of OpenTelemetry as the standard telemetry transport protocol and the Grafana stack (Grafana, Loki) as the target platform.
In this example, we use two Jmix applications – the Petclinic backend and the Petclinic Portal frontend – which interact with each other and produce structured log output. The log data is centrally collected using OpenTelemetry and visualized in Grafana.
Learn more in the full guide: [Observability: Centralized Logging](https://docs.jmix.io/jmix/observability-logging-guide).
---
## Build the JAR Files
Before starting the applications using Docker Compose, you need to build the JAR files.
### Build petclinic (backend)
```bash
./gradlew -Pvaadin.productionMode=true --include-build jmix-petclinic-2 :jmix-petclinic-2:clean :jmix-petclinic-2:bootJar -x test --no-build-cache
```
### Build petclinic-portal (frontend)
```bash
./gradlew -Pvaadin.productionMode=true --include-build jmix-petclinic-portal :jmix-petclinic-portal:clean :jmix-petclinic-portal:bootJar -x test --no-build-cache
```
Once the JARs are built, Docker Compose will pick them up and copy them into the containers using the provided Dockerfiles.
## Start the Applications
To run both applications along with the observability stack (PostgreSQL, Loki, Grafana, etc.), use the provided Docker Compose configuration:
```bash
docker compose -f docker/docker-compose.yaml up --build -d
```
To stop all applications use the following command:
```bash
docker compose -f docker/docker-compose.yaml down
```