According to OpenTelemetry conventions, when the same attribute key exists on both a LogRecord and its associated Resource, the LogRecord's attribute value should take precedence as it provides more specific context. The current implementation spreads log.resource?.attributes after log.attributes, which means resource attributes would overwrite log attributes in case of a key collision. To adhere to the convention and prevent potential loss of specific log information, the order of spreading should be reversed.
...log.resource?.attributes,
...log.attributes,
Originally posted by @gemini-code-assist[bot] in #12370