feat: add support to push processor to the bottom of the stack #1976
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.
It was painful to add a processor to the bottom of the stack since we need to first pop all the processors then push it and popped processors back leading to O(N).
I believe it's just better to provide support for adding a processor to the bottom of the stack in just O(1).
Usecase: Let's say we have a processor which masks sensitive fields from the log record and it just makes sense to mask the details at the end after going through all previous processors, if we don't do it this way then the latter processors could add sensitive fields which won't be masked in that case.
Let me know any suggestions for improvements.
@Seldaek Also I believe we should dockerize the development environment, I'd like to work on the same too.