Skip to main content

QObject

@quik/core


@quik/core / QObject

Class: QObject

Defined in: QObject.ts:7

Base object in the Quik Framework.

Extended by

Constructors

Constructor

new QObject(): QObject

Returns

QObject

Accessors

logger

Get Signature

get protected logger(): IQLogger

Defined in: QObject.ts:15

The logger getter for the object.

Returns

IQLogger


name

Get Signature

get name(): string

Defined in: QObject.ts:8

Returns

string

Methods

endSpan()

protected endSpan(span): void

Defined in: QObject.ts:35

End a span returned by startSpan.

Parameters

span

TelemetrySpan

The span to end.

Returns

void


recordSpanError()

protected recordSpanError(span, err): void

Defined in: QObject.ts:45

Record an exception on an active span.

Parameters

span

TelemetrySpan

The span to record the error on.

err

unknown

The error to record.

Returns

void


setSpanAttribute()

protected setSpanAttribute(span, key, value): void

Defined in: QObject.ts:64

Set a single attribute on an active span.

Parameters

span

TelemetrySpan

The span to update.

key

string

Attribute key.

value

string | number | boolean

Attribute value.

Returns

void


startSpan()

protected startSpan(spanName, options?): TelemetrySpan

Defined in: QObject.ts:26

Start a telemetry span for the given operation name. Returns undefined when no telemetry provider is active.

Parameters

spanName

string

Name of the span.

options?

TelemetrySpanOptions

Optional span attributes and kind.

Returns

TelemetrySpan