Skip to content

Conversation

@dyl10s
Copy link
Collaborator

@dyl10s dyl10s commented Aug 18, 2025

Description

This updates the 3 different Couchbase receivers

  • General
  • GOXCDR
  • HTTP Access

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:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

@dyl10s dyl10s marked this pull request as ready for review August 18, 2025 18:30
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
Copy link
Contributor

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.

Copy link
Collaborator Author

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
Copy link
Contributor

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.

@dyl10s
Copy link
Collaborator Author

dyl10s commented Aug 26, 2025

@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]*)?`,
Copy link
Contributor

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) ?

@franciscovalentecastro
Copy link
Contributor

franciscovalentecastro commented Aug 28, 2025

There is probably another bug in the transformation_test marshall / unmarshall (goccy/goyaml library) of the output goldens or maybe a side-effect of the changes in the regex parsing. I'm going to investigate the cause.

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.

transformation_test.go:389: [13:13] block sequence entries are not allowed in this context
#47 111.7                   10 |     jsonPayload:
#47 111.7                   11 |       host: couchbase.local
#47 111.7                   12 |       message: Request took 5ms
#47 111.7                 > 13 |       user: -
#47 111.7                                    ^
#47 111.7                   14 |     labels:
#47 111.7                   15 |       compute.googleapis.com/resource_name: hostname
#47 111.7                   16 |       logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access
#47 111.7                   17 |      

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 28, 2025
@github-actions
Copy link

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot removed the Stale label Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants