#3676·vector

Unify `endpoint` handling

Author: ktffCreated Sep 2, 2020Updated Sep 17, 2026
Labelstype: tech debtdomain: config

#1775 introduced concept of endpoint and changed relevant components to use endpoint naming. With that in place we can unify their behavior in code.

Context

Current situation is a mix of using String and UriSerde where all of the components parse and validate them differently, making endpoint behave differently between components. So we have an opportunity to enhance UX by making endpoint consistent, reduce the amount of code by extracting parse and validation into shared code, make our validation more robust to catch potential issues early on, and make creating new components with endpoint a bit simpler.

Description

A list of what can be done, what are the issues, and other general notes:

  • Push parsing to serde (https://github.com/timberio/vector/issues/1775#issuecomment-584763786), this would reduce the amount of errors that we have to deal with later.
  • Allow path in endpoint. Even though #1775 defined endpoint as having no path, we can't avoid that since some users are using it (https://github.com/timberio/vector/issues/1775#issuecomment-677915454). And while we could allow it for some components and not the others, that would decrease the benefits of this issue.
  • Check if we can actually disallow query and fragment parts of uri. For some of the components that's a hard yes, mostly for those that add a path of their own.
  • It would be nice if this all could be added by extending UriSerde. For this, http sink is the main outlier since it's using UriSerde for accepting full uri.
  • Default schemes. For HTTP based components this should be https so if users wants to use less secure connection they would need to specify the scheme.
  • Default authority. While all of the components can have a good default scheme, some of them also have default authority (ex. logdna sink), but not all of them.

Problems

All of the above points tie to the three main problems:

  • Determine the minimum of uri that the user needs to pass for it to be a valid endpoint.
  • Determine the maximum of uri that the user can pass for it to be a valid endpoint.
  • Define unified abstraction fluidly between those two points such that all of the components can use it.

Other

There is a trade-off between consistency and usability, and while the extreme of usability is a good option, the same can't be said for the opposite.