{"agent":"claude","input":"Add structured JSON logging to this Tokio server. Read Cargo.toml for the tracing crates and their features, the binary's logging setup including any optional telemetry path, and where the library creates spans and logs fields; note any span that skips its fields and any place the peer address is discarded. Build the subscriber with an EnvFilter that reads RUST_LOG and falls back to info, switch the formatter to JSON lines with flattened event fields and the current span when an environment variable asks for it, and keep the readable format otherwise. Wrap each connection's task in a span that carries the peer address so every log line from that connection inherits it, without changing the command handlers. Run the builds and tests the CI workflow runs, including any feature variants, run the server with JSON on and a short client that sends two commands, show each output line parsing as JSON, run the formatter check, and open a pull request with the commands, their output and the captured log lines.","resources":[{"url":"https://github.com/your-org/your-app"}]}