exception.* attributes only when the exception policy allows them
Passes each event's captured context explicitly to the OTel Logs API,
preserving trace correlation through asynchronous queues and retries.
Manually constructed events without a snapshot use the calling context.
The OTel SDK batches export; additional BatchingSink buffering is optional.
Requires that setupOtel({ ... }) has been called so the global
LoggerProvider is set; otherwise emissions become no-ops.
Creates a LogSink that forwards every event to the OpenTelemetry Logs API.
Maps each
LogEventto an OTelLogRecord:timestamp→ milliseconds, converted internally by the OTel SDKlevel→severityNumberandseverityTextrenderedMessage→bodyproperties→ flat attribute map (functions / symbols dropped, nested objects JSON-stringified)messageTemplate→cleverbrush.message_templateattributeeventId→cleverbrush.event_idattributeexception.*attributes only when the exception policy allows themPasses each event's captured context explicitly to the OTel Logs API, preserving trace correlation through asynchronous queues and retries. Manually constructed events without a snapshot use the calling context.
The OTel SDK batches export; additional BatchingSink buffering is optional.
Requires that
setupOtel({ ... })has been called so the globalLoggerProvideris set; otherwise emissions become no-ops.