top | item 43100325

(no title)

Squonk42 | 1 year ago

Parsing JSON is a Minefield: https://seriot.ch/projects/parsing_json.html

discuss

order

cduzz|1 year ago

Hilariously lots of "logging" (lucene based) tools explicitly require storing JSON docs and fall over if the schema's not quite right[1].

I regularly deal with situations where devs "log" by sending "json" to stdout of their container runtime, then expect the downstream infrastructure to magic structure into it perfectly. "You understand something has to parse that stream of bytes you're sending to find all the matching quotes and curly braces and stuff, right? What happens if one process in the container's emitting a huge log event and something else in the container decides to report that it's doing some memory stuff?" <blank stare> "I expect you'd log the error and open an incident?"

(the correct answer is to just collect the garbage strings in json (ha) and give them unparsed crap for them to deal with themselves, but then "we're devs deving; we don't want to waste energy on operations toil"

Later people ask "why's logging so expensive?"

Sigh.

[1] opensearch / elasticsearch, obvs

[2] https://12factor.net/logs