-
Notifications
You must be signed in to change notification settings - Fork 50
feat(audit): add UserOp archiver to connect Kafka reader to S3 storage #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Add KafkaUserOpAuditArchiver struct - Implements read → write → commit loop for UserOp events - Add integration test (ignored due to MinIO etag limitation)
crates/audit/src/archiver.rs
Outdated
| .unwrap_or_default() | ||
| .as_millis() as i64; | ||
| let event_age_ms = now_ms.saturating_sub(event.timestamp); | ||
| self.metrics.event_age.record(event_age_ms as f64); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT of having the audit metrics separated by tags?
Similar to how we record metrics for RPC calls here: https://github.com/base/tips/blob/master/crates/ingress-rpc/src/metrics.rs#L5-L8 , and instead we can call it type (or a better name 😅)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hope you had a great Christmas William. I added a type tag ("bundle" / "userop")
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Generic struct over
UserOpEventReaderandUserOpEventWritertraitsRuns an infinite loop that:
End-to-End Integration Tests (
integration_tests.rs)Added 7 end-to-end tests using Docker (Kafka + MinIO) covering single events, multiple events, deduplication, all event types, and full lifecycle.