Skip to content

Commit 338b37a

Browse files
author
Arne Caratti
committed
changed exclusion logic slightly
1 parent d8661a4 commit 338b37a

File tree

1 file changed

+8
-2
lines changed
  • opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal

1 file changed

+8
-2
lines changed

opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,17 @@ def __init__(
421421

422422
@staticmethod
423423
def _get_attributes(record: logging.LogRecord) -> Attributes:
424-
private_record_attrs = ("args", "msg", "stack_info", "exc_info")
424+
private_record_attrs = (
425+
"args",
426+
"msg",
427+
"stack_info",
428+
"exc_info",
429+
"exc_text",
430+
)
425431
attributes = {
426432
k: v
427433
for k, v in vars(record).items()
428-
if k not in private_record_attrs and v is not None
434+
if k not in private_record_attrs
429435
}
430436
if record.exc_info:
431437
exc_type = ""

0 commit comments

Comments
 (0)