Class OpenTelemetryAppender.Builder<B extends OpenTelemetryAppender.Builder<B>>
java.lang.Object
org.apache.logging.log4j.core.filter.AbstractFilterable.Builder<B>
org.apache.logging.log4j.core.appender.AbstractAppender.Builder<B>
io.opentelemetry.instrumentation.log4j.appender.v2_17.OpenTelemetryAppender.Builder<B>
- All Implemented Interfaces:
org.apache.logging.log4j.core.util.Builder<OpenTelemetryAppender>
- Enclosing class:
- OpenTelemetryAppender
public static class OpenTelemetryAppender.Builder<B extends OpenTelemetryAppender.Builder<B>>
extends org.apache.logging.log4j.core.appender.AbstractAppender.Builder<B>
implements org.apache.logging.log4j.core.util.Builder<OpenTelemetryAppender>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()setCaptureContextDataAttributes(String captureContextDataAttributes) Configures theThreadContextattributes that will be copied to logs.setCaptureExperimentalAttributes(boolean captureExperimentalAttributes) Sets whether experimental attributes should be set to logs.setCaptureMapMessageAttributes(boolean captureMapMessageAttributes) Sets whether log4jMapMessageattributes should be copied to logs.setCaptureMarkerAttribute(boolean captureMarkerAttribute) Sets whether the marker attribute should be set to logs.Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender.Builder
getConfiguration, getLayout, getName, getOrCreateLayout, getOrCreateLayout, isIgnoreExceptions, setConfiguration, setIgnoreExceptions, setLayout, setName, withConfiguration, withIgnoreExceptions, withLayout, withNameMethods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable.Builder
asBuilder, getFilter, getPropertyArray, setFilter, setPropertyArray, withFilter
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setCaptureExperimentalAttributes
@CanIgnoreReturnValue public B setCaptureExperimentalAttributes(boolean captureExperimentalAttributes) Sets whether experimental attributes should be set to logs. These attributes may be changed or removed in the future, so only enable this if you know you do not require attributes filled by this instrumentation to be stable across versions. -
setCaptureMapMessageAttributes
Sets whether log4jMapMessageattributes should be copied to logs. -
setCaptureMarkerAttribute
Sets whether the marker attribute should be set to logs.- Parameters:
captureMarkerAttribute- To enable or disable the marker attribute
-
setCaptureContextDataAttributes
Configures theThreadContextattributes that will be copied to logs. -
build
- Specified by:
buildin interfaceorg.apache.logging.log4j.core.util.Builder<B extends OpenTelemetryAppender.Builder<B>>
-