captureNow
Resolve and export event directly at the caller's log site, without a queue.
Trace, attributes and event time are resolved before the first suspension. Export may suspend while writing durably. A filtered event or a throwing attribute mapper returns null, just as at a queueing edge. Never call this on an unresolved event taken from a queue: call resolveAtEdge before enqueueing and capture on the drain instead.
Samples
val exporter = WarpLogRecordExporter(ReplicaId("device"), InMemoryDurableStore())
val capture = LogCapture(exporter, CaptureConfig(), Clock.System, Random.Default)
// Call at the log site. Resolution happens before export can suspend.
capture.captureNow(NormalizedLogEvent(LogLevel.INFO, "com.example.App", "started"))Content copied to clipboard