Skip to content

Commit

Permalink
Merge pull request #365 from Scale3-Labs/development
Browse files Browse the repository at this point in the history
Skip Instrumentations in case of errors to avoid blocking other vendors
  • Loading branch information
alizenhom authored Oct 1, 2024
2 parents 5273fdd + ba6ec56 commit 5627f2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/langtrace_python_sdk/langtrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ def init_instrumentations(
if disable_instrumentations is None:
for name, v in all_instrumentations.items():
if is_package_installed(name):
v.instrument()
try:
v.instrument()
except Exception as e:
print(f"Skipping {name} due to error while instrumenting: {e}")

else:

Expand All @@ -244,4 +247,7 @@ def init_instrumentations(

for name, v in filtered_dict.items():
if is_package_installed(name):
v.instrument()
try:
v.instrument()
except Exception as e:
print(f"Skipping {name} due to error while instrumenting: {e}")
2 changes: 1 addition & 1 deletion src/langtrace_python_sdk/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.3.22"
__version__ = "2.3.23"

0 comments on commit 5627f2c

Please sign in to comment.