Is there any "length limitation" in parse_json function? #8306
-
Hello, I have a question regarding the message size and parse_json function. First, I am trying to send log message as a json format, with exception field which contains whole stacktraces emitted by spring boot project. I found strange things when I worked with transform with rvl. This my configurations: [sources.generate_syslog]
type = "stdin"
[transforms.remap_syslog]
inputs = [ "generate_syslog"]
type = "remap"
source = '''
¦ structured = parse_json!(.message)
¦ ., err = merge(., structured)
'''
[sinks.emit_syslog]
inputs = ["remap_syslog"]
type = "console"
encoding.codec = "json" I think there's no special things to check. The weird part is this. If the message size is larger than "4095" bytes, then vector says like this:
I tried with this message:
If I delete 1 character in any string, then I is accepted with vector. It seems that there may be some limit with size of input message, right? My question is:
I tried to search and find regarding this issue but no result. 😢 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
So the limit here is actually in the terminal. When you paste a line with a length > 4096 the tty will truncate the string, so Vector never actually gets the full string. There is no limit, beyond available RAM, to the length of string that You should find the transform parses correctly if you save the json to a file and pipe that to Vector:
|
Beta Was this translation helpful? Give feedback.
So the limit here is actually in the terminal. When you paste a line with a length > 4096 the tty will truncate the string, so Vector never actually gets the full string.
There is no limit, beyond available RAM, to the length of string that
parse_json
can parse.You should find the transform parses correctly if you save the json to a file and pipe that to Vector: