CaptureConfig
data class CaptureConfig(val minLevel: LogLevel = LogLevel.TRACE, val untracedPolicy: UntracedPolicy = UntracedPolicy.CAPTURE, val attributeMapper: (NormalizedLogEvent) -> Map<String, String> = ::defaultAttributeMapper)
Policy for the capture core: which events to keep and how to shape their attributes.
M1 capture is always-on; a trace/sampling gate applies only when a TraceContextProvider is wired into LogCapture (see untracedPolicy).
Constructors
Link copied to clipboard
constructor(minLevel: LogLevel = LogLevel.TRACE, untracedPolicy: UntracedPolicy = UntracedPolicy.CAPTURE, attributeMapper: (NormalizedLogEvent) -> Map<String, String> = ::defaultAttributeMapper)
Properties
Link copied to clipboard
Maps a NormalizedLogEvent to the LogRecord attributes. Defaults to defaultAttributeMapper, which records the logger name plus the event's own key/value pairs.
Link copied to clipboard
The least severe level to capture. Events below this level are dropped before any LogRecord is built or exported. Defaults to LogLevel.TRACE (capture everything).
Link copied to clipboard
What to do with a log emitted outside any active trace, when a TraceContextProvider is configured on LogCapture. Ignored when no provider is set (M1 always-on capture). Defaults to UntracedPolicy.CAPTURE.