Conversation
* 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 <rossgrambo@microsoft.com> * Update _featuremanager.py --------- Co-authored-by: Ross Grambo <rossgrambo@microsoft.com>
* 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
There was a problem hiding this comment.
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]: |
There was a problem hiding this comment.
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.
rossgrambo
approved these changes
Apr 24, 2025
rossgrambo
approved these changes
Apr 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Contribution checklist:
General Guidelines and Best Practices