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
No logs with reduce + starts_with #20452
Comments
Hi @beliys , I think your reduce condition is not quite right. What you have:
Would cause it to start merging the line after the one you actually want to start merging (that is it would start on the line that starts with a space). Instead, I think you likely want to
This will cause the |
Hi, @jszwedko ,
only
are in the log. Maybe I chose the wrong function, but I would like a complete multi-line log in 1 record. |
Hmm, can you share the new |
|
@beliys Ah I think I see the issue: your logs will all be intermixed. |
@jszwedko, thanks a lot. It works now. But now I don't really like the hard code of the beginning of the line. Is it possible to get rid of the fact that the term always does not start with a space? |
I'm not sure I understand. Do you mean check if the line starts with a space instead? You could do that with something like:
|
Thanks, looks like what's needed, but I'm getting an error:
|
That error seems to be coming from somewhere other than Vector 🤔 . |
yes, it's a yaml validator inside helm |
Maybe you need to quote it then? |
Many thanks. Everything works as expected. I'm happy) |
A note for the community
No response
Problem
Hello, guys! I need help to understand what I am doing wrong.
I have the following logs:
With this config, everything works, but for log type
4 separate logs are created instead of one.
I wanted to make the beginning of the message be any string that does not start with a space.
Here's my attempt to do it with
reduce
+starts_with
:But the logs stop gathering and I see the following error in the logs:
Any help would be appreciated.
Configuration
No response
Version
vector 0.37.1 (x86_64-unknown-linux-gnu cb6635a 2024-04-09 13:45:06.561412437)
Debug Output
No response
Example Data
Info;myservice-6.40.268-dev-1-1565;<10000121289>;network.Connection.~Connection;23360962488064;Connection has been destroyed (create_count=121291, destroy_count=121290, connections_count=1)
Debug;myservice-6.40.268-dev-1-1565;;data.DB.Update;23360985601792;query: [
UPDATE mytable SET myfield1 = 0,myfield2 = 0, myfield3 = true
WHERE id=3416;
]
Info;myservice-6.40.268-dev-1-1565;;myMgr::Update;23360987703040;Send myData take: 0ms
Debug;myservice-6.40.268-dev-1-1565;;data.DB.Update;23360985601792;query: [
UPDATE mytable SET myfield1 = 0,myfield2 = 0, myfield3 = true
WHERE id=3416;
]
Info;myservice-6.40.268-dev-1-1565;;myMgr::Update;23360987703040;Prepare data for saving myData: 0ms
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: