---
description: Observability -- context.logger API, execution inspection, step-level context
paths:
  - operations/**
---
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
<!-- Regenerate: pnpm scaffold:sync -->


# Observability

## Safety Invariants

- Use `context.logger` for all logging in step handlers -- `console.*` is NOT captured by the platform
- Log levels: `debug` (verbose), `info` (normal progress), `warn` (non-fatal, processing continues), `error` (fatal, processing stops)
- Step lifecycle events (started, completed, failed, route taken) are auto-logged by the SDK worker -- no handler code needed

## Key Rules

- Every handler should log at: entry (step name + key params), decisions (skips, branches), progress (per-item in loops), summary (counts at end)
- Error messages in handlers surface as the execution's error message -- write for humans, not machines
- String values truncated at 200 characters in logs
- 30-day log retention (includes logs from deleted resources)

## Inspecting Executions

```bash
pnpm elevasis-sdk execution <resourceId> <executionId>
pnpm elevasis-sdk executions <resourceId>
```

## Detailed Reference

- `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- full logging patterns and handler examples
