Summary
Propagate requestId through services into Soroban logs/metrics and link txHash so a single client request can be traced across API → DB → chain → outbox.
Why this matters
Support and incident response currently require manual log grepping across disconnected identifiers.
Where to work
- requestId middleware
src/services/soroban.service.ts
src/services/bet-audit.service.ts
- outbox / winston logger fields
What to implement
- Thread requestId via AsyncLocalStorage or explicit ctx.
- Include requestId on Soroban log lines and audit events.
- Index/searchable field linking requestId ↔ txHash.
- Document how to trace a failed bet in ops docs.
- Tests assert correlation fields present.
Acceptance criteria
Done when
One request can be traced from HTTP to chain settlement.
Metadata
| Field |
Value |
| Difficulty |
advanced |
| Complexity |
high |
| Good first contribution? |
no |
Summary
Propagate
requestIdthrough services into Soroban logs/metrics and linktxHashso a single client request can be traced across API → DB → chain → outbox.Why this matters
Support and incident response currently require manual log grepping across disconnected identifiers.
Where to work
src/services/soroban.service.tssrc/services/bet-audit.service.tsWhat to implement
Acceptance criteria
Done when
One request can be traced from HTTP to chain settlement.
Metadata