PR3/15: pic-sure-spring-commons shared library#262
Conversation
* Refactor LoggingClient to use Sender interface * Refactor LoggingClient to use config in JdkHttpSender * Add Sender interface for logging functionality * Implement JdkHttpSender for asynchronous HTTP requests * Add NoOpSender class for logging * Refactor LoggingClientTest for clarity and safety * Refactor test method signatures for consistency
* add package wf * Format * Add wf files Update README.md
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ort, pre-v1v3 state)
afafdec to
8f3d502
Compare
9ee2d71 to
6bae834
Compare
| * merges it into the emitted logging event's metadata. No-arg-constructable so callers can scope one instance per request without a DI | ||
| * container (e.g. a request-scoped Spring bean, or plain {@code new} in a filter chain). | ||
| */ | ||
| public class AuditContext { |
There was a problem hiding this comment.
Why is the audit stuff in pic-sure-spring-commons?
There was a problem hiding this comment.
Because the AuditLoggingFilter extends OncePerRequestFilter which is a springframework abstract class. Due to this I put all of it in the spring commons lib.
There was a problem hiding this comment.
Nit pick, and would be tech debt but maybe that LoggingFilter goes in the logging lib and everything else in common? IDK not important. I know it can be very hard to untangle this stuff
There was a problem hiding this comment.
Actually, I'd push back on this request. It would make the dependency graph worse. It would break a cohesive package across artifacts with no real gain. The only consumer of this package is currently the gateway and its a spring project.
There was a problem hiding this comment.
That's fair. I was thinking that this was used across projects but it's not
Shared Spring lib:
PicsureException, audit base +AuditLoggingFilter,GatewayUseridentity,RequestIdFilter, actuator-security helper. Depends on logging-client + api-model. 34 tests.📚 Stacked PR series (1–7) — part of decomposing the
pic_sure_api_rewritemonorepo rewrite into sequential, independently-green PRs. Review and merge bottom-up (this PR's base is the PR below it; GitHub auto-retargets tomainas each merges). Every PR builds + tests green on its own under JDK 25.