Skip to content

Conversation

@sghall
Copy link
Member

@sghall sghall commented Nov 25, 2025

Summary

Motivation

  • In UDP mode, the syslog source did not emit:
    • component_received_events_total
    • component_received_event_bytes_total
    • component_received_bytes_total
  • This made observability inconsistent and broke component compliance checks.

Changes

  • src/sources/syslog.rs:
    • Emit SocketEventsReceived for UDP with event count and estimated JSON size.
    • Emit SocketBytesReceived for UDP with the datagram byte size.
  • Tests:
    • Add test_udp_syslog using the compliance harness to assert:
      • component_received_events_total
      • component_received_event_bytes_total
      • component_received_bytes_total (tagged)
      • component_sent_events_total
      • component_sent_event_bytes_total

Testing

  • Focused:
    • cargo test -p vector test_udp_syslog
    • cargo test -p vector 'sources::syslog::test::'

Related

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.

@sghall sghall requested a review from a team as a code owner November 25, 2025 03:19
@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Nov 25, 2025
@sghall sghall changed the title fix for syslog udp metrics fix(syslog): emit received events/bytes metrics for UDP mode Nov 25, 2025
@sghall sghall force-pushed the sghall/fix-syslog-udp-metrics branch from f0e433a to 55b8a32 Compare November 25, 2025 03:37
@thomasqueirozb thomasqueirozb changed the title fix(syslog): emit received events/bytes metrics for UDP mode fix(syslog source): emit received events/bytes metrics for UDP mode Nov 25, 2025
@thomasqueirozb thomasqueirozb added the source: syslog Anything `syslog` source related label Nov 25, 2025
@thomasqueirozb thomasqueirozb added the meta: awaiting author Pull requests that are awaiting their author. label Nov 25, 2025
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

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

@github-actions github-actions bot removed the meta: awaiting author Pull requests that are awaiting their author. label Dec 1, 2025
@emilychendd
Copy link
Contributor

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

@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented Dec 1, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d19505c | Docs | Was this helpful? Give us feedback!

@emilychendd emilychendd enabled auto-merge December 2, 2025 19:49
@emilychendd emilychendd added this pull request to the merge queue Dec 2, 2025
Merged via the queue into master with commit 4902750 Dec 2, 2025
45 checks passed
@emilychendd emilychendd deleted the sghall/fix-syslog-udp-metrics branch December 2, 2025 20:52
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

domain: sources Anything related to the Vector's sources source: syslog Anything `syslog` source related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Syslog source has no received events metrics when the mode is UDP

5 participants