Span
@forge/monorepo / backend/src / Span
Interface: Span
Defined in: backend/src/telemetry/index.ts:64
Properties
context
readonlycontext: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
Returns
void
setStatus()
setStatus(
status):void
Defined in: backend/src/telemetry/index.ts:77
Parameters
status
Returns
void