Monitoring & Logs

Metrics

The service includes:

  • Spring Boot Actuator (spring-boot-starter-actuator)

  • Prometheus registry (micrometer-registry-prometheus runtime dependency)

Endpoints (under context path):

  • /configs-service/actuator/health

  • /configs-service/actuator/metrics

  • /configs-service/actuator/prometheus

Logging

The service uses a custom logback-spring.xml configuration (in src/main/resources/).

Console output

All profiles get console output with a custom pattern that includes the MDC requestId field:

2026-03-19T14:30:15.123  INFO 1 --- [http-nio-8080-exec-1] [abc-123-def] c.f.f.angular.tabs.service.TabService    : Tabs loaded for device model X

File appender

Profiles mysql and oracle also write to a rolling file:

Path

${LOG_PATH:-logs}/application.log (in Docker: /app/logs/application.log)

Rotation

Daily

Compression

gzip (.log.gz)

Retention

30 days

Size cap

2 GB total

Log levels

Default log levels:

Logger Level

root

INFO

com.friendly.ftconfigsservice

DEBUG

Override at runtime via environment variables:

LOGGING_LEVEL_COM_FRIENDLY_FTCONFIGSSERVICE=INFO
LOGGING_LEVEL_ROOT=WARN

These variables are already defined in docker/.env.mysql and docker/.env.oracle.

Request correlation

AuditRequestContextFilter reads the X-Request-Id header (generates a UUID when missing) and:

  1. Stores it in AuditRequestContextHolder for audit records (audit_log.request_id).

  2. Sets MDC.put("requestId", …​) so every log line within the request includes the ID.

  3. Cleans up both on request completion.

This allows correlating log lines across a single request and tracing them back to audit records.

requestId is empty for non-HTTP threads (e.g., @Scheduled tasks, async executors).