Skip to content

high level event exporter & cursor helpers#46975

Merged
fspmarshall merged 1 commit intomasterfrom
fspmarshall/bulk-event-export-helper-2
Oct 7, 2024
Merged

high level event exporter & cursor helpers#46975
fspmarshall merged 1 commit intomasterfrom
fspmarshall/bulk-event-export-helper-2

Conversation

@fspmarshall
Copy link
Copy Markdown
Contributor

This PR extends work started in #46651 intended to make it easier to reliably work with the new bulk event export API in a manner that is highly performant and difficult to accidentally misuse.

Two new helper types are introduced:

  • Exporter manages exporting of events across multiple dates, sequentially progressing through the target dates and managing a "backlog" of past dates to be polled in order to account for replication delays (replication delays have recently become a hot topic since we're starting to look into supporting multi-region audit logs with failover).

  • Cursor manages saving the current state of an Exporter to disk in an efficient manner (only writing diffs), and loading that state to allow resuming an export operation from where it left off.

Both of these helpers have been manually tested against large amounts of real world audit log data containing millions of events spanning across multiple weeks.

This is part of an ongoing body of work related to #46193

@fspmarshall fspmarshall added the no-changelog Indicates that a PR does not require a changelog entry label Sep 30, 2024
@github-actions github-actions Bot added audit-log Issues related to Teleports Audit Log size/lg tctl tctl - Teleport admin tool labels Sep 30, 2024
@github-actions github-actions Bot requested review from fheinecke and zmb3 September 30, 2024 16:03
@fspmarshall fspmarshall force-pushed the fspmarshall/bulk-event-export-helper-2 branch 2 times, most recently from 99258ff to 16fb5e8 Compare September 30, 2024 16:28
Comment thread lib/events/export/cursor.go Outdated
Comment thread lib/events/export/cursor.go Outdated
Comment thread lib/events/export/cursor.go Outdated
Comment thread lib/events/export/cursor.go
Comment thread lib/events/export/cursor.go Outdated
Comment thread lib/events/export/cursor.go Outdated
Comment thread lib/events/export/cursor.go Outdated
Comment thread lib/events/export/cursor.go Outdated
Comment thread lib/events/export/cursor.go Outdated
Comment thread lib/events/export/cursor.go Outdated
@fspmarshall fspmarshall force-pushed the fspmarshall/bulk-event-export-helper-2 branch from 16fb5e8 to cddea78 Compare September 30, 2024 17:26
@fspmarshall fspmarshall requested a review from zmb3 September 30, 2024 17:36
@fspmarshall fspmarshall force-pushed the fspmarshall/bulk-event-export-helper-2 branch from cddea78 to 605397b Compare September 30, 2024 20:16
Comment thread lib/events/export/date_exporter.go
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from fheinecke October 1, 2024 13:18
@fspmarshall fspmarshall enabled auto-merge October 1, 2024 22:12
@fspmarshall fspmarshall force-pushed the fspmarshall/bulk-event-export-helper-2 branch from 626d336 to 605397b Compare October 7, 2024 22:21
@fspmarshall fspmarshall added this pull request to the merge queue Oct 7, 2024
Merged via the queue into master with commit 4cceb43 Oct 7, 2024
@fspmarshall fspmarshall deleted the fspmarshall/bulk-event-export-helper-2 branch October 7, 2024 22:56
@public-teleport-github-review-bot
Copy link
Copy Markdown

@fspmarshall See the table below for backport results.

Branch Result
branch/v14 Create PR
branch/v15 Create PR
branch/v16 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit-log Issues related to Teleports Audit Log no-changelog Indicates that a PR does not require a changelog entry size/lg tctl tctl - Teleport admin tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants