Description
Proposal:
Add support for 64 bit unsigned integers to Point.to_line_protocol()
Current behavior:
InfluxDB 2.x supports 64 bit unsigned integers, which the Line Protocol documentation says should be suffixed with a "u". Point.to_line_protocol (via calling _append_fields() only appends an "i" for integer field values. This works fine for positive integers smaller than max signed int32, but for positive integers between max signed int32 and max unsigned int64, InfluxDB 2.x will reject as "value out of range."
Desired behavior:
Perhaps the simplest and backward compatible solution would be to use a "u" suffix for integer values > max signed int32. I don't have a good sense, though, of whether this would behave expectedly on InfluxDB 1.x when uint support is not enabled.
Alternatives considered:
- Append a "u" for all positive integers, regardless of size. I don't know for sure, but I'd worry that influx will have typing problems if you mix unsigned and signed integers for the same field.
- Write my own line protocol serializer for my specific use case so that I can have deliberate control of the suffixes based on my specific definitions of my measurements.
Use case:
Metrics collector that receives a stream of incoming data, translates it to line protocol, and sends it to a local Telegraf socket listener for ingestion into a remote InfluxDB.