Skip to content

Commit

Permalink
fix: re-enabled skipping over native logrecord attributes again that …
Browse files Browse the repository at this point in the history
…aren't covered by a semantic convention and ran black
  • Loading branch information
a-recknagel committed Jul 4, 2024
1 parent 0552590 commit 79ce99a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
_DEFAULT_OTEL_ATTRIBUTE_COUNT_LIMIT = 128
_ENV_VALUE_UNSET = ""
_EXCLUDED_ATTRIBUTES = {
# pseudo-private log-record attributes, they just get dropped
# pseudo-private log-record attributes, they should always be dropped
"args",
"msg",
"message",
Expand All @@ -71,6 +71,19 @@
"lineno",
"thread",
"threadName",
# attributes that are omitted because no semantic convention exists for them yet
"asctime",
"created",
"filename",
"levelname",
"levelno",
"module",
"msecs",
"name",
"process",
"processName",
"relativeCreated",
"taskName",
}


Expand Down
14 changes: 2 additions & 12 deletions opentelemetry-sdk/tests/logs/test_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,20 +255,10 @@ def test_log_record_args_are_translated(self):
self.assertEqual(
set(log_record.attributes),
{
"thread.id",
"code.filepath",
"code.function",
"code.lineno",
"created",
"filename",
"levelname",
"levelno",
"module",
"msecs",
"name",
"process",
"processName",
"relativeCreated",
"thread.id",
"code.function",
"thread.name",
},
)
Expand Down

0 comments on commit 79ce99a

Please sign in to comment.