Skip to main content

Span

@retinue/monorepo


@retinue/monorepo / backend/src / Span

Interface: Span

Defined in: backend/src/telemetry/index.ts:64

Properties​

context​

readonly context: SpanContext

Defined in: backend/src/telemetry/index.ts:66

The span's own context, for propagation into a job payload or an outbound header.

Methods​

end()​

end(): void

Defined in: backend/src/telemetry/index.ts:78

Returns​

void


recordError()​

recordError(input): void

Defined in: backend/src/telemetry/index.ts:76

Record a failure on the span.

Takes a code and message, not an error object. An error's stack and cause chain routinely carry a URL with a token in it or the argument that caused the throw — #131 found exactly that, a service-role key echoed into an error message and therefore into logs. So the span gets the classified code and a message the caller has taken responsibility for, and the object stays out.

Parameters​

input​
code​

string

message?​

string

Returns​

void


setAttributes()​

setAttributes(attributes): void

Defined in: backend/src/telemetry/index.ts:67

Parameters​

attributes​

Attributes

Returns​

void


setStatus()​

setStatus(status): void

Defined in: backend/src/telemetry/index.ts:77

Parameters​

status​

SpanStatus

Returns​

void