feat: add a private enterprise SD-ELEMENT for the log pipeline - #45
Merged
Conversation
A worked example of the one part of RFC 5424 structured data that is yours to define. SyslogPipelineSd implements the library's StructuredData extension point directly, in its own translation unit, and emits logPipeline@32473 naming the transport and the at-rest policy. Flash +13,548 B (+124 on the previous stage) RAM +35,688 B (+4) Log stack +712 B (unchanged) Service +3,800 B (unchanged) The IANA elements say what any device can say; a private one says what only this product knows. What it reports here is the integrity of the logging path itself, which a collector can use to confirm a record arrived over TLS and was sealed at rest, and to alert on a device whose pipeline has weakened. Four bytes of static RAM is the whole instance. A stateless SD source needs no _Create and no pool slot: the library never allocates one, so it is a vtable the application owns and points at. The enterprise number is what makes the SD-ID private — _Begin emits "name@number" for a non-zero one and a bare IANA "name" for 0. This is the stage that needs the number rather than the string, so SyslogEnterprise.h now defines the number and derives the string origin's enterpriseId carries. The two forms cannot drift, and adopting a real enterprise number stays a one-line edit. Its own file rather than more of Syslog.c: this is an object implementing a library interface, not wiring, and a reader after "how do I write my own SD source" should find one file that is only that. It costs nothing to separate — the figures are identical either way. The record is 316 bytes against the 512-byte cap. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughAdds a private RFC 5424 ChangesPipeline structured data
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Syslog_Start
participant SyslogPipelineSd_Get
participant SyslogSender
participant RFC5424Collector
Syslog_Start->>SyslogPipelineSd_Get: register pipeline SD provider
Syslog_Start->>SyslogSender: configure four structured-data providers
SyslogSender->>RFC5424Collector: emit logPipeline with transport=tls and atRest=hmac-sha256
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
This was referenced Jul 30, 2026
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
A worked example of the one part of RFC 5424 structured data that is yours to
define. SyslogPipelineSd implements the library's StructuredData extension point
directly, in its own translation unit, and emits logPipeline@32473 naming the
transport and the at-rest policy.
Flash +13,548 B (+124 on the previous stage)
RAM +35,688 B (+4)
Log stack +712 B (unchanged)
Service +3,800 B (unchanged)
The IANA elements say what any device can say; a private one says what only this
product knows. What it reports here is the integrity of the logging path itself,
which a collector can use to confirm a record arrived over TLS and was sealed at
rest, and to alert on a device whose pipeline has weakened.
Four bytes of static RAM is the whole instance. A stateless SD source needs no
_Create and no pool slot: the library never allocates one, so it is a vtable the
application owns and points at.
The enterprise number is what makes the SD-ID private — _Begin emits "name@number"
for a non-zero one and a bare IANA "name" for 0. This is the stage that needs the
number rather than the string, so SyslogEnterprise.h now defines the number and
derives the string origin's enterpriseId carries. The two forms cannot drift, and
adopting a real enterprise number stays a one-line edit.
Its own file rather than more of Syslog.c: this is an object implementing a library
interface, not wiring, and a reader after "how do I write my own SD source" should
find one file that is only that. It costs nothing to separate — the figures are
identical either way.
The record is 316 bytes against the 512-byte cap.
Files
Checklist
measurements/pipeline-sd.csvcommitted.measurements/stages.tsv.python3 scripts/gen-cost-table.py../run.shgreen (build + QEMU + baseline self-check) —run-report.mdcommitted.Context for review: 18 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
Chores