observability: Add session-aware log directory routing#152
Open
stefanskoricdev wants to merge 6 commits into
Open
observability: Add session-aware log directory routing#152stefanskoricdev wants to merge 6 commits into
stefanskoricdev wants to merge 6 commits into
Conversation
stefanskoricdev
force-pushed
the
log-to-dir
branch
from
July 21, 2026 11:45
6268382 to
4e5c8ca
Compare
stefanskoricdev
marked this pull request as ready for review
July 22, 2026 13:33
stefanskoricdev
requested review from
davidabram and
ivke995
and removed request for
davidabram
July 22, 2026 15:49
ivke995
approved these changes
Jul 23, 2026
Replace log_file/log_file_mode with log_dir/SCE_LOG_DIR across config schema, resolution, and config rendering. Route enabled log records to append-only date/session-specific files under the configured directory while preserving stderr emission and fail-open file write diagnostics. Thread optional session IDs through logger trait methods for per-session file partitioning. Co-authored-by: SCE <sce@crocoder.dev>
Propagate producer-native session IDs through diff-trace and conversation-trace logging. Emit dedicated database-open errors without duplicate generic diagnostics while preserving fail-open behavior. Co-authored-by: SCE <sce@crocoder.dev>
Keep configured log directories bounded by retaining the 10 newest direct regular .log files after a new log file is created. Existing-file appends skip cleanup, and cleanup failures fail open with redacted stderr diagnostics. Co-authored-by: SCE <sce@crocoder.dev>
Resolve observability log_dir through SCE_LOG_DIR, config file, then the canonical <state_root>/sce/logs default. Centralize the default path in the shared default path catalog so config resolution and path ownership stay aligned. Co-authored-by: SCE <sce@crocoder.dev>
Retry the complete rendered record at a sibling -v2.log path when primary open, append, or flush fails. Keep fallback non-recursive and apply retention after newly created fallback files. Co-authored-by: SCE <sce@crocoder.dev>
Add a positive log_file_retention_limit config value with a default of 10 and expose its resolved provenance through config show. Apply the resolved limit to retention cleanup for primary and v2 log files. Co-authored-by: SCE <sce@crocoder.dev>
stefanskoricdev
force-pushed
the
log-to-dir
branch
from
July 23, 2026 16:30
dc0dac3 to
cf06d35
Compare
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.
diff-traceandconversation-tracelogging pipelines.v2version of the same log file before propagating the error.log_dirresolution with the following precedence:SCE_LOG_DIRenvironment variable<state_root>/sce/logs