File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,13 @@ def track(
4444 evaluation_context : typing .Optional [EvaluationContext ] = None ,
4545 tracking_event_details : typing .Optional [TrackingEventDetails ] = None ,
4646 ) -> None :
47+ """
48+ Records a custom event via the Flagsmith client's pipeline analytics.
49+
50+ No-ops if the client lacks pipeline analytics support or configuration.
51+ An explicit ``tracking_event_details.value`` overrides any same-named
52+ key in ``attributes``.
53+ """
4754 # Guard against older flagsmith versions or duck-typed clients
4855 # that don't have track_event.
4956 if not hasattr (self ._client , "track_event" ):
@@ -68,6 +75,8 @@ def track(
6875 metadata = metadata ,
6976 )
7077 except ValueError :
78+ # Flagsmith raises ValueError when pipeline analytics is not
79+ # configured; OpenFeature spec requires track() to no-op.
7180 return
7281
7382 def get_metadata (self ) -> Metadata :
You can’t perform that action at this time.
0 commit comments