Skip to content

Add core observability events#12

Merged
AllyMurray merged 1 commit into
mainfrom
AllyMurray/core-observability-events
Jul 7, 2026
Merged

Add core observability events#12
AllyMurray merged 1 commit into
mainfrom
AllyMurray/core-observability-events

Conversation

@AllyMurray

Copy link
Copy Markdown
Owner

Summary

Adds structured lifecycle observability to @http-client-toolkit/core via HttpClientOptions.observability.onEvent.

What Changed

  • Added the exported HttpClientEvent discriminated union and event types for requests, cache, dedupe, rate limiting, server cooldowns, and retries.
  • Instrumented HttpClient lifecycle events while swallowing observer errors and detaching async observer promises so callbacks cannot change request results.
  • Added focused tests for event ordering, cache hit/miss/stale/revalidation paths, retry scheduling/exhaustion, rate-limit wait/throw behavior, dedupe owner/join behavior, and observer error/non-await semantics.
  • Updated the core README and docs site with usage examples, stable payload guarantees, and logging/metrics/OpenTelemetry bridging guidance.
  • Added a minor changeset for @http-client-toolkit/core.

Validation

  • pnpm --filter @http-client-toolkit/core test passed: 314 tests
  • pnpm --filter @http-client-toolkit/core exec tsc --noEmit passed
  • pnpm --filter @http-client-toolkit/core build passed
  • cd docs-site && pnpm --ignore-workspace build passed
  • git diff --check passed
  • Pre-push hook passed monorepo build, lint, and test tasks

@AllyMurray
AllyMurray marked this pull request as ready for review July 7, 2026 12:54
@AllyMurray
AllyMurray merged commit 306c293 into main Jul 7, 2026
1 check passed
@AllyMurray
AllyMurray deleted the AllyMurray/core-observability-events branch July 7, 2026 12:55
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