-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers
Description
toll-booth emits onRequest, onChallenge, and onPayment callbacks that give operators visibility into the payment flow. There is no example showing how to wire these into a structured logging setup (JSON lines, pino, etc.). A working example would help operators monitor their deployments in production.
Scope
- Create
examples/structured-logging/with a minimal Express server - Wire
onRequest,onChallenge, andonPaymentcallbacks to produce JSON log lines to stdout - Include fields like timestamp, client IP, route, amount, payment hash, and credit balance
- Add a
README.mdexplaining the callback signatures and when each fires
Helpful context
src/types.tslines 347-349 - the three event callback signatures (onPayment,onRequest,onChallenge)src/stats.ts- the built-inStatsCollectorthat uses these same callbacks internallysrc/booth.tslines 128-132 - how the Booth constructor wires user callbacks alongside stats collection- Estimated effort: 1-2 hours
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers