Skip to content

Conversation

@vsai12
Copy link
Contributor

@vsai12 vsai12 commented Oct 29, 2025

Part 1 of 6 for Audit Logs to Stdout feature (v3.15)

Adds foundational proto fields and store methods for gap-free audit log sequences, enabling stdout streaming with deduplication and gap detection in downstream log aggregators.

Changes:

  • Add instance_id and sequence_number fields to AuditLog proto
  • Implement instance ID generation with collision detection (audit/instance.go)
  • Add store methods: GetMaxAuditSequence(), CheckInstanceIDExists()
  • Integration test verifying legacy logs (NULL sequences) coexist with new logs

Key Details:

  • New audit logs will get sequences (1, 2, 3...) - assigned in PR # 2
  • Old logs remain queryable with NULL sequences (100% backward compatible)
  • No schema migrations or backfill required
  • Instance ID persists across restarts (hostname/env-based)

Testing:

  • Unit tests pass with race detector
  • golangci-lint clean
  • Integration test validates legacy/new log coexistence

Next: PR # 2 will implement Logger with sequencer goroutine for stdout streaming

@cla-bot cla-bot bot added the cla-signed label Oct 29, 2025
@github-actions
Copy link

github-actions bot commented Oct 29, 2025

The latest Buf updates on your PR. Results from workflow Proto linter / lint-protos (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed⏩ skippedOct 29, 2025, 9:02 AM

Copy link
Member

@h3n4l h3n4l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vsai12 vsai12 enabled auto-merge (squash) October 29, 2025 10:47
@vsai12 vsai12 disabled auto-merge October 29, 2025 10:48
@vsai12 vsai12 marked this pull request as draft October 30, 2025 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants