feat: #515 Enable stored procedures by default for audit logging#588
Merged
Conversation
Co-authored-by: ascott18 <5017521+ascott18@users.noreply.github.com>
Co-authored-by: ascott18 <5017521+ascott18@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] audit logs: Add option to automatically create audit log insert script as stored procedure
feat: Add stored procedure support for audit logging
Aug 10, 2025
Collaborator
|
…ontent verification Co-authored-by: ascott18 <5017521+ascott18@users.noreply.github.com>
Contributor
Author
I've addressed all the feedback points in commit 2734ce5:
Also updated tests to explicitly disable stored procedures for raw SQL tests and updated documentation to reflect the new default behavior. |
Copilot
AI
changed the title
feat: Add stored procedure support for audit logging
feat: Enable stored procedures by default for audit logging
Aug 10, 2025
Collaborator
|
@copilot can you check your instructions file? You missed something. I'm not going to tell you what it is because I'm not sure you read the instructions file at all |
Co-authored-by: ascott18 <5017521+ascott18@users.noreply.github.com>
Contributor
Author
You're absolutely right - I missed updating the CHANGELOG.md file as required by the instructions. I've added an entry for the stored procedure audit logging feature in commit 2852bec. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds stored procedure support for audit logging and enables it by default for SQL Server databases, providing better performance and easier monitoring/troubleshooting.
What's New
Stored procedures are now enabled by default for SQL Server audit logging. When enabled, the audit log merge SQL is automatically wrapped in a stored procedure with a hash-based name like
CoalesceAuditMerge_A1B2C3D4. The 8-character suffix is derived from the SQL content, ensuring different application versions with different audit schemas get their own procedures without conflicts.Usage
Stored procedures are enabled by default:
Benefits
Implementation Details
Testing
Added comprehensive tests covering:
Fixes #515.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.