@@ -270,9 +270,9 @@ def event_processor(self, event, hint, asgi_scope):
270270 already_set = event ["transaction" ] != _DEFAULT_TRANSACTION_NAME and event [
271271 "transaction_info"
272272 ].get ("source" ) in [
273- TransactionSource .COMPONENT . value ,
274- TransactionSource .ROUTE . value ,
275- TransactionSource .CUSTOM . value ,
273+ TransactionSource .COMPONENT ,
274+ TransactionSource .ROUTE ,
275+ TransactionSource .CUSTOM ,
276276 ]
277277 if not already_set :
278278 name , source = self ._get_transaction_name_and_source (
@@ -310,7 +310,7 @@ def _get_transaction_name_and_source(self, transaction_style, asgi_scope):
310310 name = transaction_from_function (endpoint ) or ""
311311 else :
312312 name = _get_url (asgi_scope , "http" if ty == "http" else "ws" , host = None )
313- source = TransactionSource .URL . value
313+ source = TransactionSource .URL
314314
315315 elif transaction_style == "url" :
316316 # FastAPI includes the route object in the scope to let Sentry extract the
@@ -322,11 +322,11 @@ def _get_transaction_name_and_source(self, transaction_style, asgi_scope):
322322 name = path
323323 else :
324324 name = _get_url (asgi_scope , "http" if ty == "http" else "ws" , host = None )
325- source = TransactionSource .URL . value
325+ source = TransactionSource .URL
326326
327327 if name is None :
328328 name = _DEFAULT_TRANSACTION_NAME
329- source = TransactionSource .ROUTE . value
329+ source = TransactionSource .ROUTE
330330 return name , source
331331
332332 return name , source
0 commit comments