fix(collector): C# log quality — quiet graceful-stop discard, HTTP code in single-command failure#1226
Merged
Merged
Conversation
…de in single-command failure Mirror of the native log-quality fixes (#1225) for the two issues that also exist in C#: DataProcessor.LogDiscardedItems logs graceful-shutdown discards at Info, not Error (expected/contracted, fired on every stop); CommandHandler single-command failure now includes the HTTP StatusCode, matching the batch path. Logging-only, no behavior change. net6.0 builds clean; 27 shutdown/command tests pass (net48). Registration resilience (native #5) is already better in C# (persistent queue retries connection failures); runtime-registration Info verbosity (native #1) deferred. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code Review — PR #1226: C# collector log qualityVerdict: ✅ Approve. Two small, well-scoped, logging-only changes. I verified both against the surrounding code and found no bugs, security, or performance concerns. What was checked1.
2.
Minor / optional (non-blocking)
Notes
Nice, tightly-scoped fix with an accurate PR description and a helpful inline comment. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The native collector log-quality fixes (#1225) surfaced two issues that also exist in the C# collector (native is a port of it). This mirrors them:
DataProcessor.LogDiscardedItemslogged"{queue} queue discarded N item(s) during collector shutdown."at Error on every graceful stop. Dropping still-buffered values on a bounded shutdown is expected and contracted (a stop must not block on a dead/slow transport) — now Info.Status Code: {response.StatusCode}; the single-command path (CommandHandler.HandleRequestResultAsync(response, value, …)) logged only the body text. Add the status code for consistency (parity with the batch path and with the native fix(collector): log quality — relabel runtime registrations, HTTP code, quiet stop-drop #1225 fix).Not changed (intentionally)
Verified locally
HSMDataCollectorbuilds clean on net6.0 (0 errors).Logging-only; no behavior change. The C# collector is a published package, so a version bump is left as a release decision (root
AGENTS.md: bump only when preparing a release).🤖 Generated with Claude Code