feat: complete structlog migration (Phase 3b — remaining modules)#224
Open
arthurfantaci wants to merge 6 commits intomainfrom
Open
feat: complete structlog migration (Phase 3b — remaining modules)#224arthurfantaci wants to merge 6 commits intomainfrom
arthurfantaci wants to merge 6 commits intomainfrom
Conversation
Migrate 15 modules from stdlib logging to structlog:
- evaluation/{ragas_evaluators,cost_analysis,conversational_evaluators,golden_dataset,regression}
- graph, prompts/catalog
- core/{standards,definitions,embeddings,conversation}
- core/agentic/{orchestrator,streaming,checkpoints}
- core/agentic/subgraphs/{rag,synthesis}
Part of #222
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate 5 guardrails modules from stdlib logging to structlog:
- hallucination.py, pii_detection.py, toxicity.py: standard conversion
- output_filter.py: convert extra={} dict to keyword args
- events.py: named logger "guardrails" via structlog.get_logger(),
convert extra={} to keyword args, keep import logging for level constants
Part of #222
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate 3 auth modules from stdlib logging to structlog:
- postgres_store.py: standard conversion
- middleware.py: convert 6 extra={} calls to keyword args
- audit.py: named logger "audit" via structlog.get_logger(),
add module-level logger for error handling, convert extra={}
to keyword args, update type hint, keep import logging for
level constants
Part of #222
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- observability.py: standard conversion to structlog - test_events.py: migrate 6 caplog tests to structlog.testing.capture_logs() - api.py: remove logging.basicConfig bridge (all named loggers now use structlog) Closes #222 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(structlog): complete migration of remaining modules (Phase 3b)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
Summary
Complete the structlog migration started in Phase 3a (#219). All remaining 26 modules
now use
structloginstead of stdliblogging.Changes
caplogtostructlog.testing.capture_logs()logging.basicConfigbridge fromapi.py(no longer needed)Result
logging.getLogger()calls remain in application code"audit","guardrails") usestructlog.get_logger(name)import loggingonly retained where level constants (logging.WARNING) are usedTest plan
Closes #222
🤖 Generated with Claude Code