feat(core): process finalized audit emissions - #3817
Conversation
Add instance-scoped audit processors with explicit zero, one, or many emission semantics. Fall back to the unchanged default record on processor errors, panics, or invalid output, and propagate the processor through startup and namespace logger construction.\n\nRefs: PEP-5181 Signed-off-by: strantalis <strantalis@virtru.com>
|
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: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
|
Proposed Changes
Drop), one, or ordered many slog emissions for downstream partitioningserver.WithAuditProcessorand retain it across scoped and namespace-rebuilt loggersThis is PR 2 of 2 for PEP-5181 and is based on PR #3816.
Design and compatibility
level:"AUDIT",msg:<verb>, andaudit:{...}messageattribute without importing downstream models upstreamChecklist
Testing Instructions
cd service && go test -race ./logger/audit ./pkg/config ./pkg/server ./internal/servercd service && golangci-lint run --new-from-rev=origin/main ./logger/audit/... ./logger/... ./pkg/server/...cd sdk && go test -run TestREADMECodeBlocksgit diff --check origin/main...HEADRepository-wide
make lintis blocked locally by an invalid Buf API token. Repository-widemake testreaches environment-dependent Keycloak/Docker suites that are unavailable locally; the focused race suites above pass.