diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py index a82aa1c1d3b..033720aa33f 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py @@ -997,7 +997,11 @@ def record_exception( ) module = type(exception).__module__ qualname = type(exception).__qualname__ - exception_type = f"{module}.{qualname}" if module and module != "builtins" else qualname + exception_type = ( + f"{module}.{qualname}" + if module and module != "builtins" + else qualname + ) _attributes: MutableMapping[str, types.AttributeValue] = { "exception.type": exception_type, "exception.message": str(exception),