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

enhancement(socket sink): support unix datagram mode #22120

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

jpovixwm
Copy link
Contributor

@jpovixwm jpovixwm commented Jan 3, 2025

Summary

Same as #21762 but with different user-facing configuration.
Adds unix_datagram as a valid value for the mode option of the socket sink.
Not supported on macOS.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

make test on x86_64 Ubuntu 22.04 running within WSL, and:

cargo test --lib --no-default-features --features=sinks-socket --target=x86_64-pc-windows-gnu
sources:
  dummy_logs:
    type: "demo_logs"
    format: "syslog"
    count: 3

sinks:
  emit_console:
    inputs:
      - "dummy_logs"
    type: "console"
    encoding:
      codec: "text"
  emit_syslog:
    inputs:
      - "dummy_logs"
    type: "socket"
    mode: "unix_datagram"
    path: "/tmp/test_socket"
    encoding:
      codec: "text"
    framing:
      method: "newline_delimited"

Listener:
nc -lkuU /tmp/test_socket (from package netcat-openbsd)

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Checklist

  • Please read our Vector contributor resources.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run dd-rust-license-tool write to regenerate the license inventory and commit the changes (if any). More details here.

References

@jpovixwm jpovixwm requested review from a team as code owners January 3, 2025 23:12
@github-actions github-actions bot added domain: sinks Anything related to the Vector's sinks domain: external docs Anything related to Vector's external, public documentation labels Jan 3, 2025
@pront
Copy link
Member

pront commented Jan 3, 2025

@jpovixwm thank you for re-opening this PR!

I will take a look at the implementation details but I will leave the UX aspects to @jszwedko 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: external docs Anything related to Vector's external, public documentation domain: sinks Anything related to the Vector's sinks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for UNIX datagram mode to socket sink
3 participants