Skip to content

Commit 5627f2c

Browse files
authored
Merge pull request #365 from Scale3-Labs/development
Skip Instrumentations in case of errors to avoid blocking other vendors
2 parents 5273fdd + ba6ec56 commit 5627f2c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/langtrace_python_sdk/langtrace.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@ def init_instrumentations(
222222
if disable_instrumentations is None:
223223
for name, v in all_instrumentations.items():
224224
if is_package_installed(name):
225-
v.instrument()
225+
try:
226+
v.instrument()
227+
except Exception as e:
228+
print(f"Skipping {name} due to error while instrumenting: {e}")
226229

227230
else:
228231

@@ -244,4 +247,7 @@ def init_instrumentations(
244247

245248
for name, v in filtered_dict.items():
246249
if is_package_installed(name):
247-
v.instrument()
250+
try:
251+
v.instrument()
252+
except Exception as e:
253+
print(f"Skipping {name} due to error while instrumenting: {e}")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.3.22"
1+
__version__ = "2.3.23"

0 commit comments

Comments
 (0)