I left a couple of smaller questions/bits of feedback. LGTM in general.
One thing that could use improvement is how we capture the error message for failed telemetry. I had the situation that the target database wasn't set up correctly (the target table existed, but was not a hypertable). The error trace that I saw in the terminal was:
Error: worker pool error
Caused by:
0: worker execution error
1: db error: ERROR: table "metrics" is not a hypertable
2: ERROR: table "metrics" is not a hypertable
The error in the telemetry entry was "worker pool error", and there was no stacktrace, because stacktraces are off. It would be useful to get the "Caused by" chain that we see above.
Now the error cause is an array with each caused by.
Now the error cause is an array with each caused by.