@@ -161,9 +161,7 @@ async def async_wrapper(*args, **kwargs):
161161def _opentelemetry_method_span (cls ):
162162 for name , value in cls .__dict__ .items ():
163163 if callable (value ) and not name .startswith ("_" ):
164- setattr (
165- cls , name , _opentelemetry_function_span (value )
166- ) # Apply the decorator
164+ setattr (cls , name , _opentelemetry_function_span (value ))
167165 return cls
168166
169167
@@ -172,7 +170,6 @@ def __init__(self, loader: Loader):
172170 self .loader = loader
173171
174172 def exec_module (self , module : ModuleType ):
175- # Execute the module normally
176173 self .loader .exec_module (module )
177174 for name , func in inspect .getmembers (module , inspect .isfunction ):
178175 if name in module .__dict__ :
@@ -190,13 +187,10 @@ def find_spec(
190187 target : ModuleType | None = None ,
191188 ) -> ModuleSpec | None :
192189 if fullname .startswith ("simcore_service" ):
193- # Find the original spec
194190 spec = importlib .machinery .PathFinder .find_spec (
195191 fullname = fullname , path = path
196192 )
197- # spec = find_spec(fullname, path)
198193 if spec and spec .loader :
199- # Wrap the loader with our DecoratingLoader
200194 spec .loader = _AddTracingSpansLoader (spec .loader )
201195 return spec
202196
0 commit comments