Is your feature request related to a problem? Please describe.
Currently the log4j/logback appenders explicitly configure the exception.* attributes (see here and here)
Applications may want to customize how these attributes are recorded. For example, to shorten stacktraces, or record additional attributes for certain exceptions.
Describe the solution you'd like
open-telemetry/opentelemetry-java#7266 introduced a new experimental ExceptionAttributeResolver concept to allow customization of how the exception.* attributes are resolved.
I would like the log4j and logback appenders to utilize this new ExceptionAttributeResolver to store exception.* attributes, rather than explicitly specifying those attributes.
To do so, the log4j/logback log event mappers could utilize the ExtendedLogRecordBuilder.setException(..) method (which delegates to the ExceptionAttributeResolver) here and here, instead of setting the exception.* attributes directly.
Describe alternatives you've considered
No response
Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Is your feature request related to a problem? Please describe.
Currently the log4j/logback appenders explicitly configure the
exception.*attributes (see here and here)Applications may want to customize how these attributes are recorded. For example, to shorten stacktraces, or record additional attributes for certain exceptions.
Describe the solution you'd like
open-telemetry/opentelemetry-java#7266 introduced a new experimental
ExceptionAttributeResolverconcept to allow customization of how theexception.*attributes are resolved.I would like the log4j and logback appenders to utilize this new
ExceptionAttributeResolverto storeexception.*attributes, rather than explicitly specifying those attributes.To do so, the log4j/logback log event mappers could utilize the ExtendedLogRecordBuilder.setException(..) method (which delegates to the
ExceptionAttributeResolver) here and here, instead of setting theexception.*attributes directly.Describe alternatives you've considered
No response
Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.