πŸ“Š Data Source

Monitoring Processor Status (Sentio UI)

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 ERROR state, 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(): Add console.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
    });

Enable 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.