From 31115865c18c3d3c656516905bfe82f6efe1609e Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 6 Nov 2024 14:13:16 +0100 Subject: [PATCH] Add more jaeger spans in Python setup --- src/pyodide/internal/python.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pyodide/internal/python.ts b/src/pyodide/internal/python.ts index 3fd959690a9..b036b5f2886 100644 --- a/src/pyodide/internal/python.ts +++ b/src/pyodide/internal/python.ts @@ -62,10 +62,12 @@ async function prepareWasmLinearMemory(Module: Module): Promise { mountSitePackages(Module, SITE_PACKAGES.rootInfo); entropyMountFiles(Module); Module.noInitialRun = !SHOULD_RESTORE_SNAPSHOT; - preloadDynamicLibs(Module); - Module.removeRunDependency('dynlibs'); + enterJaegerSpan('preload_dynamic_libs', () => preloadDynamicLibs(Module)); + enterJaegerSpan('remove_run_dependency', () => + Module.removeRunDependency('dynlibs') + ); if (SHOULD_RESTORE_SNAPSHOT) { - restoreSnapshot(Module); + enterJaegerSpan('restore_snapshot', () => restoreSnapshot(Module)); // Invalidate caches if we have a snapshot because the contents of site-packages // may have changed. simpleRunPython(