Skip to content

Conversation

@ianneub
Copy link

@ianneub ianneub commented Dec 13, 2025

Summary

This PR adds an optional configuration option to the StatsD source to choose the type of Unix socket to use. Stream (by default) or Datagram. It also adds an optional configuration option to set the max_length of the UDP datagram to receive.

Vector configuration

data_dir: /var/lib/vector
sources:
  statsd:
    type: statsd
    mode: unix
    socket_type: datagram
    path: /tmp/statsd.sock
sinks:
  console:
    type: console
    inputs:
      - statsd
    encoding:
      codec: json

How did you test this PR?

I added test that is nearly a duplicate of the existing test for the unix stream socket. I also did manual testing by writting a small ruby file to invest StatsD data using the Datagram protocol.

Change Type

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

Is this a breaking change?

  • Yes
  • No

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.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

@ianneub ianneub requested a review from a team as a code owner December 13, 2025 19:31
@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Dec 13, 2025
@github-actions
Copy link

github-actions bot commented Dec 13, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@ianneub
Copy link
Author

ianneub commented Dec 13, 2025

I have read the CLA Document and I hereby sign the CLA

@ianneub ianneub requested a review from a team as a code owner December 13, 2025 20:11
@github-actions github-actions bot added the domain: external docs Anything related to Vector's external, public documentation label Dec 13, 2025
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: sources Anything related to the Vector's sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant