diff --git a/src/OpenFeature/IFeatureClient.cs b/src/OpenFeature/IFeatureClient.cs index acf38804f..5ea19458a 100644 --- a/src/OpenFeature/IFeatureClient.cs +++ b/src/OpenFeature/IFeatureClient.cs @@ -55,8 +55,8 @@ public interface IFeatureClient : IEventBus /// Returns the current status of the associated provider. /// /// - ProviderStatus ProviderStatus { get; } - + ProviderStatus ProviderStatus { get; } + /// /// Resolves a boolean feature flag /// @@ -166,4 +166,13 @@ public interface IFeatureClient : IEventBus /// The . /// Resolved flag details Task> GetObjectDetailsAsync(string flagKey, Value defaultValue, EvaluationContext? context = null, FlagEvaluationOptions? config = null, CancellationToken cancellationToken = default); + + /// + /// Use this method to track user interactions and the application state. + /// + /// The name associated with this tracking event + /// The evaluation context used in the evaluation of the flag (optional) + /// Data pertinent to the tracking event (Optional) + /// When trackingEventName is null or empty + void Track(string trackingEventName, EvaluationContext? evaluationContext = default, TrackingEventDetails? trackingEventDetails = default); } diff --git a/src/OpenFeature/OpenFeatureClient.cs b/src/OpenFeature/OpenFeatureClient.cs index cc81f8838..c99f4f5c9 100644 --- a/src/OpenFeature/OpenFeatureClient.cs +++ b/src/OpenFeature/OpenFeatureClient.cs @@ -302,13 +302,7 @@ await hookRunner.TriggerFinallyHooksAsync(evaluation, options?.HookHints, cancel return evaluation; } - /// - /// Use this method to track user interactions and the application state. - /// - /// The name associated with this tracking event - /// The evaluation context used in the evaluation of the flag (optional) - /// Data pertinent to the tracking event (Optional) - /// When trackingEventName is null or empty + /// public void Track(string trackingEventName, EvaluationContext? evaluationContext = default, TrackingEventDetails? trackingEventDetails = default) { if (string.IsNullOrWhiteSpace(trackingEventName))