vectordotdev / vectordotdev/vector

Add `connect` mode to the `socket` source

Open
#2,042 6 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta: feedback needs: approval needs: requirements source: socket
Dominant language
Rust
Stars
22.6k
Forks
2.3k
Avg merge
1d 7h
Merged PRs (30d)
146

Description

Currently the socket source uses the specified socket address (for TCP/UDP) or path (for UDS) to create a socket with such an address and listen for connections on it.

However, in some circumstances it might be useful to not listen, but connect to sockets and read data from them.

I propose to add new configuration option, which would take two possible values, listen (the current behavior) and connect (the new mode). I'm not sure what would be the best name for the new configuration option. It could have been mode, but mode is already used to specify whether the socket is TCP/UDP/UDS.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the socket source implementation and its current TCP, UDP, and UDS listening paths. Read the configuration handling and existing source tests first, then determine how a separate option can distinguish listen from connect behavior; done means the new mode connects to each supported socket type and the current listen behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.