Zero value being stored as null

You could easily just reverse the statement:

$_ENV.DO_NOT_SEND_METRICS.default(0)

and use it as a flag to stop sending metrics if set. The way not set or set to 0 will send metrics and 1 will prevent sending them

What we’re talking about is the behaviour of 1 and 0 as true and false. This is standard JavaScript (and pretty much every programming language I have ever come across). Whether or not you explicitly defined it or not, using 0 will evaluate as false.

In terms of documentation - The default formatter has a simple task:
if the value evaluates to false (undefined, empty, 0, false) then use the value set in the parentheses

There is a slight caveat client-side where empty strings are not treated as false - discussed here: