Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion featuremanagement/azuremonitor/_send_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def __init__(self, **kwargs: Any) -> None:
"targeting_context_accessor", None
)

def on_start(self, span: Span, parent_context: Optional[Context] = None) -> None:
def on_start(self, span: Span, parent_context: Optional[Context] = None) -> None: # pylint: disable=unused-argument
"""
Attaches the targeting ID to the span and baggage when a new span is started.

Expand Down
7 changes: 4 additions & 3 deletions samples/feature_variant_sample_with_targeting_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
with open(script_directory + "/formatted_feature_flags.json", "r", encoding="utf-8") as f:
feature_flags = json.load(f)

USER_ID = "Adam"
# pylint: disable=invalid-name
user_id = "Adam"


def my_targeting_accessor() -> TargetingContext:
return TargetingContext(user_id=USER_ID)
return TargetingContext(user_id=user_id)


feature_manager = FeatureManager(
Expand All @@ -30,7 +31,7 @@ def my_targeting_accessor() -> TargetingContext:
print(feature_manager.is_enabled("TestVariants"))
print(feature_manager.get_variant("TestVariants").configuration)

USER_ID = "Ellie"
user_id = "Ellie"

print(feature_manager.is_enabled("TestVariants"))
print(feature_manager.get_variant("TestVariants").configuration)