@@ -356,49 +356,6 @@ def __exit__(self, exc_type, exc_val, exc_tb):
356356
357357 super ().__exit__ (exc_type , exc_val , exc_tb )
358358
359- def __exit__ (self , exc_type , exc_val , exc_tb ):
360- """
361- Ends context manager and calls `end` on the `Span`.
362- This is used when span is called as a context manager
363- i.e. `with tracer.start_span() as span:`
364- """
365- if exc_val and self .is_recording ():
366- if self ._record_exception :
367- self .record_exception (exception = exc_val , escaped = True )
368- if self .set_status_on_exception :
369- self .set_status (Status (status_code = StatusCode .ERROR , description = f"{ exc_type .__name__ } : { exc_val } " ))
370-
371- super ().__exit__ (exc_type , exc_val , exc_tb )
372-
373- def __exit__ (self , exc_type , exc_val , exc_tb ):
374- """
375- Ends context manager and calls `end` on the `Span`.
376- This is used when span is called as a context manager
377- i.e. `with tracer.start_span() as span:`
378- """
379- if exc_val and self .is_recording ():
380- if self ._record_exception :
381- self .record_exception (exception = exc_val , escaped = True )
382- if self .set_status_on_exception :
383- self .set_status (Status (status_code = StatusCode .ERROR , description = f"{ exc_type .__name__ } : { exc_val } " ))
384-
385- super ().__exit__ (exc_type , exc_val , exc_tb )
386-
387- def __exit__ (self , exc_type , exc_val , exc_tb ):
388- """
389- Ends context manager and calls `end` on the `Span`.
390- This is used when span is called as a context manager
391- i.e. `with tracer.start_span() as span:`
392- """
393- if exc_val and self .is_recording ():
394- if self ._record_exception :
395- self .record_exception (exception = exc_val , escaped = True )
396- if self .set_status_on_exception :
397- self .set_status (Status (status_code = StatusCode .ERROR , description = f"{ exc_type .__name__ } : { exc_val } " ))
398-
399- super ().__exit__ (exc_type , exc_val , exc_tb )
400-
401-
402359class Tracer (otel_api_trace .Tracer ):
403360 def __init__ (self , resource = None , instrumentation_library = None , * args , ** kwargs ):
404361 self .resource = resource
0 commit comments