-
Notifications
You must be signed in to change notification settings - Fork 189
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
Protobuf access logs #1069
Merged
Merged
Protobuf access logs #1069
Conversation
This file contains 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
Keksoj
force-pushed
the
binary-access-logs
branch
from
February 2, 2024 19:37
c0bcf38
to
1aad340
Compare
Keksoj
force-pushed
the
binary-access-logs
branch
4 times, most recently
from
February 5, 2024 17:11
103abc3
to
42c9313
Compare
@FlorentinDUBOIS should we rather have "binary" or "protobuf" as a configurable option, and for types ? We may introduce other binary types in the future, so we can disambiguate right now. |
Keksoj
force-pushed
the
binary-access-logs
branch
2 times, most recently
from
February 6, 2024 09:22
a66f026
to
ca64cae
Compare
Wonshtrum
force-pushed
the
binary-access-logs
branch
6 times, most recently
from
February 8, 2024 17:02
1dbc3c9
to
a75010c
Compare
Keksoj
force-pushed
the
binary-access-logs
branch
2 times, most recently
from
February 9, 2024 16:53
7122d3c
to
8378aa2
Compare
FlorentinDUBOIS
approved these changes
Feb 14, 2024
Keksoj
force-pushed
the
binary-access-logs
branch
from
February 14, 2024 09:53
8378aa2
to
367c6d5
Compare
FlorentinDUBOIS
approved these changes
Feb 14, 2024
Keksoj
force-pushed
the
binary-access-logs
branch
from
February 15, 2024 15:26
d3b187b
to
3e5f4c7
Compare
I have some todos left:
|
Wonshtrum
force-pushed
the
binary-access-logs
branch
2 times, most recently
from
February 21, 2024 15:37
35c7aca
to
0ca4d2a
Compare
Keksoj
force-pushed
the
binary-access-logs
branch
2 times, most recently
from
March 1, 2024 16:23
a9d4c3b
to
653220b
Compare
This is ready for review and mergeable in our opinion. |
FlorentinDUBOIS
requested changes
Mar 4, 2024
configuration: - create configurable log_access_format: ascii or binary new types: - create protobuf type BinaryAccessLog, with subtypes - replace lib::logs::Endpoint with proto::command::BinaryEndpoint - use fixed32 for ipv4 addresses refactor: - remove log module in sozu_lib - isolate SessionMetrics::register_end_of_session transfer types to sozu_command_lib::logging: - CachedTags - RequestRecord - LogDuration - LogContext avoid allocation: - create unsafe trait DuplicateOwnership to display access logs - intermediate buffer in the logger Rewrite log macros: - remove separate TAG RefCell - move log backends and directives to InnerLogger - allow borrow of Logger::tag and Logger::inner simultaneously - check for Logger::enabled as soon as possible - deduplicate log macros with/without arguments - use scoped macro names instead of the alphabetic list Co-Authored-By: Eloi DEMOLIS <[email protected]>
- Refactor the Logger with the new more powerful macro prompt_log - Explicitely take ownership of RequestRecord fields in access log macros, the user can decide the best way to pass them - Add logger specific fields in the RequestRecord - Add basic colors to logs and access logs, configurable in the condig, checked at runtime - Cache the Logger::enabled result at call site Signed-off-by: Eloi DEMOLIS <[email protected]>
Signed-off-by: Eloi DEMOLIS <[email protected]>
- Handle Logging command at worker level (not proxy) - parse_logging_spec returns a vec of parsing errors - Logging command takes a string for logging_filter instead of LogLevel - Logging command fails uppon any errors of parse_logging_spec - Logger::init ignores parse_logging_spec errors - Reorganise some code handling commands - Generate access log on abrupt client deconnection Signed-off-by: Eloi DEMOLIS <[email protected]>
apply clippy suggestions
the point is to use a structure instead of a text, for an easier parsing of the access log of the access logss
Signed-off-by: Eloi DEMOLIS <[email protected]>
Signed-off-by: Eloi DEMOLIS <[email protected]>
Co-Authored-By: Eloi DEMOLIS <[email protected]>
Co-Authored-By: Eloi DEMOLIS <[email protected]>
Co-Authored-By: Eloi DEMOLIS <[email protected]>
Keksoj
force-pushed
the
binary-access-logs
branch
from
March 11, 2024 16:42
bb80fdf
to
618bed0
Compare
FlorentinDUBOIS
approved these changes
Mar 11, 2024
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.
Adding the option to produce access logs in a binary format will be highly beneficial for performance and parseability.
This PR creates a binary type BinaryAccessLog using protobuf, that are emitted with a delimiter for easier parsing.