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
Generated
+5
View File
@@ -14,6 +14,7 @@ version = "0.1.0"
name = "lanparty-ctrl"
version = "0.1.0"
dependencies = [
"lanparty-obs",
"lanparty-proto",
"serde",
"thiserror",
@@ -26,6 +27,10 @@ version = "0.1.0"
[[package]]
name = "lanparty-obs"
version = "0.1.0"
dependencies = [
"lanparty-proto",
"serde",
]
[[package]]
name = "lanparty-proto"