feat: identify the device with an origin SD-ELEMENT - #39
Merged
Conversation
SolidSyslogOriginSd (RFC 5424 section 7.2) carrying software, swVersion and enterpriseId. The ip PARAM is left out: the address the collector sees is the one that reached it. Flash +11,972 B (+396 on the previous stage) RAM +7,136 B (+44) Log stack +448 B (unchanged) Service +736 B (unchanged) It lands after the store rather than before it. While a record went straight out, "who sent this" was implied by the connection it arrived on; once records can replay hours later that stops being true, and the record has to say so itself. enterpriseId 32473 is the number reserved for documentation by RFC 5612. A device shipping for real registers its own with IANA. It is defined in app/syslog/SyslogEnterprise.h rather than beside the element that carries it, because the number identifies the vendor and not the logger — anything else this product puts its own name on wants the same one, and one definition cannot drift from itself. The record is now 245 bytes, against the 256-byte cap this device set when its records were shorter. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe syslog startup path now registers an Origin structured-data block containing software, version, and enterprise information. README cost documentation and run-report measurements are updated to describe the Origin stage instead of the File store stage. ChangesOrigin metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/syslog/SyslogEnterprise.h`:
- Around line 1-10: Update the comments in app/syslog/SyslogEnterprise.h lines
1-10 to identify 32473 as a documentation-reserved example enterprise ID, not
the product/vendor’s production PEN, and state that production builds must
replace it with a registered PEN. Update README.md lines 15-18 with the same
deployment guidance; retain the example value and macro unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 550fd61d-e381-40c9-860b-60856b707f7b
⛔ Files ignored due to path filters (2)
measurements/origin.csvis excluded by!**/*.csvmeasurements/stages.tsvis excluded by!**/*.tsv
📒 Files selected for processing (4)
README.mdapp/syslog/Syslog.capp/syslog/SyslogEnterprise.hrun-report.md
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.
Pull request
What this stage adds
SolidSyslogOriginSd (RFC 5424 section 7.2) carrying software, swVersion and
enterpriseId. The ip PARAM is left out: the address the collector sees is the one
that reached it.
Flash +11,972 B (+396 on the previous stage)
RAM +7,136 B (+44)
Log stack +448 B (unchanged)
Service +736 B (unchanged)
It lands after the store rather than before it. While a record went straight out,
"who sent this" was implied by the connection it arrived on; once records can
replay hours later that stops being true, and the record has to say so itself.
enterpriseId 32473 is the number reserved for documentation by RFC 5612. A device
shipping for real registers its own with IANA. It is defined in
app/syslog/SyslogEnterprise.h rather than beside the element that carries it,
because the number identifies the vendor and not the logger — anything else this
product puts its own name on wants the same one, and one definition cannot drift
from itself.
The record is now 245 bytes, against the 256-byte cap this device set when its
records were shorter.
Files
Checklist
measurements/origin.csvcommitted.measurements/stages.tsv.python3 scripts/gen-cost-table.py../run.shgreen (build + QEMU + baseline self-check) —run-report.mdcommitted.Context for review: 12 of 21 sequential single-commit PRs replaying the integration on top of the Baseline root. Each lands green and reviewed before the next is built on it, because a change to an early commit would force every commit above it to be re-run and re-measured.
Summary by CodeRabbit
New Features
Documentation