Skip to content

[Backend] logger.ts request-scoped context is lost inside setTimeout/setInterval callbacks in the indexer worker #1039

Description

@grantfox-oss

Join our community: https://t.me/+DOylgFv1jyJlNzM0

Why this matters

logger.ts uses AsyncLocalStorage (requestContext) to attach requestId to log lines, but background timers in soroban-event-worker.ts and sse.service.ts are not wrapped in requestContext.run, so their log lines never carry a correlation id even after the related admin fix for HTTP requests.

Acceptance criteria

  • Audit setTimeout/setInterval usages in the worker and SSE service for missing requestContext.run wrapping
  • Wrap background poll/heartbeat callbacks so their logs carry a stable worker-scoped id

Files to touch

  • backend/src/logger.ts
  • backend/src/workers/soroban-event-worker.ts
  • backend/src/services/sse.service.ts

Out of scope

Does not change the AsyncLocalStorage implementation itself.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend related tasksbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions