File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
opentelemetry-instrumentation/src/opentelemetry/instrumentation Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ def _load_instrumentors(distro):
7171 continue
7272
7373 try :
74- distro .load_instrumentor (entry_point )
74+ distro .load_instrumentor (
75+ entry_point , raise_exception_on_conflict = True
76+ )
7577 _logger .debug ("Instrumented %s" , entry_point .name )
7678 except DependencyConflictError as exc :
7779 _logger .debug (
Original file line number Diff line number Diff line change @@ -105,11 +105,16 @@ def instrument(self, **kwargs: Any):
105105
106106 # check if instrumentor has any missing or conflicting dependencies
107107 skip_dep_check = kwargs .pop ("skip_dep_check" , False )
108+ raise_exception_on_conflict = kwargs .pop (
109+ "raise_exception_on_conflict" , False
110+ )
108111 if not skip_dep_check :
109112 conflict = self ._check_dependency_conflicts ()
110113 if conflict :
111114 _LOG .error (conflict )
112- raise DependencyConflictError (conflict )
115+ if raise_exception_on_conflict :
116+ raise DependencyConflictError (conflict )
117+ return None
113118
114119 # initialize semantic conventions opt-in if needed
115120 _OpenTelemetrySemanticConventionStability ._initialize ()
You can’t perform that action at this time.
0 commit comments