@@ -151,13 +151,13 @@ def _resolve_explicit(
151151 return {
152152 "provided_by_user" : True ,
153153 "user_info" : d .get ("user_info" , True ),
154- "cookies" : _kvcb_from_value (d .get ("cookies" , {}) ),
155- "http_headers" : _http_headers_from_value (d .get ("http_headers" , {}) ),
154+ "cookies" : _kvcb_from_value (d .get ("cookies" ) or {} ),
155+ "http_headers" : _http_headers_from_value (d .get ("http_headers" ) or {} ),
156156 "http_bodies" : http_bodies ,
157- "query_params" : _kvcb_from_value (d .get ("query_params" , {}) ),
158- "graphql" : _graphql_from_value (d .get ("graphql" , {}) ),
159- "gen_ai" : _gen_ai_from_value (d .get ("gen_ai" , {}) ),
160- "database" : _database_from_value (d .get ("database" , {}) ),
157+ "query_params" : _kvcb_from_value (d .get ("query_params" ) or {} ),
158+ "graphql" : _graphql_from_value (d .get ("graphql" ) or {} ),
159+ "gen_ai" : _gen_ai_from_value (d .get ("gen_ai" ) or {} ),
160+ "database" : _database_from_value (d .get ("database" ) or {} ),
161161 "stack_frame_variables" : stack_frame_variables ,
162162 "frame_context_lines" : frame_context_lines ,
163163 }
@@ -234,8 +234,16 @@ def resolve_data_collection(options: "Dict[str, Any]") -> "DataCollection":
234234 user_dc = options .get ("data_collection" )
235235 send_default_pii = options .get ("send_default_pii" )
236236
237- include_local_variables = options .get ("include_local_variables" , True )
238- include_source_context = options .get ("include_source_context" , True )
237+ include_local_variables = (
238+ bool (options .get ("include_local_variables" ))
239+ if options .get ("include_local_variables" ) is not None
240+ else True
241+ )
242+ include_source_context = (
243+ bool (options .get ("include_source_context" ))
244+ if options .get ("include_source_context" ) is not None
245+ else True
246+ )
239247
240248 if user_dc is not None :
241249 if not isinstance (user_dc , dict ):
0 commit comments