vectordotdev / vector

A high-performance observability data pipeline.
https://vector.dev
Mozilla Public License 2.0
17.59k stars 1.55k forks source link

--watch-config hot reloading is not working with config namespacing #20547

Closed Ficklecode closed 1 month ago

Ficklecode commented 4 months ago

A note for the community

Problem

Using the automatic-namespacing scenario, and after successfully starting with the command "vector -C /etc/vector -w", if you edit the configuration in the sources, transforms, and sinks directories and find that hot reloading is not working

https://vector.dev/docs/reference/configuration/#automatic-namespacing

Configuration

No response

Version

0.38.0

Debug Output

No response

Example Data

No response

Additional Context

No response

References

No response

jszwedko commented 4 months ago

@Ficklecode note that --watch-config only looks for changes to loaded files. I don't believe it rescans for new ones (though ideally it should). Can you confirm if you are making edits to existing files or writing new ones?

Ficklecode commented 4 months ago

@jszwedko It is to modify the existing files before startup, and according to my tests, when using the command 'vector -C /etc/vector -w', creating, modifying, and deleting configurations under /etc/vector can all be hot-reloaded. However, hot reloading does not take effect when modifying files in /etc/vector/sources. I tried specifying /etc/vector/* at startup, and automatic-namespacing causes an exception to be thrown

jszwedko commented 4 months ago

Ah I see, thanks for clarifying!