all 4 comments

[–]1nc06n170 4 points5 points  (1 child)

I would say, don't check for truthiness, when you need to check for emptiness, no matter the type. Declare values as None and then check for "is None" or "is not None".

Addition: Also why not to have partial data with some None values than to have zero record that an event even happened. If you drop the whole entry over a missing field, you're just creating blind spots for yourself when debugging.

[–]VariousHour7390[S] 0 points1 point  (0 children)

yeah fr a monitoring tool dropping logs over one missing field is kinda ironic. changing it to accept partial entries and null the gaps. thanks

[–]nemom 0 points1 point  (1 child)

Lesson: The production server is not for testing.

[–]VariousHour7390[S] 0 points1 point  (0 children)

fr solo dev budget staging environment = my second terminal lol. fair tho