-
Notifications
You must be signed in to change notification settings - Fork 8
Feature/exp telemetry #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[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
There was a problem hiding this 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
@@ -218,7 +224,7 @@ def _variant_name_to_variant(self, feature_flag: FeatureFlag, variant_name: Opti | |||
return Variant(variant_reference.name, variant_reference.configuration_value) | |||
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.
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.
Description
Contribution checklist:
General Guidelines and Best Practices