Update span to 1.1.5 and warn on FORMERR responses#38
Conversation
… responses Co-Authored-By: Claude Opus 4.6 <[email protected]>
WalkthroughThis pull request adds telemetry instrumentation to two error handling paths in the DNS Server. Specifically, the telemetry span level is set to "warn" in two scenarios: when a PartialDecodingException occurs and when a DNS query contains no questions. Both modifications precede the generation of FORMERR (format error) responses. No changes to control flow, logic, or public API are introduced. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/DNS/Server.php (1)
200-207: Consider setting a span level for the NOTIMP response path.The FORMERR paths now set
leveltowarn, but the NOTIMP path (unsupported opcode) returns early without any span level annotation. For consistency, you may want to add a similar$span->set('level', 'warn')here as well.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/DNS/Server.php` around lines 200 - 207, The NOTIMP (unsupported opcode) return path in the opcode check currently returns early without setting span level; add a span annotation similar to the FORMERR paths by calling $span->set('level', 'warn') just before creating/returning the NOTIMP response in the block that checks $query->header->opcode !== 0 (around the Message::response(...) call) so the trace/span records the warning level for this branch.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/DNS/Server.php`:
- Around line 200-207: The NOTIMP (unsupported opcode) return path in the opcode
check currently returns early without setting span level; add a span annotation
similar to the FORMERR paths by calling $span->set('level', 'warn') just before
creating/returning the NOTIMP response in the block that checks
$query->header->opcode !== 0 (around the Message::response(...) call) so the
trace/span records the warning level for this branch.
Summary
utopia-php/spanfrom 1.1.4 to 1.1.5warnon FORMERR responses (partial decoding errors and missing question section) to distinguish them fromerror(exceptions) andinfo(successful responses)Test plan
warnerrorinfo🤖 Generated with Claude Code
Summary by CodeRabbit