Skip to content

feat: add operation end callback - #9

Merged
ahmed-hashi-01 merged 1 commit into
mainfrom
feat/add-operation-end-callback
Jun 18, 2026
Merged

ahmed-hashi-01 merged 1 commit into
mainfrom
feat/add-operation-end-callback

Conversation

@ahmed-hashi-01

Copy link
Copy Markdown
Contributor

Summary

Adds an onOperationEnd callback for operation-level observability.

What changed

  • Added OperationEndEvent
  • Added onOperationEnd to createDeadlineBudget
  • Emits an event after each operation succeeds, times out, uses fallback, or throws
  • Includes duration, timeout status, fallback status, error, and remaining budget
  • Added defensive callback handling so observability cannot break request flow
  • Added consoleLogger helper
  • Added logger example
  • Added tests for callback behavior

Checks

  • npm run example:logger
  • npm run example:basic
  • npm run example:fallback
  • npm run example:expired
  • npm run typecheck
  • npm test -- --run
  • npm run build

@ahmed-hashi-01
ahmed-hashi-01 merged commit ecf9bef into main Jun 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant