sycommon-python-lib 0.2.10a11__tar.gz → 0.2.10a13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/PKG-INFO +1 -1
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/pyproject.toml +1 -1
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/async_sql_logger.py +2 -1
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/kafka_log.py +275 -14
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/log_masker.py +69 -11
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/logger_levels.py +9 -3
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/sql_logger.py +2 -1
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/traceid.py +36 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon_python_lib.egg-info/PKG-INFO +1 -1
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon_python_lib.egg-info/SOURCES.txt +5 -0
- sycommon_python_lib-0.2.10a13/tests/test_frame_alignment.py +172 -0
- sycommon_python_lib-0.2.10a13/tests/test_kafka_upie_fix.py +401 -0
- sycommon_python_lib-0.2.10a13/tests/test_print_capture.py +99 -0
- sycommon_python_lib-0.2.10a13/tests/test_sql_params_full.py +40 -0
- sycommon_python_lib-0.2.10a13/tests/test_unicode_decode_regress.py +44 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/README.md +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/acp/config.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/acp/executor.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/acp/registry.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/acp/server.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/acp_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/acp_serve_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/acp/client.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/acp/fetch.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/acp/server_adapter.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/acp/ssh_init.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/acp/tool.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/deep_agent.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/middleware/model_request_prep.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/middleware/sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/middleware/sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/middleware/skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/reasoning_content_patch.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/resume_compactor.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/sandbox/minio_sync.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/skills_retry_patch.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/agent/summarization_utils.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/ACPAgentConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/EgressPolicyConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/config/config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/database/resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/health/readiness.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/bounded_kafka_sink.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/bounded_stdout_sink.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/egress_wall.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/sandbox_gateway.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/rabbitmq/rabbit_management_client.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_backend_factory_compat.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_consume_dedup.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_consumer_broker_health.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_consumer_recovery_fix.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_consumer_tags_sync.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_db_keepalive.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_env_tenant_helper.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_exp_concurrent_migrate.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_exp_delete_queue_with_consumers.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_fault_injection_real.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_heartbeat_timeout.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_integration_real_broker.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_mq_config_driven.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_nacos_llm_real.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_queue_priority_fallback.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_queue_priority_upgrade_timing.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_reconnect_scenarios.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_sandbox_glob_hardening.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_services_plugin_defaults.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_upgrade_aio_pika.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_upgrade_langgraph_stream.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tests/test_upgrade_verification.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tools/time_utils.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/tools/user_id.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon_python_lib.egg-info/requires.txt +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_acp_tool.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_hotreload_snapshot.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_llm_apikey_contextvar.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_log_masker.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_skill_regex_upgrade.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_streaming_e2e.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_summary_echo_break_loop.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_sycli.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_sylogger_fixes.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_sync_skills_to_sandbox.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_time_utils.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_traceid_omit_base64.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_upload_concurrency.py +0 -0
- {sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/tests/test_upload_e2e_http.py +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from sqlalchemy import event
|
|
2
2
|
from sycommon.logging.kafka_log import SYLogger
|
|
3
3
|
from sycommon.logging.log_masker import masker as _log_masker
|
|
4
|
+
import json
|
|
4
5
|
import time
|
|
5
6
|
|
|
6
7
|
|
|
@@ -38,7 +39,7 @@ class AsyncSQLTraceLogger:
|
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
# 注意:SYLogger.info 必须是线程安全的或非阻塞的,否则可能影响异步性能
|
|
41
|
-
SYLogger.info(f"SQL执行: {sql_log}")
|
|
42
|
+
SYLogger.info(f"SQL执行: {json.dumps(sql_log, ensure_ascii=False, default=str)}")
|
|
42
43
|
except Exception as e:
|
|
43
44
|
SYLogger.error(f"SQL日志处理失败: {str(e)}")
|
|
44
45
|
|
{sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/kafka_log.py
RENAMED
|
@@ -117,6 +117,166 @@ def _strip_impl(node, depth, seen):
|
|
|
117
117
|
return node
|
|
118
118
|
|
|
119
119
|
|
|
120
|
+
# 🔑 2026-10-16 框架帧谓词与 Java 对齐编码 helpers(对齐 go-lib alpha.28)。
|
|
121
|
+
# 请求/响应日志由 sycommon/middleware/traceid.py 闭包发起,starlette
|
|
122
|
+
# BaseHTTPMiddleware 的 call_next 链与 uvicorn 帧都是框架帧 — 不跳则
|
|
123
|
+
# className 恒落 traceid.py/middleware.py(平台渲染 [py: N],同 Go go:238)。
|
|
124
|
+
# 🔴 注意: /sycommon/logging/ 整目录跳帧对 SQL 链过狠 —
|
|
125
|
+
# sql_logger/async_sql_logger 的事件闭包(after_cursor_execute)是收口层,
|
|
126
|
+
# 其上全是 sqlalchemy 引擎帧;跳过闭包继续穿透常常耗尽窗口落 kafka 兜底。
|
|
127
|
+
# SQL 链把闭包当"最深可回收帧": 见 _log 抓帧的 _caller 兜底分支。
|
|
128
|
+
_FRAME_PATH_MARKERS = (
|
|
129
|
+
"/sycommon/logging/", # 本包(_log/公开方法/桥接)
|
|
130
|
+
"/sycommon/middleware/", # 本库中间件(traceid.py 请求/响应收口)
|
|
131
|
+
"/sycommon/services", # Services 插件装配层
|
|
132
|
+
"/site-packages/starlette/", # ASGI 框架(BaseHTTPMiddleware.call_next/router)
|
|
133
|
+
"/site-packages/uvicorn/", # ASGI 服务器帧
|
|
134
|
+
"/site-packages/fastapi/", # 路由分发帧
|
|
135
|
+
"/site-packages/loguru/", # sink 回灌链
|
|
136
|
+
"/site-packages/sqlalchemy/", # ORM 事件/引擎帧(wxcoach SQL 链实测落 event.__call__)
|
|
137
|
+
"/lib/python3", # 标准库 asyncio/runners(内置路由无 endpoint 的兜底链)
|
|
138
|
+
"/site-packages/anyio/", # starlette 依赖的异步原语帧
|
|
139
|
+
"/sycommon/database", # 本库 DB 封装层
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def _is_framework_frame(module_path: str) -> bool:
|
|
144
|
+
"""帧是否属于框架层(日志/中间件/ASGI/ORM),抓帧时应跳过。
|
|
145
|
+
|
|
146
|
+
sqlalchemy 的 cython/generated cache wrapper 帧文件名是
|
|
147
|
+
"<sqlalchemy generated cache() wrapper ...>"(非路径形态,路径
|
|
148
|
+
谓词不命中)— 以 '<' 开头的生成代码帧一并视为框架帧。
|
|
149
|
+
"""
|
|
150
|
+
if module_path.endswith("/logging/__init__.py"):
|
|
151
|
+
return True
|
|
152
|
+
if module_path.lstrip().startswith("<"):
|
|
153
|
+
return True # 生成代码帧(sqlalchemy cache wrapper 等)
|
|
154
|
+
return any(m in module_path for m in _FRAME_PATH_MARKERS)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def _caller_file_from_path(module_path: str) -> str:
|
|
158
|
+
"""路径最后一段文件名(traceid.py),旧 className 形态兜底用。"""
|
|
159
|
+
return module_path.rsplit("/", 1)[-1]
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
def _package_two_segments(module_path: str) -> str:
|
|
163
|
+
"""Java 对齐 className: 模块路径最后两段(sycommon/wecom)。
|
|
164
|
+
|
|
165
|
+
平台头部列按 Java 习惯取 className 最后一个 '.' 后的段当短类名
|
|
166
|
+
(starter-log 字节码: classShortName=className.substring(lastIndexOf('.')+1));
|
|
167
|
+
Python 文件名(traceid.py)取段得 'py' → 渲染 [py: N] 无信息量。
|
|
168
|
+
模块路径两段(以 '/' 分层)取段后得包名 → [wecom: N],与 Go
|
|
169
|
+
alpha.28 的 internal/wecom 同语义。venv 路径(site-packages)剥到
|
|
170
|
+
包名为止;无路径分隔(单文件)返回空由调用方回退。
|
|
171
|
+
"""
|
|
172
|
+
parts = [p for p in module_path.replace("\\", "/").split("/") if p]
|
|
173
|
+
# 剥 site-packages 前缀后的真实包路径(找不到标记则全路径)
|
|
174
|
+
if "site-packages" in parts:
|
|
175
|
+
parts = parts[parts.index("site-packages") + 1:]
|
|
176
|
+
# 去文件名:取目录段(_log 拿到的 module_path 含文件名)
|
|
177
|
+
if parts and parts[-1].endswith(".py"):
|
|
178
|
+
parts = parts[:-1]
|
|
179
|
+
if len(parts) >= 2:
|
|
180
|
+
return "/".join(parts[-2:])
|
|
181
|
+
if len(parts) == 1:
|
|
182
|
+
return parts[0]
|
|
183
|
+
return ""
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
# ---------------------------------------------------------------------------
|
|
187
|
+
# print 接管(2026-10-16,默认全开):业务代码的裸 print 一并进 Kafka 上报
|
|
188
|
+
# ---------------------------------------------------------------------------
|
|
189
|
+
# 形态对齐 Go 侧 RedirectStandardLog(stdlib log 全收口):Python 的"裸输出
|
|
190
|
+
# 习惯"是 print,存量代码大量调试/巡检 print 原先只落容器 stdout 不上报,
|
|
191
|
+
# 平台检索不到。接管后走 SYLogger._log 同一条管线(信封/调用点帧/
|
|
192
|
+
# BoundedKafkaSink 有界队列),className/method/line 定位业务帧。
|
|
193
|
+
#
|
|
194
|
+
# 三道防线(没有它们就是事故):
|
|
195
|
+
# 1. 回环防护:日志系统自身路径(sycommon/logging + _print_in_log 哨兵)
|
|
196
|
+
# 直写原生 stdout,不回灌 — 否则 DEV_LOG 镜像 print → _log → 再镜像
|
|
197
|
+
# 无限递归(Go 侧 JSON 套娃的同族坑);
|
|
198
|
+
# 2. 显式 file= 定向(stderr/f=...)不接管,print 的定向语义保留;
|
|
199
|
+
# 3. 单条体积上限(与 msg 819200 同限)+ 空行丢弃。
|
|
200
|
+
_print_orig = None
|
|
201
|
+
_print_in_log = False
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def _is_print_source_internal(module_path: str) -> bool:
|
|
205
|
+
"""print 调用方是否属于日志系统(回环源)。"""
|
|
206
|
+
if module_path.endswith("/logging/__init__.py"):
|
|
207
|
+
return True
|
|
208
|
+
return "/sycommon/logging/" in module_path
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def _captured_print(*args, sep=" ", end="\n", file=None, flush=False):
|
|
212
|
+
"""builtins.print 的接管实现。
|
|
213
|
+
|
|
214
|
+
业务帧的 print → SYLogger._log(text, INFO) 进 Kafka;日志系统内部与
|
|
215
|
+
显式定向的 print 原样放行(原生 stdout)。
|
|
216
|
+
"""
|
|
217
|
+
global _print_in_log
|
|
218
|
+
if _print_in_log:
|
|
219
|
+
_print_orig(*args, sep=sep, end=end, file=file, flush=flush)
|
|
220
|
+
return
|
|
221
|
+
# 显式定向(非默认 stdout)不接管 — print(f, file=stderr) 语义保留
|
|
222
|
+
if file is not None and file is not sys.stdout:
|
|
223
|
+
_print_orig(*args, sep=sep, end=end, file=file, flush=flush)
|
|
224
|
+
return
|
|
225
|
+
|
|
226
|
+
text = sep.join(_safe_str(a) for a in args)
|
|
227
|
+
if not text.strip():
|
|
228
|
+
_print_orig(*args, sep=sep, end=end, file=file, flush=flush)
|
|
229
|
+
return
|
|
230
|
+
|
|
231
|
+
# 内部判定只看【直接调用方】stack()[1]:
|
|
232
|
+
# 日志系统的 print(DEV_LOG 信封镜像/producer 自愈提示)调用方就是
|
|
233
|
+
# sycommon/logging 一眼可辨 → 放行原生 stdout。
|
|
234
|
+
# 🔴 不能用"沿栈穿透找业务帧"(抓帧谓词的逻辑):业务 → SYLogger.info
|
|
235
|
+
# → _log → print(镜像) 链里穿透必命中业务帧,镜像会被当业务 print
|
|
236
|
+
# 再上报 — 整个信封 dict 作为 msg 双投+嵌套+中文双重转义
|
|
237
|
+
# (wxcoach 实测 17:26 抓出,2026-10-16 修)。
|
|
238
|
+
try:
|
|
239
|
+
import inspect as _inspect
|
|
240
|
+
_direct = _inspect.stack()[1].filename.replace("\\", "/")
|
|
241
|
+
if _is_print_source_internal(_direct):
|
|
242
|
+
_print_orig(*args, sep=sep, end=end, file=file, flush=flush)
|
|
243
|
+
return
|
|
244
|
+
except Exception:
|
|
245
|
+
# 抓栈失败宁可放行(漏报优于误报双投)
|
|
246
|
+
_print_orig(*args, sep=sep, end=end, file=file, flush=flush)
|
|
247
|
+
return
|
|
248
|
+
|
|
249
|
+
# 上报进 Kafka(经 _log 信封 — className/method/line 自动富化 + 限长,
|
|
250
|
+
# _log 内部 mask_string 已有体量防线,此处不再重复截断)。
|
|
251
|
+
# 原生 stdout 不再写(容器 stdout 静默纪律与 SYLogger.info 一致,
|
|
252
|
+
# DEV_LOG 镜像由 _log 内部处理)。
|
|
253
|
+
_print_in_log = True
|
|
254
|
+
try:
|
|
255
|
+
SYLogger._log(text, "INFO")
|
|
256
|
+
finally:
|
|
257
|
+
_print_in_log = False
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
def _install_print_capture():
|
|
261
|
+
"""接管 builtins.print(幂等)。setup_logger 装配期调用。"""
|
|
262
|
+
global _print_orig
|
|
263
|
+
if _print_orig is not None:
|
|
264
|
+
return
|
|
265
|
+
import builtins
|
|
266
|
+
_print_orig = builtins.print
|
|
267
|
+
builtins.print = _captured_print
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def _uninstall_print_capture():
|
|
271
|
+
"""恢复原生 print。close/热重建期对称调用,防接管悬挂。"""
|
|
272
|
+
global _print_orig
|
|
273
|
+
if _print_orig is None:
|
|
274
|
+
return
|
|
275
|
+
import builtins
|
|
276
|
+
builtins.print = _print_orig
|
|
277
|
+
_print_orig = None
|
|
278
|
+
|
|
279
|
+
|
|
120
280
|
def _safe_str(msg) -> str:
|
|
121
281
|
"""str() 的安全版:repr 若含凭证关键词(Request/scope 误传)则整体替换。
|
|
122
282
|
|
|
@@ -220,6 +380,20 @@ class KafkaSink:
|
|
|
220
380
|
bootstrap_timeout_ms=10000:
|
|
221
381
|
api_version 默认为 None,__init__ 会 eager bootstrap 拉取版本信息,
|
|
222
382
|
broker 不可达时默认 30s 才超时。重建/惰性补建路径下 30s 太长,收到 10s。
|
|
383
|
+
enable_idempotence=False 的理由(2026-10-14 netsearch 生产事故复盘):
|
|
384
|
+
kafka-python 3.x 把 enable_idempotence 默认从 False 静默改为 True,
|
|
385
|
+
日志 producer 被动卷进 PID/序列号/muted 整套幂等机制,触发两个库缺陷:
|
|
386
|
+
1. retention 型 UnknownProducerIdError 活锁:broker 因 retention 清掉
|
|
387
|
+
producer state 后持续回 UPIE,客户端 KAFKA-5793 分支每次都重置序列号
|
|
388
|
+
重试(该分支在 _can_retry 之前、不受 retries 约束),且
|
|
389
|
+
reset_sequence_for_partition 把 last_acked 一并弹掉(此后永远 -1),
|
|
390
|
+
导致每次都判成 retention-based → 无限重试(现场转了 2 分钟)。
|
|
391
|
+
2. muted.remove KeyError:幂等下 guarantee_message_order=True,批次被
|
|
392
|
+
双重完成(本地 delivery timeout 一次 + broker 迟到响应一次)时
|
|
393
|
+
_dispatch_error 尾部裸 muted.remove(tp) 第二次抛 KeyError,直接炸
|
|
394
|
+
出 "Uncaught error in kafka producer I/O thread"。
|
|
395
|
+
日志管道不需要 exactly-once(可容忍重复/丢失),关掉幂等后 UPIE 走
|
|
396
|
+
非重试分支直接 fail 进 errback(自愈信号),muted 集合彻底不用。
|
|
223
397
|
"""
|
|
224
398
|
return KafkaProducer(
|
|
225
399
|
bootstrap_servers=self._bootstrap_servers,
|
|
@@ -229,6 +403,7 @@ class KafkaSink:
|
|
|
229
403
|
max_block_ms=5000,
|
|
230
404
|
retries=5,
|
|
231
405
|
request_timeout_ms=30000,
|
|
406
|
+
enable_idempotence=False,
|
|
232
407
|
# delivery_timeout 由默认 120s 收紧到 45s:断网时批次最多积压 45s 就过期并触发
|
|
233
408
|
# errback(自愈信号),而不是静默积压 2 分钟后才批量报错。约束:必须大于
|
|
234
409
|
# linger_ms + request_timeout_ms(5 + 30000),45s 满足。
|
|
@@ -386,7 +561,18 @@ class KafkaSink:
|
|
|
386
561
|
file_name = _cf
|
|
387
562
|
caller_fn = (msg_obj or {}).get("_caller_fn") or ""
|
|
388
563
|
caller_line = (msg_obj or {}).get("_caller_line") or 0
|
|
389
|
-
|
|
564
|
+
# 🔘 中间件路由定位优先(协程断栈链的稳定业务定位)
|
|
565
|
+
_route_handler = (msg_obj or {}).get("_handler") or ""
|
|
566
|
+
if _route_handler:
|
|
567
|
+
caller_fn = _route_handler
|
|
568
|
+
# 🔑 2026-10-16 Java 对齐编码(对齐 go-lib alpha.28 javaStyleClassName):
|
|
569
|
+
# className = 模块路径最后两段(sycommon/wecom),平台按 '.' 取段
|
|
570
|
+
# 得 wecom → 渲染 [wecom: N];旧文件名形态(traceid.py)渲染 [py: N]。
|
|
571
|
+
# _caller_pkg 由 _log 抓帧时写正文(队列存活),缺失回退旧形态。
|
|
572
|
+
_caller_pkg = (msg_obj or {}).get("_caller_pkg") or ""
|
|
573
|
+
if _caller_pkg:
|
|
574
|
+
class_name = _caller_pkg
|
|
575
|
+
elif logger_name and logger_name != file_name:
|
|
390
576
|
class_name = f"{file_name}:{logger_name}"
|
|
391
577
|
else:
|
|
392
578
|
class_name = file_name
|
|
@@ -403,7 +589,13 @@ class KafkaSink:
|
|
|
403
589
|
# - msg/detail:Java limitLength 防大包被 Kafka 拒收 —— msg 819200,
|
|
404
590
|
# detail 102400(100KB,starter-log appendToKafka 字节码确认;
|
|
405
591
|
# 2026-10-10 修正:此前 detail 也按 819200,超长堆栈大包与 Java 不一致)
|
|
406
|
-
|
|
592
|
+
# 🔑 2026-10-16 Java 对齐: classShortName 取 className 最后一段
|
|
593
|
+
# (internal/wecom → wecom);旧文件名主干形态(traceid → py 剥扩展)
|
|
594
|
+
# 保留兜底。对齐 go-lib alpha.28 classShortOf。
|
|
595
|
+
if _caller_pkg:
|
|
596
|
+
_class_short = _caller_pkg.rsplit("/", 1)[-1]
|
|
597
|
+
else:
|
|
598
|
+
_class_short = file_name.rsplit(".", 1)[0] if "." in file_name else file_name
|
|
407
599
|
# 🔑 msg 对齐 Java getFormattedMessage(纯消息文本,2026-10-10):
|
|
408
600
|
# record.message 是 _log 塞的 log_json 信封(内含 trace_id/message/
|
|
409
601
|
# level/... 元键)——此前整包落 msg 字段,平台显示双层 JSON;
|
|
@@ -575,11 +767,16 @@ class KafkaSink:
|
|
|
575
767
|
引用,故全程用 _rebuild_lock 保护,并置 _rebuild_in_progress 让 write()
|
|
576
768
|
在此期间跳过惰性建 producer,避免重复构造。
|
|
577
769
|
|
|
578
|
-
|
|
770
|
+
关键一:close() 内部会 join sender 线程(sender.join(timeout)),而本方法
|
|
579
771
|
正是从 sender 线程的 errback 链调进来的——若在锁内直接 close 旧 producer
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
772
|
+
会触发"在自己线程里 join 自己"的死锁。所以 flush/close 必须放在锁外。
|
|
773
|
+
|
|
774
|
+
关键二(2026-10-14 生产事故复盘):只放锁外还不够——errback 同步执行
|
|
775
|
+
flush(5s)+close(10s) 会让 kafka 的 IO 线程卡 15s(现场 14.9s,selector
|
|
776
|
+
慢任务看门狗连报 blocking the event loop),期间网络收发全部停摆。因此
|
|
777
|
+
整个 关旧/建新 挪到独立 daemon 线程执行,errback 立即返回。_rebuild_
|
|
778
|
+
in_progress 维持到新 producer 就位,期间 write() 跳过(日志丢弃语义与
|
|
779
|
+
原重建窗口一致)。"""
|
|
583
780
|
with self._rebuild_lock:
|
|
584
781
|
if self._rebuild_in_progress:
|
|
585
782
|
return # 已有重建在进行,不重入
|
|
@@ -588,7 +785,17 @@ class KafkaSink:
|
|
|
588
785
|
# 摘引用:write() 见到 _producer is None 且 _rebuild_in_progress 会跳过
|
|
589
786
|
self._producer = None
|
|
590
787
|
self._producer_obj = None
|
|
591
|
-
#
|
|
788
|
+
# 关旧/建新全在独立线程:绝不阻塞 kafka IO 线程(errback 调用方)与 loguru 线程
|
|
789
|
+
threading.Thread(
|
|
790
|
+
target=self._rebuild_worker, args=(old,),
|
|
791
|
+
name="kafka-sink-rebuild", daemon=True).start()
|
|
792
|
+
|
|
793
|
+
def _rebuild_worker(self, old):
|
|
794
|
+
"""重建工作体(独立 daemon 线程内执行)。
|
|
795
|
+
|
|
796
|
+
close() 会 join sender 线程,绝不能在 sender 线程里做;bootstrap 不可达
|
|
797
|
+
会抛,吞掉,下次失败计数还会再触发。"""
|
|
798
|
+
# flush/close 放锁外且放本线程:join sender 线程最长 ~15s,别拖任何人
|
|
592
799
|
if old is not None:
|
|
593
800
|
try:
|
|
594
801
|
old.flush(timeout=5)
|
|
@@ -735,11 +942,22 @@ class KafkaLogger(metaclass=SingletonMeta):
|
|
|
735
942
|
intercept_handler = _InterceptHandler()
|
|
736
943
|
logging.root.handlers = [intercept_handler]
|
|
737
944
|
logging.root.setLevel(logging.WARNING)
|
|
945
|
+
# kafka-python 内部日志降噪兜底(正常由 services.setup_logger_levels()
|
|
946
|
+
# 在插件链更早处设置;此处幂等重申):故障期间库的 WARNING 风暴
|
|
947
|
+
# (UnknownProducerIdError 重试/selector 慢任务/批次过期)经 root 桥接
|
|
948
|
+
# 回灌 loguru 后又要发往同一故障 topic,形成放大回路(2026-10-14 复盘)。
|
|
949
|
+
for _name in ("kafka", "kafka.net", "kafka.net.selector",
|
|
950
|
+
"kafka.net.connection", "kafka.producer"):
|
|
951
|
+
logging.getLogger(_name).setLevel(logging.ERROR)
|
|
738
952
|
|
|
739
953
|
sys.excepthook = KafkaLogger._handle_exception
|
|
740
954
|
# sys.excepthook 只管主线程;工作线程的未捕获异常走 threading.excepthook
|
|
741
955
|
threading.excepthook = KafkaLogger._handle_thread_exception
|
|
742
956
|
|
|
957
|
+
# 🔑 print 接管(2026-10-16 默认全开):业务裸 print 一并进 Kafka —
|
|
958
|
+
# 平台可检索;回环/定向/体积三防线见 _captured_print。
|
|
959
|
+
_install_print_capture()
|
|
960
|
+
|
|
743
961
|
# 注册 asyncio 异常处理器,捕获未处理的 Task 异常
|
|
744
962
|
KafkaLogger._setup_asyncio_exception_handler()
|
|
745
963
|
|
|
@@ -866,6 +1084,8 @@ class KafkaLogger(metaclass=SingletonMeta):
|
|
|
866
1084
|
|
|
867
1085
|
@staticmethod
|
|
868
1086
|
def close():
|
|
1087
|
+
# print 接管对称恢复(热重建 reload 会重新 setup — 不恢复则双跳)
|
|
1088
|
+
_uninstall_print_capture()
|
|
869
1089
|
if KafkaLogger._sink_instance is None:
|
|
870
1090
|
return
|
|
871
1091
|
# 先移除 loguru sink(按 add() 返回的 handler id),停止后台线程往 sink 写入
|
|
@@ -1052,19 +1272,37 @@ class SYLogger:
|
|
|
1052
1272
|
# (_log 每条日志必经)用 inspect 抓真实业务帧写进正文,消费侧优先读。
|
|
1053
1273
|
# 栈形:业务 → SYLogger.info/warning/... → _log → 此处;跳过本帧、
|
|
1054
1274
|
# _log、公开方法帧(深度自适应:回溯到 sycommon.logging 之外的首帧)。
|
|
1055
|
-
|
|
1275
|
+
# 🔑 2026-10-16 对齐 go-lib alpha.28: 谓词同时跳过本库中间件帧与
|
|
1276
|
+
# web 框架帧 —— 请求/响应日志由 traceid.py 中间件闭包发起(同 Go
|
|
1277
|
+
# 的 TraceIDMiddleware go:238 形态),starlette 的 BaseHTTPMiddleware
|
|
1278
|
+
# call_next 帧与 sycommon/middleware 帧都是框架帧,不跳则 className
|
|
1279
|
+
# 恒落 traceid.py / middleware.py(平台 [py: N] 无信息量)。
|
|
1280
|
+
_caller_file, _caller_fn, _caller_line, _caller_pkg = "", "", "", ""
|
|
1281
|
+
_last_skip = None # 最后跳过的本库日志层帧(SQL 收口闭包兜底用)
|
|
1056
1282
|
try:
|
|
1057
1283
|
import inspect as _inspect
|
|
1058
|
-
for _f in _inspect.stack()[2:
|
|
1284
|
+
for _f in _inspect.stack()[2:20]:
|
|
1059
1285
|
_mod = _f.filename.replace("\\", "/")
|
|
1060
|
-
if
|
|
1286
|
+
if _is_framework_frame(_mod):
|
|
1287
|
+
if "/sycommon/logging/" in _mod and "kafka_log" not in _mod:
|
|
1288
|
+
_last_skip = _f
|
|
1061
1289
|
continue
|
|
1062
|
-
_caller_file =
|
|
1063
|
-
_caller_fn = _f.function
|
|
1290
|
+
_caller_file, _caller_fn = _caller_file_from_path(_mod), _f.function
|
|
1064
1291
|
_caller_line = _f.lineno
|
|
1292
|
+
_caller_pkg = _package_two_segments(_mod) or _caller_file_from_path(_mod)
|
|
1065
1293
|
break
|
|
1294
|
+
else:
|
|
1295
|
+
# 窗口耗尽(全框架帧): SQL 链回退到事件闭包帧(如
|
|
1296
|
+
# after_cursor_execute @ async_sql_logger.py:39)—
|
|
1297
|
+
# 定位到 SQL 收口层,优于 kafka:0 无信息量形态。
|
|
1298
|
+
if _last_skip is not None:
|
|
1299
|
+
_mod = _last_skip.filename.replace("\\", "/")
|
|
1300
|
+
_caller_file = _caller_file_from_path(_mod)
|
|
1301
|
+
_caller_fn = _last_skip.function
|
|
1302
|
+
_caller_line = _last_skip.lineno
|
|
1303
|
+
_caller_pkg = _package_two_segments(_mod) or _caller_file
|
|
1066
1304
|
except Exception:
|
|
1067
|
-
|
|
1305
|
+
_caller_pkg = ""
|
|
1068
1306
|
|
|
1069
1307
|
# 单条开关裁决:严格布尔判定,非布尔值(None/exec 等)一律跟随全局
|
|
1070
1308
|
if enabled is False:
|
|
@@ -1089,6 +1327,16 @@ class SYLogger:
|
|
|
1089
1327
|
# 🔒 凭证兜底:任何进入日志的对象(含误传的 Request/scope/headers)先剥离
|
|
1090
1328
|
# 敏感结构。这是白名单(traceid.py)之后的第二道防线——即使业务代码把整个
|
|
1091
1329
|
# request 对象传进日志,ASGI scope 里的 authorization/cookie/token 也不会落盘。
|
|
1330
|
+
# 🔑 2026-10-16 中间件路由定位提升(对齐 go-lib handlerFields):
|
|
1331
|
+
# traceid.py 中间件把 handler/handler_pkg 塞进 message dict;
|
|
1332
|
+
# _log 在此提升为信封级 _handler_pkg/_handler 键(队列存活),
|
|
1333
|
+
# write 消费侧优先用它构建 className/method — BaseHTTPMiddleware
|
|
1334
|
+
# call_next 起 task,handler 帧与中间件闭包栈不连续(协程边界,
|
|
1335
|
+
# 同 Go goroutine 断栈),栈解析到不了业务帧,路由定位是唯一稳定源。
|
|
1336
|
+
_route_pkg, _route_handler = "", ""
|
|
1337
|
+
if isinstance(msg, dict):
|
|
1338
|
+
_route_pkg = msg.pop("handler_pkg", "") or ""
|
|
1339
|
+
_route_handler = msg.pop("handler", "") or ""
|
|
1092
1340
|
msg = _strip_sensitive_payload(msg)
|
|
1093
1341
|
|
|
1094
1342
|
# 序列化消息:dict/list 先脱敏(按字段名/子串/长度/总量裁剪),再转 JSON
|
|
@@ -1126,10 +1374,23 @@ class SYLogger:
|
|
|
1126
1374
|
if _caller_file:
|
|
1127
1375
|
# 调用点帧正文键(className/method/line 的队列存活通道):
|
|
1128
1376
|
# BoundedKafkaSink str 化后 record.file 兜底 'kafka'/line=0,
|
|
1129
|
-
# KafkaSink.write
|
|
1377
|
+
# KafkaSink.write 优先读这些键。_caller_pkg = Java 对齐的
|
|
1378
|
+
# className(模块路径最后两段,2026-10-16 — 平台按 '.' 取段
|
|
1379
|
+
# 渲染短名,旧文件名 traceid.py 会渲染成 [py: N])。
|
|
1130
1380
|
log_dict["_caller_file"] = _caller_file
|
|
1131
1381
|
log_dict["_caller_fn"] = _caller_fn
|
|
1132
1382
|
log_dict["_caller_line"] = _caller_line
|
|
1383
|
+
if _caller_pkg:
|
|
1384
|
+
log_dict["_caller_pkg"] = _caller_pkg
|
|
1385
|
+
# 🔘 中间件路由定位(2026-10-16,对齐 go-lib handlerFields):
|
|
1386
|
+
# 协程断栈链(BaseHTTPMiddleware call_next 起 task)栈解析到不了
|
|
1387
|
+
# 业务帧,_handler_pkg/_handler 是唯一稳定定位;_caller_pkg 被
|
|
1388
|
+
# 路由定位优先覆盖(栈帧在断栈链上只会落 asyncio/引擎帧)。
|
|
1389
|
+
if _route_pkg:
|
|
1390
|
+
log_dict["_handler_pkg"] = _route_pkg
|
|
1391
|
+
log_dict["_caller_pkg"] = _route_pkg
|
|
1392
|
+
if _route_handler:
|
|
1393
|
+
log_dict["_handler"] = _route_handler
|
|
1133
1394
|
if _ctx.get("tenant_id"):
|
|
1134
1395
|
log_dict["_tenant_id"] = _ctx["tenant_id"]
|
|
1135
1396
|
if _ctx.get("user_id"):
|
{sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/log_masker.py
RENAMED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
- sycommon.synacos.nacos_config_manager -> 配置热更新时调 reload()
|
|
31
31
|
"""
|
|
32
32
|
import json
|
|
33
|
+
import re
|
|
33
34
|
from datetime import datetime
|
|
34
35
|
from decimal import Decimal
|
|
35
36
|
from typing import Any, Optional
|
|
@@ -225,8 +226,15 @@ class LogMasker(metaclass=SingletonMeta):
|
|
|
225
226
|
return kept + [f"...[{len(items) - n} items truncated]..."]
|
|
226
227
|
|
|
227
228
|
# ------------------------------------------------------------------ sanitize
|
|
228
|
-
def _sanitize_value(self, value: Any, key: Any, depth: int = 0
|
|
229
|
-
|
|
229
|
+
def _sanitize_value(self, value: Any, key: Any, depth: int = 0,
|
|
230
|
+
full: bool = False) -> Any:
|
|
231
|
+
"""对单个值脱敏。key 仅供字段名匹配,dict 内部递归时按真实 key 传入。
|
|
232
|
+
|
|
233
|
+
full=True: 不做叶子 maxLength 折叠与超长 list 摘要(SQL 参数展示全量),
|
|
234
|
+
字段级 mask/drop 仍生效;整条防线由 _log 的 maxSize(Kafka 单条上限)
|
|
235
|
+
兜底。折叠对 SQL 参数是双重伤害: 中段丢失之外,截断会把 \\uXXXX
|
|
236
|
+
转义对从中间切断,展示解码后残留悬空 \\u54 片段(2026-10-16 实测)。
|
|
237
|
+
"""
|
|
230
238
|
# 1. 先按 key 决定动作(脱敏在最外层命中即生效,不深入)
|
|
231
239
|
action = self._match_action(key)
|
|
232
240
|
if action == "drop":
|
|
@@ -241,7 +249,7 @@ class LogMasker(metaclass=SingletonMeta):
|
|
|
241
249
|
value = value.isoformat()
|
|
242
250
|
|
|
243
251
|
if isinstance(value, str):
|
|
244
|
-
return self._truncate_str(value)
|
|
252
|
+
return value if full else self._truncate_str(value)
|
|
245
253
|
if value is None or isinstance(value, (bool, int, float)):
|
|
246
254
|
return value
|
|
247
255
|
|
|
@@ -253,24 +261,32 @@ class LogMasker(metaclass=SingletonMeta):
|
|
|
253
261
|
if isinstance(value, dict):
|
|
254
262
|
out = {}
|
|
255
263
|
for k, v in value.items():
|
|
256
|
-
sv = self._sanitize_value(v, k, depth + 1)
|
|
264
|
+
sv = self._sanitize_value(v, k, depth + 1, full=full)
|
|
257
265
|
if sv is _DROP:
|
|
258
266
|
continue
|
|
259
267
|
out[k] = sv
|
|
260
268
|
return out
|
|
261
269
|
|
|
262
|
-
# 5. list
|
|
270
|
+
# 5. list:full 不摘要逐项递归;否则超长摘要
|
|
263
271
|
if isinstance(value, (list, tuple)):
|
|
264
|
-
|
|
272
|
+
items = list(value)
|
|
273
|
+
if full:
|
|
274
|
+
return [self._sanitize_value(v, _child_key(key, i), depth + 1,
|
|
275
|
+
full=full)
|
|
276
|
+
for i, v in enumerate(items)]
|
|
277
|
+
return self._summarize_list(items, key)
|
|
265
278
|
|
|
266
279
|
# 6. 兜底:不可识别对象,转字符串后截断,避免 json.dumps 失败
|
|
267
280
|
return self._truncate_str(str(value))
|
|
268
281
|
|
|
269
|
-
def sanitize(self, value: Any, key: Any = None) -> Any:
|
|
270
|
-
"""对外入口。未启用时直接原样返回(含 Decimal/datetime 规整)。
|
|
282
|
+
def sanitize(self, value: Any, key: Any = None, full: bool = False) -> Any:
|
|
283
|
+
"""对外入口。未启用时直接原样返回(含 Decimal/datetime 规整)。
|
|
284
|
+
|
|
285
|
+
full=True 语义见 _sanitize_value —— 展示全量不折叠(SQL 参数用)。
|
|
286
|
+
"""
|
|
271
287
|
if not self.enabled:
|
|
272
288
|
return _normalize_scalar_only(value)
|
|
273
|
-
result = self._sanitize_value(value, key, depth=0)
|
|
289
|
+
result = self._sanitize_value(value, key, depth=0, full=full)
|
|
274
290
|
# 顶层不允许返回 _DROP
|
|
275
291
|
if result is _DROP:
|
|
276
292
|
return None
|
|
@@ -346,11 +362,53 @@ class LogMasker(metaclass=SingletonMeta):
|
|
|
346
362
|
return False
|
|
347
363
|
|
|
348
364
|
def serialize_params(self, params: Any) -> Any:
|
|
349
|
-
"""SQL 参数序列化入口:脱敏 + Decimal/datetime
|
|
365
|
+
r"""SQL 参数序列化入口:脱敏 + Decimal/datetime 规整 + \u 展示解码。
|
|
350
366
|
|
|
351
367
|
供 sql_logger / async_sql_logger 复用,替代原先两处重复实现。
|
|
368
|
+
full=True 全量展示: 参数值不按 maxLength 折叠(截断会把 \uXXXX 转义对
|
|
369
|
+
从中间切断,展示解码后残留悬空 \u 片段;且 SQL 排障要看完整参数,
|
|
370
|
+
2026-10-16 用户明确要求不折叠)。字段级脱敏照常,maxSize 整条防线
|
|
371
|
+
在 _log 收口仍兜底(防 Kafka 单条超限)。
|
|
372
|
+
"""
|
|
373
|
+
cleaned = self.sanitize(params, full=True)
|
|
374
|
+
return self._decode_escaped_tree(cleaned)
|
|
375
|
+
|
|
376
|
+
def _decode_escaped_tree(self, value: Any) -> Any:
|
|
377
|
+
"""递归对树内所有字符串叶子做 \\uXXXX 展示解码。"""
|
|
378
|
+
if isinstance(value, str):
|
|
379
|
+
return self._decode_escaped_unicode(value)
|
|
380
|
+
if isinstance(value, dict):
|
|
381
|
+
return {k: self._decode_escaped_tree(v) for k, v in value.items()}
|
|
382
|
+
if isinstance(value, (list, tuple)):
|
|
383
|
+
return [self._decode_escaped_tree(v) for v in value]
|
|
384
|
+
return value
|
|
385
|
+
|
|
386
|
+
_ESCAPED_UNICODE_RE = re.compile(r"\\u([0-9a-fA-F]{4})")
|
|
387
|
+
|
|
388
|
+
def _decode_escaped_unicode(self, value: Any) -> Any:
|
|
389
|
+
"""字符串值内的 \\uXXXX 转义解码为可读中文(展示层修复)。
|
|
390
|
+
|
|
391
|
+
SQLAlchemy JSON 列绑定参数时 json.dumps 默认 ensure_ascii=True —
|
|
392
|
+
中文以 \\u660e\\u786e 形态入库/入参数;SQL 日志如实展示导致平台
|
|
393
|
+
不可读(2026-10-16 wxcoach ext_json 实测)。只解码【字符串叶子】。
|
|
394
|
+
|
|
395
|
+
按对替换而非整串 unicode_escape: 真实参数里混有非法转义对
|
|
396
|
+
(如截断的 \\u4fd\\ 后跟引号)时,整串 decode 抛异常 → 原样返回,
|
|
397
|
+
合法对也全留下(17:59 ext_json 仍全编码的根因)。逐对处理:
|
|
398
|
+
合法 4 位十六进制对解码,非法序列(含字面 \\\\u)原样保留。
|
|
352
399
|
"""
|
|
353
|
-
|
|
400
|
+
if not isinstance(value, str) or "\\u" not in value:
|
|
401
|
+
return value
|
|
402
|
+
if not value.isascii():
|
|
403
|
+
return value # 已含可读中文,无需也不应再动
|
|
404
|
+
|
|
405
|
+
def _sub(m: "re.Match[str]") -> str:
|
|
406
|
+
try:
|
|
407
|
+
return chr(int(m.group(1), 16))
|
|
408
|
+
except Exception:
|
|
409
|
+
return m.group(0)
|
|
410
|
+
|
|
411
|
+
return self._ESCAPED_UNICODE_RE.sub(_sub, value)
|
|
354
412
|
|
|
355
413
|
def mask_placeholder(self, value: Any) -> str:
|
|
356
414
|
"""整条掩码占位:命中 maskLinePatterns 时,把 message 正文替换为此占位。
|
|
@@ -6,9 +6,15 @@ def setup_logger_levels():
|
|
|
6
6
|
# Nacos 客户端:仅输出WARNING及以上(屏蔽INFO级的心跳/注册日志)
|
|
7
7
|
logging.getLogger("nacos.client").setLevel(logging.WARNING)
|
|
8
8
|
|
|
9
|
-
# Kafka Python客户端:屏蔽INFO
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
# Kafka Python客户端:屏蔽INFO级的连接/版本检测日志。
|
|
10
|
+
# kafka.* 整族压到 ERROR(2026-10-14 生产事故复盘):故障期间库自身持续打
|
|
11
|
+
# WARNING——retention 型 UnknownProducerIdError 风暴(每秒多条)、selector
|
|
12
|
+
# 慢任务看门狗(kafka.net.selector)、批次过期——经 stdlib root 桥接回灌
|
|
13
|
+
# loguru 后又要发往同一个正在故障的 topic,形成放大回路。这些 WARNING 的
|
|
14
|
+
# 价值在 ERR 都有(sender 线程崩溃/批次最终失败),全部静音。
|
|
15
|
+
for _name in ("kafka", "kafka.net", "kafka.net.selector",
|
|
16
|
+
"kafka.net.connection", "kafka.producer"):
|
|
17
|
+
logging.getLogger(_name).setLevel(logging.ERROR)
|
|
12
18
|
|
|
13
19
|
# Uvicorn/FastAPI:屏蔽启动/应用初始化的INFO日志(保留ERROR/WARNING)
|
|
14
20
|
# logging.getLogger("uvicorn").setLevel(logging.WARNING)
|
{sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/logging/sql_logger.py
RENAMED
|
@@ -2,6 +2,7 @@ from sqlalchemy import event
|
|
|
2
2
|
from sqlalchemy.engine import Engine
|
|
3
3
|
from sycommon.logging.kafka_log import SYLogger
|
|
4
4
|
from sycommon.logging.log_masker import masker as _log_masker
|
|
5
|
+
import json
|
|
5
6
|
import time
|
|
6
7
|
|
|
7
8
|
|
|
@@ -28,7 +29,7 @@ class SQLTraceLogger:
|
|
|
28
29
|
"execution_time_ms": round(execution_time, 2),
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
SYLogger.info(f"SQL执行: {sql_log}")
|
|
32
|
+
SYLogger.info(f"SQL执行: {json.dumps(sql_log, ensure_ascii=False, default=str)}")
|
|
32
33
|
except Exception as e:
|
|
33
34
|
SYLogger.error(f"SQL日志处理失败: {str(e)}")
|
|
34
35
|
|
{sycommon_python_lib-0.2.10a11 → sycommon_python_lib-0.2.10a13}/src/sycommon/middleware/traceid.py
RENAMED
|
@@ -211,6 +211,26 @@ def setup_trace_id_handler(app):
|
|
|
211
211
|
}
|
|
212
212
|
# 直接传 dict:由 SYLogger._log 统一走 LogMasker 脱敏/裁剪
|
|
213
213
|
# (此前先 json.dumps 成字符串,会绕过按字段名的脱敏,导致大字段原样落盘)
|
|
214
|
+
# 🔑 2026-10-16 路由级定位(对齐 go-lib alpha.28 handlerFields):
|
|
215
|
+
# BaseHTTPMiddleware 的 call_next 起 task,handler 帧与中间件闭包
|
|
216
|
+
# 栈不连续(协程边界,同 Go goroutine 断栈)— 栈解析到不了业务帧。
|
|
217
|
+
# request.scope["route"] 是路由匹配的请求级事实,跨协程稳定。
|
|
218
|
+
_handler_ctx = {}
|
|
219
|
+
_route = request.scope.get("route")
|
|
220
|
+
_ep = getattr(_route, "endpoint", None) if _route else None
|
|
221
|
+
_route_path = getattr(_route, "path", "") or request.scope.get("path", "")
|
|
222
|
+
if _ep is not None:
|
|
223
|
+
_ep_mod = getattr(_ep, "__module__", "") or ""
|
|
224
|
+
_pkg = "/".join(_ep_mod.split(".")[-2:]) if _ep_mod else ""
|
|
225
|
+
_handler_ctx["handler"] = f"{_ep_mod}.{getattr(_ep, '__name__', '')} (PATH {_route_path})"
|
|
226
|
+
if _pkg:
|
|
227
|
+
_handler_ctx["handler_pkg"] = _pkg
|
|
228
|
+
request_message["handler"] = _handler_ctx["handler"]
|
|
229
|
+
if _pkg:
|
|
230
|
+
request_message["handler_pkg"] = _pkg
|
|
231
|
+
else:
|
|
232
|
+
_handler_ctx["handler"] = ""
|
|
233
|
+
_handler_ctx["handler_pkg"] = ""
|
|
214
234
|
SYLogger.info(request_message)
|
|
215
235
|
|
|
216
236
|
# 标记位:默认认为会发生异常
|
|
@@ -435,6 +455,22 @@ def setup_trace_id_handler(app):
|
|
|
435
455
|
"response_body": response_log_body,
|
|
436
456
|
}
|
|
437
457
|
# response_body 已是字符串:交给 SYLogger 的 mask_string 兜底截断(maxSize)
|
|
458
|
+
# 🔑 路由级定位(2026-10-16,对齐 go-lib alpha.28 handlerFields):
|
|
459
|
+
# BaseHTTPMiddleware 在路由匹配**之前**执行,request 段
|
|
460
|
+
# scope["route"] 为空;call_next 返回后 scope 已被下游填充 —
|
|
461
|
+
# 在此重读 scope 拿 endpoint(协程断栈链的稳定业务定位)。
|
|
462
|
+
_route = request.scope.get("route")
|
|
463
|
+
_ep = getattr(_route, "endpoint", None) if _route else None
|
|
464
|
+
_route_path = getattr(_route, "path", "") or request.scope.get("path", "")
|
|
465
|
+
if _ep is not None:
|
|
466
|
+
_ep_mod = getattr(_ep, "__module__", "") or ""
|
|
467
|
+
_pkg = "/".join(_ep_mod.split(".")[-2:]) if _ep_mod else ""
|
|
468
|
+
response_message["handler"] = (
|
|
469
|
+
f"{_ep_mod}.{getattr(_ep, '__name__', '')} (PATH {_route_path})")
|
|
470
|
+
if _pkg:
|
|
471
|
+
response_message["handler_pkg"] = _pkg
|
|
472
|
+
elif _handler_ctx.get("handler"):
|
|
473
|
+
response_message["handler"] = _handler_ctx["handler"]
|
|
438
474
|
SYLogger.info(response_message)
|
|
439
475
|
|
|
440
476
|
# 兜底:确保 Header 必有 TraceId
|