Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trailing backslash from tag keys/values #7652

Merged
merged 3 commits into from
Jun 13, 2020

Conversation

danielnelson
Copy link
Contributor

Currently a tag key or value with a trailing backslash will produce an error like:

 E! [outputs.influxdb] When writing to [http://localhost:8086]: received error unable to parse 'mem,host=loaner,path=C:\ free=3166146560i 1591645472000000000': invalid tag format; discarding points

With this change the trailing slashes are stripped. Other methods were considered include using a space or a replacement char such as _. I decided not to use a space since it might cause confusion when writing queries by hand and in the cli. I decided against underscore because due to how ugly it is.

I know ideally we would have some form of influxdata/influxdb#6037, but I believe this needs to be worked out separately from a fix for the current line protocol.

closes #7558

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

@danielnelson danielnelson added this to the 1.15.0 milestone Jun 8, 2020
@danielnelson danielnelson requested review from ssoroka and reimda June 8, 2020 19:49
Copy link
Contributor

@reimda reimda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be documented. I expected a note in the serializer readme and maybe links in the output plugins readmes to see details in the serializer readme. I took a quick look and didn't find anything about float nan and inf being dropped either.

@danielnelson
Copy link
Contributor Author

I added documentation about these corner cases.

@danielnelson danielnelson merged commit 643fb7d into master Jun 13, 2020
@danielnelson danielnelson deleted the lp-backslash-replace branch June 13, 2020 00:54
rhajek pushed a commit to bonitoo-io/telegraf that referenced this pull request Jul 13, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tag value cannot end with \
3 participants