Skip to content

Python: Improve sample logging#2692

Merged
moonbox3 merged 1 commit intomicrosoft:mainfrom
moonbox3:improve-logging-sample
Dec 8, 2025
Merged

Python: Improve sample logging#2692
moonbox3 merged 1 commit intomicrosoft:mainfrom
moonbox3:improve-logging-sample

Conversation

@moonbox3
Copy link
Contributor

@moonbox3 moonbox3 commented Dec 8, 2025

Motivation and Context

Improving sample logging.

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@moonbox3 moonbox3 self-assigned this Dec 8, 2025
Copilot AI review requested due to automatic review settings December 8, 2025 03:50
@moonbox3 moonbox3 added the python label Dec 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the security of logging output in the runtime context delegation sample by replacing the display of sensitive data with presence indicators and metadata.

Key Changes:

  • Sensitive data (API tokens, user IDs, tenant IDs) are now logged as [PRESENT] or [NOT PROVIDED] instead of showing partial or full values
  • User data (email addresses, subjects, messages) are now logged as metadata (character lengths, counts) instead of actual content
  • Session metadata now shows only keys instead of full dictionary values

@moonbox3 moonbox3 enabled auto-merge December 8, 2025 05:06
@moonbox3 moonbox3 added this pull request to the merge queue Dec 8, 2025
Merged via the queue into microsoft:main with commit c34af00 Dec 8, 2025
29 checks passed
arisng pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants