Skip to main content
Access via:io.insights.logs

Logs API.

Properties (2)

Property Type Default Required Description
settings⚓︎ LogsSettings x

Logs settings.

started⚓︎ boolean x

Whether or not this instance is started.

4 Methods

emit()⚓︎

(logRecord: LogRecord) => Promise<void> | null

Publishes an OTEL log record.

Parameters (1)

Name Type Required Description
logRecord⚓︎ LogRecord x

start()⚓︎

() => Promise<void>

Starts publishing data.

stop()⚓︎

() => Promise<void>

Stops publishing data.

waitForFinalExport()⚓︎

(timeoutMs?: number) => Promise<void>

Waits for any pending data to be published, with the option to specify a timeout.

Parameters (1)

Name Type Required Description
timeoutMs⚓︎ number x

maximum time to wait for export