feat: add a private enterprise SD-ELEMENT for the log pipeline - #63
Merged
Conversation
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
Caution Review failedThe pull request is closed. ℹ️ 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)
📝 WalkthroughWalkthroughThe change adds a private ChangesPipeline structured-data reporting
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Syslog_Start
participant SyslogPipelineSd
participant Syslog_Record
Syslog_Start->>SyslogPipelineSd: SyslogPipelineSd_Get()
Syslog_Start->>Syslog_Record: register structured-data provider
Syslog_Record->>SyslogPipelineSd: format pipeline metadata
SyslogPipelineSd-->>Syslog_Record: logPipeline@32473 with TLS and HMAC-SHA256
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
DavidCozens
force-pushed
the
stage-14-hmac
branch
from
August 16, 2026 17:57
f041384 to
cee3ffe
Compare
Contributor
Author
|
@coderabbitai pause |
SyslogPipelineSd implements the library's StructuredData extension point in its own translation unit and emits logPipeline@32473, naming the transport and the at-rest policy. It is a worked example of the one part of RFC 5424 structured data that an integrator defines. Flash +13,556 B (+140 on the previous stage) RAM +37,476 B (+4) Log stack +680 B (unchanged) Service +3,768 B (unchanged) Four bytes of static RAM is the whole instance. The vtable has one entry and the library never allocates the object, so a stateless source needs no _Create and no pool slot. A non-zero enterprise number is what produces a private SD-ID: _Begin emits "name@number" for one and a bare IANA "name" for 0. This stage needs the number rather than the string, so SyslogEnterprise.h defines the number and derives the string origin's enterpriseId carries. Adopting a registered number stays a one-line edit. Its own file rather than more of Syslog.c: this is an object implementing a library interface rather than wiring, and a reader looking for how to write an SD source should find one file that is only that. The figures are identical either way. A collector can use the element to confirm that a record arrived over TLS and was sealed at rest, and to alert on a device whose pipeline has weakened. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DavidCozens
force-pushed
the
stage-15-pipeline-sd
branch
from
August 16, 2026 17:58
c085eef to
78867c9
Compare
✅ Action performedReviews paused. |
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.
Write a private enterprise SD-ELEMENT. RFC 5424 reserves this form for definitions of your own, and
SyslogPipelineSd.cis a complete example of one: it implements the library's structured-dataextension point in its own translation unit.
The vtable has one entry,
Format, and the library never allocates the object. A stateless sourcetherefore needs no
_Createand no pool slot; it is a static this application owns and points theconfig at. A source with per-instance state puts that state alongside the vtable in the same struct
and reads it back from the
baseparameter.A non-zero enterprise number is what produces a private SD-ID:
_Beginemitsname@numberfor oneand a bare IANA
namefor zero.SyslogEnterprise.hnow defines the number and derives the stringthat
origin'senterpriseIdcarries, so the two forms cannot drift.What the element reports is the state of the logging path. A collector can confirm that a record
arrived over TLS and was sealed at rest, and can alert on a device whose pipeline has weakened. The
remaining stages change both values as the protection changes.
It lives in its own file rather than in
Syslog.cbecause it is an object implementing a libraryinterface rather than wiring. The figures are identical either way.
Summary by CodeRabbit
New Features
logPipeline@32473structured-data element to emitted records.Documentation
Tests