MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / map_request_to_labels

Function map_request_to_labels

api/app_analytics/mappers.py:170–182  ·  view source on GitHub ↗
(request: HttpRequest)

Source from the content-addressed store, hash-verified

168
169
170def map_request_to_labels(request: HttpRequest) -> Labels:
171 if not get_openfeature_client().get_boolean_value(
172 "sdk_metrics_labels",
173 default_value=False,
174 ):
175 return {}
176 input_labels: InputLabels = _RequestHeaderLabelsModel.model_validate(
177 request.headers,
178 ).model_dump(
179 exclude_unset=True,
180 exclude_none=True,
181 )
182 return map_input_labels_to_labels(input_labels)
183
184
185def map_feature_evaluation_cache_to_track_feature_evaluations_by_environment_kwargs(

Callers 2

__call__Method · 0.90
saveMethod · 0.90

Calls 2

get_openfeature_clientFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…