Skip to content

Conversation

@mrm9084
Copy link
Member

@mrm9084 mrm9084 commented Oct 23, 2025

Description

  • Moves Request Tracing to it's own file.
  • General refactor to clean things up
  • Adding Usage for; telemetry, seed, and max variants
  • New option for tracking ai usage with azure-ai-foundry returns USE_AI

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings October 23, 2025 00:06
@mrm9084 mrm9084 requested a review from xiangyan99 as a code owner October 23, 2025 00:06
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 refactors request tracing functionality by extracting it into a dedicated _RequestTracingContext class, improving code organization and maintainability. The changes add telemetry tracking for feature flag usage patterns (seed, telemetry, max variants) and detection for AI foundry package usage.

Key Changes

  • Moved request tracing logic from _azureappconfigurationproviderbase.py to new _request_tracing_context.py file
  • Added tracking for feature flag usage patterns: seed usage, telemetry enablement, and max variants
  • Added detection for azure-ai-projects package to track AI usage
  • Updated all references from provider instance variables to _tracing_context properties

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
_request_tracing_context.py New file containing extracted and enhanced request tracing logic with _RequestTracingContext class
test_request_tracing_context.py Comprehensive test suite for the new _RequestTracingContext class
_azureappconfigurationproviderbase.py Refactored to use _RequestTracingContext instance, removed duplicated tracing code
test_azureappconfigurationproviderbase.py Updated tests to reflect refactored tracing context and removed obsolete test classes
_azureappconfigurationprovider.py Updated to access feature filter usage through _tracing_context
_azureappconfigurationproviderasync.py Updated async provider to access feature filter usage through _tracing_context
test_provider.py Updated assertions to access AI configuration flags through _tracing_context
test_async_provider.py Updated async test assertions to access AI configuration flags through _tracing_context
_constants.py Added new constants for feature flag telemetry tags
CHANGELOG.md Added entry for request tracing update

@github-actions github-actions bot added the App Configuration Azure.ApplicationModel.Configuration label Oct 23, 2025
mrm9084 and others added 2 commits November 10, 2025 11:24
…configuration/provider/_azureappconfigurationproviderbase.py

Co-authored-by: Ross Grambo <[email protected]>
@mrm9084 mrm9084 merged commit f6d99be into Azure:main Nov 10, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

App Configuration Azure.ApplicationModel.Configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants