Use WithLazy
to prevent eager serialization of the event data
#6671
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.
Found while load testing: Even with the "events" app not logging out on "DEBUG" it would still go through the pain of serializing the event data. Especially for
tls_get_certificate
that is painful.Comparison before/after:
![image](https://private-user-images.githubusercontent.com/1210641/382355489-3b1b13a9-872f-40f1-bf36-e821e5ccc2f1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NjM4MTgsIm5iZiI6MTczOTQ2MzUxOCwicGF0aCI6Ii8xMjEwNjQxLzM4MjM1NTQ4OS0zYjFiMTNhOS04NzJmLTQwZjEtYmYzNi1lODIxZTVjY2MyZjEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMTYxODM4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWEyNWIzZjNhMzI2NTFmZjQ3MzdmNGU1YTc5YWY4NTZhN2YyYzE1MTY2NzEyNjA0ZWM4MDJhMjU3ZDY4MTliOSZYLUFtei1Ta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