Skip to content

Conversation

@mrm9084
Copy link
Contributor

@mrm9084 mrm9084 commented Apr 24, 2025

Description

  • Adds EXP fields
  • TargetingSpanProcessor

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.
  • Pull request includes test coverage for the included changes.

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.

mrm9084 and others added 6 commits February 3, 2025 14:28
* Added Accessor with comments

* comment and format change

* fixing log

* fixing log length

* async version with tests

* fix test and pylint issue

* Update featuremanagement/aio/_featuremanager.py

Co-authored-by: Ross Grambo <[email protected]>

* Update _featuremanager.py

---------

Co-authored-by: Ross Grambo <[email protected]>
* New OTel Integration

* fixing issues

* pylint fixes

* fixing mypy issues

* Update _send_telemetry.py

* Update _send_telemetry.py

* Update dev_requirements.txt

* fixing checks

* Update _send_telemetry.py

* Update _send_telemetry.py

* trying mypy fix

* Update _send_telemetry.py

* Update to use accessor

* remove attach_targeting_info

* added tests

* Adding Quart sample

* Added otel to quart sample

* Update requirements.txt
Copy link

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 introduces telemetry enhancements and enhanced targeting support for feature flag evaluation. Key changes include adding tests for telemetry and targeting span processing, asynchronous support for targeting accessor in FeatureManager, and version updates reflected in setup files and documentation.

Reviewed Changes

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

Show a summary per file
File Description
tests/test_send_telemetry_appinsights.py Added tests for telemetry publishing and TargetingSpanProcessor behavior.
tests/test_default_feature_flags_async.py & test_default_feature_flags.py Added tests verifying targeting accessor behavior in async and sync flows.
featuremanagement/azuremonitor/_send_telemetry.py Updated telemetry payloads and introduced TargetingSpanProcessor.
featuremanagement/(aio/) _featuremanager.py and _featuremanagerbase.py Introduced async targeting accessor support and adjusted build logic.
setup.py & _version.py Updated version and development status indicators.
samples/ Added sample applications demonstrating new telemetry and targeting usage.
dev_requirements.txt Added dependencies for opentelemetry.
Files not reviewed (2)
  • samples/formatted_feature_flags.json: Language not supported
  • samples/requirements.txt: Language not supported
Comments suppressed due to low confidence (1)

tests/test_send_telemetry_appinsights.py:209

  • The assertion 'assert "" in caplog.text' does not validate meaningful log output. Update this check to assert a specific expected log message to improve test accuracy.
assert "" in caplog.text

return None

def _build_targeting_context(self, args: Tuple[Any]) -> TargetingContext:
def _build_targeting_context(self, args: Tuple[Any]) -> Optional[TargetingContext]:
Copy link

Copilot AI Apr 24, 2025

Choose a reason for hiding this comment

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

Changing the return type from TargetingContext to Optional[TargetingContext] may lead to unexpected None values in downstream calls. Consider returning an empty TargetingContext() as a fallback to ensure consistency.

Copilot uses AI. Check for mistakes.
@mrm9084 mrm9084 requested a review from rossgrambo April 24, 2025 16:14
@mrm9084 mrm9084 merged commit 4a88b06 into main Apr 24, 2025
6 checks passed
@mrm9084 mrm9084 deleted the feature/exp-telemetry branch April 24, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants