Skip to content

Commit 9ab6c5b

Browse files
committed
Use correct error name
1 parent 596a4d5 commit 9ab6c5b

File tree

1 file changed

+2
-2
lines changed
  • instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2

1 file changed

+2
-2
lines changed

instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def traced_method(wrapped, instance, args, kwargs):
8080
return result
8181

8282
except Exception as error:
83-
error_type = type(error).__name__
83+
error_type = type(error).__qualname__
8484
handle_span_exception(span, error)
8585
raise
8686
finally:
@@ -138,7 +138,7 @@ async def traced_method(wrapped, instance, args, kwargs):
138138
return result
139139

140140
except Exception as error:
141-
error_type = type(error).__name__
141+
error_type = type(error).__qualname__
142142
handle_span_exception(span, error)
143143
raise
144144
finally:

0 commit comments

Comments
 (0)