fix: subjects #3078
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!3078
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/3078/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub pull request.
Original GitHub pull request: #3079
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/3079
Original created: 2026-03-25T23:21:03Z
Original updated: 2026-03-25T23:25:38Z
Original head: carverauto/serviceradar:3074-buglog-collector-failing-to-publish-traces
Original base: staging
Original merged: 2026-03-25T23:22:29Z by @mfreeman451
IMPORTANT: Please sign the Developer Certificate of Origin
Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include
a DCO sign-off statement indicating the DCO acceptance in one commit message. Here
is an example DCO Signed-off-by line in a commit message:
Describe your changes
Issue ticket number and link
Code checklist before requesting a review
Imported GitHub PR review comment.
Original author: @Copilot
Original URL: https://github.com/carverauto/serviceradar/pull/3079#discussion_r2991632942
Original created: 2026-03-25T23:25:37Z
Original path: rust/otel/src/nats_output.rs
Original line: 315
reconcile_subjectsremoves existing subjects when a required wildcard matches them (subject_matches(required, existing)). With the currentsubject_matchesimplementation, patterns likefoo.>also matchfoo(because>returns true without requiring an additional token), which is not NATS wildcard semantics and can cause this reconciliation step to drop the exact subject (e.g.,otel.metrics) and stop capturing messages published to that subject. Consider fixingsubject_matchesso>requires at least one remaining token for patterns likefoo.>, and/or make reconciliation preserve exact subjects unless they are truly covered by the required wildcard per NATS rules.Imported GitHub PR review comment.
Original author: @Copilot
Original URL: https://github.com/carverauto/serviceradar/pull/3079#discussion_r2991632958
Original created: 2026-03-25T23:25:37Z
Original path: rust/otel/src/nats_output.rs
Original line: 320
The
any(|existing| subject_matches(existing, required))check is being applied even whenrequiredcontains wildcards (e.g.otel.metrics.>). Sincesubject_matchestreats wildcards in thesubjectargument as literals, a narrower existing wildcard likeotel.metrics.*would incorrectly be considered to “cover”otel.metrics.>(because*matches the literal token>), which can prevent adding the required wildcard. Consider changing the coverage check so that wildcardrequiredsubjects are only treated as satisfied by an exact match, or implement a proper pattern-subsumption check for pattern-vs-pattern comparisons.Imported GitHub PR review comment.
Original author: @Copilot
Original URL: https://github.com/carverauto/serviceradar/pull/3079#discussion_r2991632982
Original created: 2026-03-25T23:25:38Z
Original path: rust/otel/src/nats_output.rs
Original line: 387
The stream-subject reconciliation/update block is duplicated in both the
get_or_create_streamsuccess path and the fetch-and-update fallback. Consider extracting this into a small helper (e.g., returning(updated_subjects, removed_subjects)/needs_update) so future changes to reconciliation logic don’t accidentally diverge between the two code paths.Imported GitHub PR review comment.
Original author: @Copilot
Original URL: https://github.com/carverauto/serviceradar/pull/3079#discussion_r2991632987
Original created: 2026-03-25T23:25:38Z
Original path: rust/otel/src/nats_output.rs
Original line: 1266
This test expects
otel.traces/otel.metricsto be removed when addingotel.traces.>/otel.metrics.>, which only holds iffoo.>is treated as matchingfoo. If the intent is NATS wildcard semantics,foo.>should not matchfoo, so reconciliation should either retain the exact subjects or explicitly include them in the required list. Please align the test (and reconciliation logic) with the intended NATS/JetStream matching rules and add a regression assertion covering thefoo.>vsfoocase.