Skip to content

Commit

Permalink
Handle specific ModuleNotFoundError exceptions gracefully
Browse files Browse the repository at this point in the history
Signed-off-by: hansrajr <[email protected]>
  • Loading branch information
Hansrajr committed Jan 6, 2025
1 parent a0ece17 commit 188e023
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/monocle_apptrace/instrumentation/common/instrumentor.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def _instrument(self, **kwargs):
wrapped_by(tracer, handler, method_config),
)
self.instrumented_method_list.append(method_config)
except ModuleNotFoundError as e:
pass

except Exception as ex:
logger.error(f"""_instrument wrap Exception: {str(ex)}
for package: {target_package},
Expand Down

0 comments on commit 188e023

Please sign in to comment.