-
Notifications
You must be signed in to change notification settings - Fork 80
feat: Update Couchbase parsers to use LoggingReceiverMacro
#2043
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
base: master
Are you sure you want to change the base?
feat: Update Couchbase parsers to use LoggingReceiverMacro
#2043
Conversation
| Continuation line giving rebalance details | ||
| Still continuing additional rebalance logs with memory usage stats... | ||
| [ns_server:info,2025-08-18T09:17:30.333Z,[email protected]:0000:cluster_manager]Node '[email protected]' added to cluster | ||
| [ns_server:error,2025-08-18T09:18:00.741Z,[email protected]:0000:ssl_certificate]SSL handshake failed: certificate expired |
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.
Please add a multiline log entry so we can test the "multiline parsing" functionality of this processor.
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.
For both cases here I there are multiline entries and they seem to not be parsing. I kept them the same as they were previously and the regex looks like it matches. Do you see what the issue could be here?
| 2025-08-18T14:27:22.345Z ERROR Router: Failed to route mutation for key "user:12345", retrying... | ||
| Additional detail: document size exceeded configured threshold | ||
| 2025-08-18T14:27:45.657Z DEBUG BackfillManager: Backfill task created for vbucket 102 | ||
| 2025-08-18T14:28:00.998Z INFO PipelineManager: Replication pipeline stopped successfully |
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.
Please add a multiline log entry so we can test the "multiline parsing" functionality of this processor.
|
@franciscovalentecastro I updated the regex here to be able to correctly capture multiple lines. I have not had to do this in the past but it seemed to be a bug with the original regex. |
| Parsers: []confgenerator.RegexParser{ | ||
| { | ||
| Regex: `^\[(?<type>[^:]*):(?<level>[^,]*),(?<timestamp>\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?<node_name>[^:]*):([^:]+):(?<source>[^\]]+)\](?<message>.*)$`, | ||
| Regex: `^\[(?<type>[^:]*):(?<level>[^,]*),(?<timestamp>\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?<node_name>[^:]*):([^:]+):(?<source>[^\]]+)\](?<message>[\s|\S]*)?`, |
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.
Re @dyl10s :
What is the reason that [\s|\S] fixes the regex for multiline parsing ? Is this specific thing for couchbase logs (e.g. trailing whitespace) ?
|
There is probably another bug in the My direct understanding of the failure is that "-" is the actual that is output by the processor for the field "user", but in YAML "-" could mean a blocksequence. |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Description
This updates the 3 different Couchbase receivers
Had to do a little bit of additional renaming here but for the most part these were all straight forward.
Related issue
How has this been tested?
Followed flow of generating golden files and checking for consistency
Checklist: