@@ -11,11 +11,11 @@ class SplitClient
1111 #
1212 # Creates a new split client instance that connects to split.io API.
1313 #
14- # @param api_key [String] the API key for your split account
14+ # @param sdk_key [String] the SDK key for your split account
1515 #
1616 # @return [SplitIoClient] split.io client instance
17- def initialize ( api_key , repositories , status_manager , config , impressions_manager , telemetry_evaluation_producer )
18- @api_key = api_key
17+ def initialize ( sdk_key , repositories , status_manager , config , impressions_manager , telemetry_evaluation_producer )
18+ @api_key = sdk_key
1919 @splits_repository = repositories [ :splits ]
2020 @segments_repository = repositories [ :segments ]
2121 @impressions_repository = repositories [ :impressions ]
@@ -103,8 +103,8 @@ def track(key, traffic_type_name, event_type, value = nil, properties = nil)
103103
104104 if ready? && !@config . localhost_mode && !@splits_repository . traffic_type_exists ( traffic_type_name )
105105 @config . logger . warn ( "track: Traffic Type #{ traffic_type_name } " \
106- "does not have any corresponding Splits in this environment, make sure you're tracking " \
107- 'your events to a valid traffic type defined in the Split console ' )
106+ "does not have any corresponding feature flags in this environment, make sure you're tracking " \
107+ 'your events to a valid traffic type defined in the Split user interface ' )
108108 end
109109
110110 @events_repository . add ( key . to_s , traffic_type_name . downcase , event_type . to_s , ( Time . now . to_f * 1000 ) . to_i , value , properties , properties_size )
@@ -147,10 +147,10 @@ def sanitize_split_names(calling_method, split_names)
147147 if ( split_name . is_a? ( String ) || split_name . is_a? ( Symbol ) ) && !split_name . empty?
148148 true
149149 elsif split_name . is_a? ( String ) && split_name . empty?
150- @config . logger . warn ( "#{ calling_method } : you passed an empty split_name, split_name must be a non-empty String or a Symbol" )
150+ @config . logger . warn ( "#{ calling_method } : you passed an empty feature_flag_name, flag name must be a non-empty String or a Symbol" )
151151 false
152152 else
153- @config . logger . warn ( "#{ calling_method } : you passed an invalid split_name, split_name must be a non-empty String or a Symbol" )
153+ @config . logger . warn ( "#{ calling_method } : you passed an invalid feature_flag_name, flag name must be a non-empty String or a Symbol" )
154154 false
155155 end
156156 end
@@ -200,7 +200,7 @@ def treatments(key, split_names, attributes = {}, calling_method = 'get_treatmen
200200 sanitized_split_names = sanitize_split_names ( calling_method , split_names )
201201
202202 if sanitized_split_names . empty?
203- @config . logger . error ( "#{ calling_method } : split_names must be a non-empty Array" )
203+ @config . logger . error ( "#{ calling_method } : feature_flag_names must be a non-empty Array" )
204204 return { }
205205 end
206206
@@ -258,7 +258,7 @@ def treatment(
258258 sanitized_split_name = split_name . to_s . strip
259259
260260 if split_name . to_s != sanitized_split_name
261- @config . logger . warn ( "#{ calling_method } : split_name #{ split_name } has extra whitespace, trimming" )
261+ @config . logger . warn ( "#{ calling_method } : feature_flag_name #{ split_name } has extra whitespace, trimming" )
262262 split_name = sanitized_split_name
263263 end
264264
@@ -271,7 +271,7 @@ def treatment(
271271
272272 if split . nil? && ready?
273273 @config . logger . warn ( "#{ calling_method } : you passed #{ split_name } that " \
274- 'does not exist in this environment, please double check what Splits exist in the web console ' )
274+ 'does not exist in this environment, please double check what feature flags exist in the Split user interface ' )
275275
276276 return parsed_treatment ( multiple , control_treatment . merge ( { label : Engine ::Models ::Label ::NOT_FOUND } ) )
277277 end
0 commit comments