Skip to content

Variable: SpanStatusCode

ts
const SpanStatusCode: {
  ERROR: 2;
  OK: 1;
  UNSET: 0;
};

Defined in: packages/core/src/observability/Tracing.ts:68

Span status codes matching OpenTelemetry's SpanStatusCode enum.

  • UNSET (0) — Default. Used for validation errors (AI mistakes), unknown actions, and other non-system failures that should NOT trigger infrastructure alerts.
  • OK (1) — Successful execution.
  • ERROR (2) — System failure. Only used when the handler throws an unhandled exception. This WILL trigger alerts in OTel backends.

Type Declaration

NameTypeDefault valueDefined in
ERROR22packages/core/src/observability/Tracing.ts:68
OK11packages/core/src/observability/Tracing.ts:68
UNSET00packages/core/src/observability/Tracing.ts:68

See

OTel Spec: Set Status