๐ Data Source
Processor Status
The Data Source page in the Sentio UI is your primary dashboard for monitoring a deployed processor.
-
Status: Check the current state:
STARTING/BOOTSTRAPPING: Initial setup.BACKFILLING: Processing historical data. Shows progress (e.g., current block/version being processed).RUNNING: Actively processing new blocks/transactions near the chain head.ERROR: The processor encountered a fatal error and stopped. Check the Error Status section.STOPPED: Manually stopped or replaced by a new active version.
-
Progress: During backfill, you can see how far along the processor is.
-
Version Details: View the deployed version ID, SDK version, deployment time, etc.
-
Console Logs: Displays output from
console.log()statements in your code. Useful for quick debugging checks, but logs have limited retention (e.g., 3-7 days). -
Error Status: If the processor enters an
ERRORstate, this section usually provides details about the exception or reason for failure. -
System Monitor: Offers insights into resource usage (CPU, memory) and performance metrics, which can help identify bottlenecks.
Basic Debugging with Logs
-
console.log(): Addconsole.log("Debugging info: ", variable1, variable2);statements in your handler logic around areas you suspect might have issues. Deploy the change (sentio upload) and observe the output in the Data Source UI console logs.
-
ctx.eventLogger.emit(): For more persistent and structured debugging, use event logs. Emit logs with detailed attributes at key points in your logic. These logs are searchable and filterable in the Sentio Event Logs UI.ctx.eventLogger.emit('DebugPoint_HandlerStart', { severity: LogLevel.DEBUG, message: 'Entering swap handler', pool: ctx.address, txHash: event.transactionHash }); // ... handler logic ... ctx.eventLogger.emit('DebugPoint_Calculation', { severity: LogLevel.DEBUG, calculatedValue: someIntermediateResult, inputArg: event.args.someInput });
Multi-version
By default, every new upload overrides the previous upload. But users can enable multi-version from the Settings page.
Set active version
After you enable multi-version, your previous version keeps running until you explicitly switch the active version. The data of the old version will be deleted after a small delay.
Abandon a version
It is possible that you upload a new processor and find an issue in it. You can always abandon it and work on a new version.
We support at most 2 versions with running processors and data stored. It means that you can have at most one active version and one pending version.
Hotswap in Version
Sometimes, you may want to upgrade the processor code to prepare for contract change, but don't want to spend too much time waiting for re-index if you have a very long backfill time.
We support continue-from from when uploading the processor code, it will update the processor code in current version and keep the previously indexed data. e.g.
yarn sentio upload --continue-from=<old version>Refer Sentio CLI and Subgraph CLI for detail usage. After uploading, you will see version histories:
Processor Rollback
There are cases where previously mishandled data leads to dirty or inconsistent results (for example, a bug that was triggered only during a certain time window). In these situations, Hotswap alone isnโt sufficient.
Starting from SDK 3.x, you can now view the full list of checkpoints maintained by the Sentio Processor and instruct the processor to roll back to an earlier state. After the rollback, the processor will enter a paused state, allowing you to use Hotswap to fix the indexing logic before resuming execution.
You can click the "Checkpoints" button on the Processor status page. Each chain maintains its own checkpoints.
Once the list of checkpoints appears, click the "Rollback" button.
Updated 8 days ago