Skip to content

Commit

Permalink
Switched to using BoundedAttributes as per open-telemetry#3114
Browse files Browse the repository at this point in the history
  • Loading branch information
nstawski committed May 10, 2023
1 parent 3732fd4 commit 3fd450d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
get_logger_provider,
std_to_otel,
)
from opentelemetry.attributes import BoundedAttributes
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.util import ns_to_iso_str
from opentelemetry.sdk.util.instrumentation import InstrumentationScope
Expand Down Expand Up @@ -334,9 +335,9 @@ def __init__(

@staticmethod
def _get_attributes(record: logging.LogRecord) -> Attributes:
attributes = {
attributes = BoundedAttributes({
k: v for k, v in vars(record).items() if k not in _RESERVED_ATTRS
}
})
if record.exc_info:
exc_type = ""
message = ""
Expand Down

0 comments on commit 3fd450d

Please sign in to comment.