Skip to content

feat: shared observability kit - traces, logger, error capture - #1

Merged
vreshch merged 4 commits into
masterfrom
feature/observability-kit
Aug 7, 2026
Merged

feat: shared observability kit - traces, logger, error capture#1
vreshch merged 4 commits into
masterfrom
feature/observability-kit

Conversation

@vreshch

@vreshch vreshch commented Aug 7, 2026

Copy link
Copy Markdown
Member

Goal

Phase 0b of the observability plan (vault: features/observability): ONE reusable kit every agentage service adopts for traces + logs + errors, replacing the private web/packages/otel copy and catalog's hand-rolled otel-bootstrap.mjs.

What

  • ./bootstrap - node --import preload, ported verbatim from web/packages/otel (ESM loader hook via module.register(), opt-in on OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_SERVICE_NAME, fs/net/dns instrumentations disabled, bounded flush on SIGTERM/SIGINT).
  • createLogger({service}) - NEW: pino preset, JSON to stdout only (no in-process shipping - the estate log agent tails containers), service on every line, trace_id/span_id injected from the active span = log<->trace correlation in SigNoz.
  • captureError(log, err, ctx) - NEW: structured error log + recordException + ERROR span status in one call; safe without a tracer.
  • Scaffold mirrors memory-core: strict ESM TS, eslint+prettier, vitest (14 tests), pr-validation + npm publish workflows, dependabot (UTC standard).

How I verified

  • npm run verify green: type-check, lint, format, 14/14 tests, build, dist smoke.
  • Runtime smoke: node --import ./dist/bootstrap.js with env set prints otel: tracing enabled, logger emits {"service":...,"msg":...} JSON, unreachable collector neither crashes nor hangs the process.
  • Not yet verified against live SigNoz - that lands with the first adopter PR (web/catalog swap, Phase 0c).

Verify (for human)

  • Review API surface (src/index.ts, README adoption checklist) - this is the contract all ~10 repos will pin.
  • Publish happens only after a release commit or manual dispatch; needs NPM_TOKEN repo secret (same as memory-core).

@vreshch
vreshch merged commit 44c8e34 into master Aug 7, 2026
1 check 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