influxdata / docs-v2

InfluxData Documentation that covers InfluxDB Cloud, InfluxDB OSS 2.x, InfluxDB OSS 1.x, InfluxDB Enterprise, Telegraf, Chronograf, Kapacitor, and Flux.
https://docs.influxdata.com
MIT License
72 stars 263 forks source link

Docs misleading when a tag and field set is present #2472

Open bogo666 opened 3 years ago

bogo666 commented 3 years ago

The wording of the "Whitespace I" section in the InfluxDB line protocol tutorial doc, for the case when we have both a tag set and field set, is misleading, leading to viewer interpretation that whitespace is needed between each of the measurement name, tag set, field set and optional timestamp.

It would be good if the section contained examples of:

  1. Fields only (docs already have this example)
  2. Tags only
  3. Both Tags & Fields

along with a rewrite of the paragraph: "Separate the measurement and the field set or, if you’re including a tag set with your data point, separate the tag set and the field set with a whitespace. The whitespace is required in line protocol."

...so that a comma is always needed after the measurement name if a tag set is present, regardless of if a field set is present or not.

Relevant URLs

https://docs.influxdata.com/influxdb/v1.8/write_protocols/line_protocol_tutorial/

sanderson commented 3 years ago

Thanks for submitting @bogo666. Some clarification – line protocol isn't valid without a field set, so #2 isn't possible. But we can certainly add an example that shows line protocol with both tags and fields.

bogo666 commented 3 years ago

Thanks @sanderson :-)