feat(infra): complete infrastructure layer — Spring Boot 3.5.3, Kafka, OTel/Jaeger, Prometheus, Grafana, CI/CD#1
Merged
Merged
Conversation
…el/redis/testcontainers/spotless/checkstyle
… add traceId+spanId to Log5w1h
…on.yml, add test profile with Testcontainers
…ser, HEALTHCHECK on /actuator/health
… wire OTEL_EXPORTER_OTLP_ENDPOINT
…g and payment-overview dashboard
…d full-verify (main only), add concurrency
…onal Commits format
…env.example, update .gitignore
…iagram, update README
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.
O que esse PR faz
Entrega a camada de infraestrutura completa do projeto, sem tocar em regra de negócio.
Espelha o pix-payment-core em Java com
Clean Architecture — o domínio (Charge, use cases, ports) será implementado a partir daqui.
Mudanças
Build
4.0.6(inexistente) → 3.5.3, groupIdcom.lmoraesdevspring-kafka,micrometer-registry-prometheus,micrometer-tracing-bridge-otel,opentelemetry-exporter-otlp,spring-boot-starter-data-redis(pré-instalado, sem uso), Testcontainersmaven-failsafe-plugin,spotless-maven-plugin(GJF AOSP),maven-checkstyle-pluginJava — pacote
com.lmoraesdev.payment.*dev.leandromoraes.paymentapi.gitkeep:domain.model/event,application.usecase/port.*,adapter.out.*Log5w1hagora carregatraceId+spanIdautomaticamente do MDC do Micrometer TracingConfiguração
application.properties→application.ymlcom bindings 12-factorapplication-test.ymlcomddl-auto: create-drop, Kafka/Redis health desabilitados, tracing offPaymentApiApplicationITcom@Testcontainers+@ServiceConnection(Postgres 18)Docker
maven:3.9-eclipse-temurin-21→eclipse-temurin:21-jre-alpineHEALTHCHECKem/actuator/health, cache de camada porpom.xmlCompose
:4318, UI:16686)cache— não sobe nouppadrãoOTEL_EXPORTER_OTLP_ENDPOINTinjetado no containerappObservabilidade
/actuator/prometheusuid=prometheusprovisionado + dashboard Payment — OverviewtraceId+spanIdem cada linhaCI/CD
unit-tests: Spotless + Checkstyle +./mvnw test— roda emdevelopemainfull-verify:./mvnw verify+docker build— só emmainconcurrencycomcancel-in-progressDX
Makefile:up / down / clean / logs / test / verify / format / db.env.examplena raiz,.gitignoreatualizado.githooks/pre-push(mvnw verify) e.githooks/commit-msg(Conventional Commits)Docs
docs/architecture.md: domínio, máquina de estados, fluxos de sequência, contratos de API, Kafka, Redisdocs/devops-flow.md: pipeline CI/CD + observabilidade em MermaidChecklist
./mvnw spotless:checkverde./mvnw checkstyle:checkverde (0 violações)./mvnw testverde (sem Docker)./mvnw verifyverde com Testcontainers (roda no CI full-verify)docker compose up -d --buildsobe tudo saudável