Skip to content

Commit ef21fd6

Browse files
committed
minor cleanup
1 parent b0ec0f9 commit ef21fd6

File tree

1 file changed

+1
-7
lines changed
  • packages/service-library/src/servicelib/fastapi

1 file changed

+1
-7
lines changed

packages/service-library/src/servicelib/fastapi/tracing.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ async def async_wrapper(*args, **kwargs):
161161
def _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

Comments
 (0)