feat: add INFO request-lifecycle logging skeleton and rebalance levels #435#454
Merged
Merged
Conversation
…#435 At INFO the logs said almost nothing about what a request did; the lifecycle was visible only at DEBUG bundled with payload dumps. Implements part 1 of the approved design (#434). - INFO request skeleton: 7 metadata-only events (received/initialized, interactive login, per-iteration model call, tool completion, fallback, completed) via a single lifecycle_logging.format_event seam (stable prefix + key=value) so #438/#439 can lift the fields into structured attributes later. - Single-writer ERROR ownership: one WARNING per tool failure at the StagedBaseTool choke point (was two ERRORs); the sole ERROR with error_reference stays with _QuickAppCompletion. _MCPTool isError ERROR->DEBUG, DialCompletionService empty-content WARNING->DEBUG. - Level rebalance: routine per-request records demoted INFO->DEBUG. - Docs: level semantics + ownership + content rule in CODESTYLE.md §9; INFO-skeleton section in docs/agent.md. Content stripping and the LOG_PAYLOADS switch are #436.
After merging #408 (expose MCP/HTTP tool errors to the LLM), _RestApiTool's HTTP-status detect-and-raise logged at ERROR before raising for fallback. Under the single-writer ERROR ownership rule this PR codifies, that record belongs at DEBUG — the StagedBaseTool choke point owns the single WARNING. Mirrors the _MCPTool isError fix; message is already structure-only.
Collaborator
Author
|
/deploy-review
|
VinShurik
requested changes
Jul 17, 2026
…tage skip #435 - skip the execution-time stage on config-resolution failure (set failed=True) - resolve tool name via isinstance(BaseOpenAITool) instead of a getattr chain - gate the 'Tool call completed' INFO to success; fold duration into the failure WARNING so a failed tool call yields exactly one log line
VinShurik
approved these changes
Jul 17, 2026
andrii-novikov
approved these changes
Jul 17, 2026
korotaav48
approved these changes
Jul 17, 2026
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.
Applicable issues
Description of changes
At INFO, logs said almost nothing about what a request did; the request lifecycle was visible only at DEBUG, bundled with payload dumps. This implements the approved design (#434) part 1: level semantics + the INFO request skeleton.
lifecycle_logging.format_eventseam (stable prefix +key=value) so Structured (JSON) logging mode #438/Request-scoped log context #439 can lift the fields into structured attributes later.StagedBaseToolchoke point (was two ERRORs); the sole ERROR witherror_referencestays owned by_QuickAppCompletion. Secondary fixes:_MCPToolisError ERROR→DEBUG,DialCompletionServiceempty-content WARNING→DEBUG._GetContentTool,_AttachmentGetContentInjector,AgentSkillsProvider) demoted INFO→DEBUG.CODESTYLE.md§9; an INFO-skeleton section added todocs/agent.md.Content-stripping and the
LOG_PAYLOADSswitch are #436; this PR is scoped to levels + the skeleton.Checklist
[ ] App schema changes are backward compatible, or breaking changes are documented with a migration guide(no schema/config-model changes)[ ] Integration tests pass- no LLM logic changesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.