refactor(observability): simplify run outcome tracking, route span attributes and proxy log deprecations - #4605
Conversation
…tributes and proxy log deprecations
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
📦 Client bundle boundary
A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe changes update run outcome tracking and telemetry attribute handling. They also revise logger field deprecation comments and simplify a condition in route registry span attribute construction. ChangesRun outcome tracking
Tenant attribute sampling
Logger field documentation
Route registry span attributes
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to No actionable issue remains in the supplied review evidence; the PR is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
Code review: 90/100Clean, low-risk refactor. Traced each change against its pre-refactor equivalent; behavior is unchanged.
Minor nit, non-blocking: in Generated by Claude Code |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|



Follow-up cleanup of the observability code merged in #4600, #4601, #4602, #4603 and #4604. No behavior change: span attribute names, metric and label names, and log field names are unchanged.
Simplifications
observeRunOutcomeEventclosure move out ofcreateRuntimeAgentStreamResponseinto a smallcreateRunOutcomeTracker. The three copies of theagent.run.tool_error_count/agent.run.child_run_error_countpair (finalized, cancelled and failed paths) now come from onespanAttributes(), and the finalize log fields fromlogFields(). The event checks are anelse ifchain, since an event has only one type.buildRouteRegistrySpanAttributesreturns early when there is no project instead of testingprojectSlug || projectIdtwice, which removes one nesting level from the branch/release block.LogEntrynow carry a removal condition (remove each once no Grafana dashboard, alert rule or saved Loki query filters on it) instead of a repeated "kept for Grafana dashboard transition" note. The stale "request context fields" comment is gone.isBoundedTenantSample,projectAttributescounted the labels that are not platform project labels. It is renamed toownAttributes.Reviewed and left as is
markSpanFailed(otlp-setup),ServiceTracerSpan.markFailedandtelemetryErrorTypedo not overlap. The first two set an error status on two different span types.telemetryErrorTypeclassifies a thrown error.HostedAgentRunSpan.markFailedstays optional because hosts implement that public interface.__getTenantSeriesScopeCountForTestsasserts that series registries do not outlive their targets. That memory bound has no other observable signal, and it follows the existing__getDirectTargetCountForTestspattern.Part of veryfront/veryfront-issue-inbox#1860
Summary by CodeRabbit