Skip to content

@flarelog/sdk


@flarelog/sdk / ConsoleTransport

Class: ConsoleTransport

Defined in: otel/console-transport.ts:75

ConsoleTransport — pretty-prints telemetry to stdout/stderr.

This is the default when no API key and no OTLP endpoint are configured. Lets developers see exactly what would be shipped without any backend setup.

Implements

Constructors

Constructor

new ConsoleTransport(): ConsoleTransport

Returns

ConsoleTransport

Properties

name

readonly name: "console" = "console"

Defined in: otel/console-transport.ts:76

Human-readable name for debug logging.

Implementation of

Transport.name

Methods

exportLogs()

exportLogs(logs): Promise<void>

Defined in: otel/console-transport.ts:78

Called by the LogRecordProcessor when a log record is emitted.

Parameters

logs

ReadableLogRecord[]

Returns

Promise<void>

Implementation of

Transport.exportLogs


exportSpans()

exportSpans(spans): Promise<void>

Defined in: otel/console-transport.ts:95

Called by the SpanProcessor when a span ends.

Parameters

spans

ReadableSpan[]

Returns

Promise<void>

Implementation of

Transport.exportSpans


flush()

flush(): Promise<void>

Defined in: otel/console-transport.ts:104

Force-flush any in-flight batches. Called on ctx.waitUntil().

Returns

Promise<void>

Implementation of

Transport.flush


shutdown()

shutdown(): Promise<void>

Defined in: otel/console-transport.ts:108

Release resources (timers, connections).

Returns

Promise<void>

Implementation of

Transport.shutdown

Released under the MIT License.