Remove the log4j.map_message prefix from attributes from that logging instrumentation #13787
Labels
contribution welcome
Request makes sense, maintainers probably won't have time, contribution would be welcome
enhancement
New feature or request
Milestone
Is your feature request related to a problem? Please describe.
I was wondering if there is a specific reason why the log4j.map_message prefix is appended onto attributes produced by that instrumentation, and if it is possible to remove it, similar to how it has been done for MDC: #9536.
In the application insights java agent, we recently implemented a feature where a specific log attribute is parsed to send a different kind of telemetry to application insights. This feature does not currently work for logs produced by mapMessage() as the attribute name with the prefix appended on to it does not match a specific attribute name we are looking for.
cc: @trask
Describe the solution you'd like
Logs that are produced from the log4j mapMessage() method should not append a prefix on any custom attributes. Ideally the current prefix should be removed.
Describe alternatives you've considered
In application insights java agent code, we can add an extra condition to search for "log4j.map_message" + specialAttributeName. However, there may be slightly better performance if we didn't need to add an extra condition to begin with.
Additional context
No response
The text was updated successfully, but these errors were encountered: