发布

  • [NA] [P SDK] Updating Anonymizer documentation and refactoring (#4072)

    frostbyte_neo 发布于 2025-11-17 12:58:53 +00:00

    • [NA] [P SDK] Extend RecursiveAnonymizer for nested data handling and document advanced anonymization scenarios
    • Enhanced RecursiveAnonymizer to support anonymization with field path tracking for nested structures, including arrays and dictionaries.
    • Added field_name and object_type context to anonymizers for more granular data processing.
    • Refactored encode_and_anonymize to integrate RecursiveAnonymizer and handle nested anonymization.
    • Introduced examples demonstrating advanced use cases like Microsoft Presidio integration and recursive rule support.
    • Updated documentation to include nested anonymization strategies, third-party PII tool integration, and context-aware data redaction.
    • Added unit and E2E tests covering multi-level dictionaries and lists.
    • [NA] [P SDK] Updated documentation

    • [NA] [P SDK] Replace generic object_type annotation with Literal for span/trace handling

    • Updated encode_and_anonymize and anonymize_encoded_obj to use Literal["span", "trace"] for stricter typing of object_type.
    • Refactored method calls to replace dynamic object_type with explicit string literals ("span" or "trace").
    • Adjusted documentation and corresponding tests to align with the updated object_type usage.
    • Improved code clarity and type safety by removing reliance on Any or type inference.
    • [NA] [P SDK] Fixed E2E test to properly handle new object_type logic

    • [NA] [P SDK] Changed workflow to use UV

    • [NA] [P SDK] Reverted to use standard setup-python action

    • [NA] [P SDK] Temporarily disable guardrails in E2E tests due to GitHub runner limitations

    • Commented out --guardrails command in SDK E2E test workflow to prevent storage issues.
    • Added module-level skip in test_guardrails.py with a reason for disabled guardrails.
    下载附件