feat(ops): observabilidad con Spring Boot Actuator - #68
Merged
Conversation
- spring-boot-starter-actuator en pom.xml. - Exposición mínima por perfil: health+info en dev/default; health+info+metrics en prod (management.endpoints.web.exposure.include). - SecurityConfig: /actuator/health público (healthcheck), /actuator/** con rol ADMIN; show-details=never. - Health de Actuator sin indicador de mail en tests (no hay SMTP; el health global refleja solo la BD). - SecurityHeadersTest: /actuator/health público 200, /metrics y /info 401 anónimo. Cobertura: 76% instrucciones (gate 70%). 177 tests verdes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #61
PR Type
Summary
spring-boot-starter-actuatorpara poder diagnosticar incidentes en producción (health, info, metrics).health,infoen dev/default;health,info,metricsen prod./actuator/healthpúblico (healthcheck), el resto de/actuator/**requiere rol ADMIN.show-details=neverpara no filtrar detalles internos.Changes
pom.xmlspring-boot-starter-actuatorsrc/main/java/com/libromagico/security/SecurityConfig.java/actuator/healthpermitAll,/actuator/**hasRole ADMINsrc/main/resources/application.propertieshealth,info+show-details=neversrc/main/resources/application-prod.propertieshealth,info,metricssrc/main/resources/application-test.propertiesmanagement.health.mail.enabled=falsesrc/test/java/com/libromagico/security/SecurityHeadersTest.javaTest Plan
mvn -B -Pcoverage verify: 177 tests (174 previos + 3 nuevos), 0 fallos/api/healthcustom) sin cambiosContributor Checklist
status:approved)type:*labelCo-Authored-Bytrailers