Skip to content

[otap-df-otap] Restructure Syslog CEF Receiver config to scope settings per protocol#2064

Merged
drewrelmas merged 7 commits intoopen-telemetry:mainfrom
utpilla:utpilla/Update-Syslog-CEF-Receiver-Config
Feb 19, 2026
Merged

[otap-df-otap] Restructure Syslog CEF Receiver config to scope settings per protocol#2064
drewrelmas merged 7 commits intoopen-telemetry:mainfrom
utpilla:utpilla/Update-Syslog-CEF-Receiver-Config

Conversation

@utpilla
Copy link
Copy Markdown
Contributor

@utpilla utpilla commented Feb 19, 2026

Change Summary

Restructures the Syslog CEF Receiver configuration so that endpoint and TLS settings are scoped under their respective protocol, rather than being flat top-level fields. This aligns with the OTLP Receiver's config pattern and makes the config model extensible for future protocol additions (e.g., Unix Domain Sockets).

Motivation

The previous config had listening_addr, protocol, and tls as sibling fields:

  • TLS is inherently TCP-specific, but nothing in the config structure enforced that
  • A flat listening_addr (SocketAddr) wouldn't generalize to protocols which might be added in future such as Unix Domain Sockets that use a path instead
  • Adding new protocols would require awkward conditional validation

Config change

Before

Config
├── listening_addr: SocketAddr
├── protocol: "tcp" | "udp"
└── tls: Option<TlsServerConfig>     ← TCP-only, but not enforced by structure

After

Config
└── protocol: Protocol                ← tagged enum, exactly one variant
    ├── tcp: TcpConfig
    │   ├── listening_addr: SocketAddr
    │   └── tls: Option<TlsServerConfig>
    └── udp: UdpConfig
        └── listening_addr: SocketAddr

YAML example

Before

config:
  listening_addr: "0.0.0.0:5140"
  protocol: udp

After

config:
  protocol:
    udp:
      listening_addr: "0.0.0.0:5140"

Key design decisions

  • Tagged enum instead of struct with optional fields: Unlike the OTLP Receiver (which supports running gRPC + HTTP simultaneously), the Syslog CEF Receiver supports exactly one protocol per instance. A serde externally-tagged enum enforces this at deserialization time with no runtime validation needed.
  • protocol (singular): Reflects the one-protocol-per-instance constraint.
  • TLS scoped to TcpConfig: UDP's deny_unknown_fields rejects any tls field, enforcing the constraint structurally.

How are these changes tested?

Added unit tests

Are there any user-facing changes?

Yes

@utpilla utpilla requested a review from a team as a code owner February 19, 2026 07:49
@github-actions github-actions Bot added the rust Pull requests that update Rust code label Feb 19, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.97%. Comparing base (74b09ca) to head (2c8aaa7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2064      +/-   ##
==========================================
+ Coverage   86.96%   86.97%   +0.01%     
==========================================
  Files         536      536              
  Lines      172511   172637     +126     
==========================================
+ Hits       150020   150152     +132     
+ Misses      21957    21951       -6     
  Partials      534      534              
Components Coverage Δ
otap-dataflow 89.12% <100.00%> (+0.01%) ⬆️
query_abstraction 80.61% <ø> (ø)
query_engine 90.31% <ø> (ø)
syslog_cef_receivers ∅ <ø> (∅)
otel-arrow-go 53.50% <ø> (ø)
quiver 91.73% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@drewrelmas drewrelmas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved - please take a quick look at the failing Clippy notice.

Copy link
Copy Markdown
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread rust/otap-dataflow/crates/otap/src/syslog_cef_receiver.rs Outdated
Comment thread rust/otap-dataflow/crates/otap/src/syslog_cef_receiver.rs Outdated
Comment thread rust/otap-dataflow/crates/otap/src/syslog_cef_receiver.rs
Copy link
Copy Markdown
Contributor

@lquerel lquerel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drewrelmas drewrelmas added this pull request to the merge queue Feb 19, 2026
Merged via the queue into open-telemetry:main with commit 6dfebcc Feb 19, 2026
63 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants