-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Unnecessary escaping in influx line protocol #13162
Comments
Thanks for the reproduction @Fiery-Fenix ! That is odd that we are escaping |
I'm looking to take this one on. I'm still investigating, but I am also pursuing the line of inquiry into this being an issue with an external crate(s). |
I haven't had time to fix this yet, focusing on job hunt, but my approach to debugging would be a mixture of gdb, packet sniffing, and |
With some naive debugging, I was able to pinpoint the culprit. A vector/lib/vector-core/src/event/util/log/all_fields.rs Lines 91 to 95 in 00c0316
vector/src/sinks/influxdb/mod.rs Lines 293 to 300 in 00c0316
As far as I can tell, influx is encoding correctly to escape vector/src/sinks/influxdb/logs.rs Lines 645 to 654 in 00c0316
Though I feel I don't have enough knowledge to figure the LogEvent iteration part, yet. |
(from a Slack message) This will be a bit of a big change unfortunately. |
A note for the community
Problem
sinks.influx is doing unnecessary escaping which breaks further pipeline (like telegraf)
According to official specification of influx protocol - it's not needed to escape "." (dot) in any parts of influx line protocol. But vector is escaping it those making produced event incompatible with other solutions that's supports Influx line protocol.
Example (see provided configuration for pipeline):
echo '{"event.name":"event"}' | vector --config influx.toml
Expected result:
vector,metric_type=logs event.name="event" 1655286885923535800
Actual result:
vector,metric_type=logs event\\\\.name="event" 1655286885923535800
Configuration
Version
vector 0.22.1 (x86_64-unknown-linux-gnu b633e95 2022-06-10)
Debug Output
No response
Example Data
No response
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: