-
Notifications
You must be signed in to change notification settings - Fork 4
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
Custom sink for handling large audit events #15
Custom sink for handling large audit events #15
Conversation
…o both eventhub and blob destinations
…he purpose of conditional logging
You have to update appveyor in order to fix build problems, see https://ci.appveyor.com/project/kmdlogic/kmd-logic-audit-client/builds/35867841 |
We need to manually install the dotnet sdk 3.1.100 by script and referencing it in the yml file. Please see this link appveyor/ci#3234 |
...it.Client.SerilogLargeAuditEvents/SerilogLargeAuditEventClientBlobConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
...it.Client.SerilogLargeAuditEvents/SerilogLargeAuditEventClientBlobConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AuditEventPayload.cs
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobOrEventHubSink.cs
Outdated
Show resolved
Hide resolved
...udit.Client.AzureBlobOrEventHubSink/AzureEventhubServiceHelper/AzureEventhubServiceHelper.cs
Outdated
Show resolved
Hide resolved
...c.Audit.Client.AzureBlobOrEventHubSink/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink.csproj
Outdated
Show resolved
Hide resolved
...gic.Audit.Client.AzureBlobOrEventHubSink/LoggerConfigurationAzureBlobOrEventHubExtensions.cs
Outdated
Show resolved
Hide resolved
...c.Audit.Client.SerilogLargeAuditEvents/Kmd.Logic.Audit.Client.SerilogLargeAuditEvents.csproj
Outdated
Show resolved
Hide resolved
....Audit.Client.SerilogLargeAuditEvents/SerilogLargeAuditEventClientConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
sample/Kmd.Logic.Audit.Client.AspnetCoreSample/Kmd.Logic.Audit.Client.AspnetCoreSample.csproj
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.SerilogLargeAuditEvents/SerilogLargeAuditEventClientConfiguration.cs
Outdated
Show resolved
Hide resolved
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.
Why I have to review my changes in this PR? Something goes wrong in terms of merging. Please prepare this PR with changes that are made by you only.
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobOrEventHubCustomSink.cs
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobOrEventHubCustomSink.cs
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobOrEventHubCustomSink.cs
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobOrEventHubCustomSink.cs
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobOrEventHubCustomSink.cs
Outdated
Show resolved
Hide resolved
...ic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobServiceProvider/AzureBlobServiceProvider.cs
Outdated
Show resolved
Hide resolved
...ic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobServiceProvider/AzureBlobServiceProvider.cs
Outdated
Show resolved
Hide resolved
...ic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobServiceProvider/AzureBlobServiceProvider.cs
Outdated
Show resolved
Hide resolved
...ic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobServiceProvider/AzureBlobServiceProvider.cs
Outdated
Show resolved
Hide resolved
...c.Audit.Client.SerilogLargeAuditEvents/Kmd.Logic.Audit.Client.SerilogLargeAuditEvents.csproj
Outdated
Show resolved
Hide resolved
This PR is based on the merge from a forked repository i.e. |
@thecorrado We have merged the branch |
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AuditEventPayload.cs
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobServiceHelper.cs
Show resolved
Hide resolved
LGTM |
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.
I left some minor comments
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobOrEventHubCustomSink.cs
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobOrEventHubCustomSink.cs
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureBlobOrEventHubCustomSink.cs
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.AzureBlobOrEventHubSink/AzureEventHubServiceHelper.cs
Outdated
Show resolved
Hide resolved
src/Kmd.Logic.Audit.Client.SerilogLargeAuditEvents/SerilogLargeAuditEventClient.cs
Show resolved
Hide resolved
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.
LGTM
* Custom sink for handling large audit events (#15) * added structure for the additional serilog sink for blob and eventhub * added addition blob storage serilog sink. now audit events would go to both eventhub and blob destinations * Separate extension logger methods created for blob and eventhub for the purpose of conditional logging * Adding custom sink * adding blob upload * upload blob with name as event id * Renaming project * restructured the folders * adding event hub upload * Adding message check * upgrade image to chcek if build is passing * reverting the image upgrade as build failed * configurable event size limit and renaming variables * removing unwanted files * changing variable name * audit client * pr comments * pr comments * pr comments * pr comments * library updated * fixing appveyor build issues * code fix for build failure * pr review comments * removing blob name from class variable * pr comments * renaming blob name * removing unused package reference * remove unwanted interfaces * refactoring * pr comments * renaming variable * added extension method accepting blob client * pr comments * pr comments Co-authored-by: Avin Mathew (UYW) <UYW@kmd.dk> Co-authored-by: Satyajit <YYW@kmd.dk> * Upgrading version * version number change as per norms. This is a minor release hence changing minor version number. * version details added Co-authored-by: smahapatra86 <YYW@kmd.dk> Co-authored-by: Avin Mathew (UYW) <UYW@kmd.dk>
As part of handling large audit events, we have created a custom sink which will check the message size.
If the message size is greater than 256 KB it will first push it to a azure blob, get the blob url and push message to event hub with the blob url.
If message size is less than 256 KB it will be usual flow. It will directly push to event hub.
We have created a client to use this custom sink. End users will be using this client.