feat(obs): add shared diagnostics models

Add the observability vocabulary needed for phase-1 frame logging and client
status reporting. Runtime crates can now emit structured events without each
binary inventing separate field names for the same tunnel state.

The new models cover frame direction, action, drop reason, parsed Ethernet frame
logs, malformed frame logs, tunnel counters, relay/QUIC/TAP client diagnostics,
and user-facing diagnostic messages. TunnelStats now lives in lanparty-obs and
is re-exported by lanparty-ctrl so stats remain one shared type whether they are
logged locally or carried over the control stream.

This still does not add logging sinks or tracing integration; those should be
wired in when the relay, gateway, and client loops exist.

Test Plan:
- cargo fmt --check
- cargo test --workspace
- cargo clippy --workspace --all-targets -- -D warnings

Refs: PLAN.md Logging / diagnostics
This commit is contained in:
2026-05-21 17:17:44 +02:00
parent a9c143e447
commit 7aeaa0aeb9
6 changed files with 460 additions and 66 deletions
+8
View File
@@ -29,6 +29,14 @@ Reliable control-plane schema shared by the QUIC stream handlers:
- server welcome, reject, peer lifecycle, stats, and disconnect messages
- room-code, role/MAC, peer-id, and effective-MTU validation
### `lanparty-obs`
Shared diagnostics and structured logging vocabulary:
- gateway/relay frame logs with MACs, ethertype, length, peer, and action
- tunnel counters shared by control messages and runtime diagnostics
- client connectivity/TAP diagnostics and user-facing status messages
## Build
```bash