feat: fill in the RFC 5424 header fields - #5
Merged
Conversation
Contributor
Author
|
@coderabbitai pause |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
Comment |
✅ Action performedReviews paused. |
DavidCozens
force-pushed
the
stage-04-udp
branch
from
August 16, 2026 21:47
a0b0644 to
15ea726
Compare
TIMESTAMP, HOSTNAME and APP-NAME come from what the device already has — the wall clock it acquired at boot, the address on its interface, and its own name. PROCID stays nil, because a bare-metal image has no process to identify. <134>1 2026-08-16T19:17:54.430000Z 10.0.2.15 solid-syslog-example - BOOT - device started Flash +5,108 B (+384 on the previous stage) RAM +1,908 B (unchanged) 384 bytes is what a record that says when it happened and which device it came from costs over one that says neither. That is the difference between a log line and evidence, and it is worth knowing the price of separately. Two things the adapters have to get right. The timestamp struct is zeroed before use, so a clock that cannot answer leaves Month == 0, fails the library's validation, and is emitted as the nil value rather than as a wrong time. And the hostname is read under the lwIP core lock, with ip4addr_ntoa_r rather than ip4addr_ntoa — the latter shares one static buffer across callers. RFC 5424 section 6.2.4 allows an address where a device has no resolvable name, which is this device exactly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DavidCozens
force-pushed
the
stage-05-header-fields
branch
from
August 16, 2026 21:47
8dc0e61 to
4ed519b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The record so far carries no timestamp and no device name. Fill the RFC 5424 header fields from
what the device already has: the clock it acquired at boot, the address on its interface, and its
own name.
PROCID stays nil, because a bare-metal image has no process to identify, and so does
STRUCTURED-DATA until the next stage.
Two things the adapters have to get right. The timestamp struct is zeroed before it is filled, so a
clock that cannot answer leaves
Month == 0, fails the library's validation, and is emitted as thenil value rather than as a wrong time. And the hostname is read under the lwIP core lock, with
ip4addr_ntoa_rrather thanip4addr_ntoa— the latter shares one static buffer across callers.Where a device has no resolvable name, RFC 5424 section 6.2.4 allows its address in the HOSTNAME
field instead, which is this device exactly.
When you need it. As soon as more than one device reports to the collector, or a record's time
will be relied on. Everything the later stages add — a sequence number, the clock's quality, the
device's own identity — builds on these fields rather than replacing them.