Task Performance Dashboard

Gelato’s Web3 Function UI offers enriched monitoring and analytics capabilities, allowing you to closely track the performance and usage statistics of your Typescript and Solidity function tasks.

  • Usage Insights: Get a clear picture of how much you’ve used from your Web3 function plan. Our intuitive metrics and forecast charts help you understand your current usage and predict future needs.

  • Task Identification: Quickly figure out if a task is powered by Typescript or Solidity. This feature simplifies how you view and manage your suite of Gelato Web3 functions.

  • Trend Tracking: Our updated chart design lets you track how your usage changes day-to-day, providing insights for better planning and task management.

  • Plan Details: Know exactly what you’re getting with your subscription.

Logs & Status

Besides the task logs available in the UI, Gelato Web3 Functions offer a more detailed and granular monitoring system providing status and logs APIs.

Task Status URL

Provided the ChainId and taskId, this API will return the current Task status

https://api.gelato.digital/tasks/web3functions/networks/{chainId}/tasks/{taskId}/status

For example, if your chainId, taskId are:

chainId: 137
taskId: 0xdeaeee394c952d8b23c86eacc704adf7b605d89d992cec9a5fc86e4a517f053b

Then the URL to go to is:

https://api.gelato.digital/tasks/web3functions/networks/137/tasks/0xdeaeee394c952d8b23c86eacc704adf7b605d89d992cec9a5fc86e4a517f053b/status

For this taskId, here is the returned task information:

{
    "task":{
        "chainId":137,               
        "taskId": "0xdeaeee394c952d8b23c86eacc704adf7b605d89d992cec9a5fc86e4a517f053b",
        "taskState":"CheckPending",
        "creationDate":"2023-06-01T20:10:39.985Z",
        "lastCheckDate":"2023-06-09T06:22:44.966Z",
        "lastCheckMessage":"Fail to run Web3Function: Web3Function exited with code=1",
        "lastExecDate":"2023-06-09T08:15:11.883Z",
        "lastExecTransactionHash": "0xc2e57f5b56bf24ae77eca31fbe76ecf16cd30cb0fc5592207bb567addff62402"
    }
}

The first thing to look at is the taskState key:

Task states:

For the taskState key, these are the possible values:

  • CheckPending: the task is pending simulation.
  • ExecPending: the task is executable and is awaiting inclusion into the blockchain.
  • WaitingForConfirmation: the task was included into the blockchain but is still awaiting the required amount of blocks confirmations.
  • ExecSuccess: the task has been successfully executed.
  • Cancelled: the task has been canceled by the owner
  • ExecReverted: the task transaction has been reverted.

Task Logs URL

Provided the ChainId and taskId, this API will return the logs in the last 24 hours.

Query Parameters:

  • limit (optional): The number of log entries to return, ranging from 1 to 100.
  • page (optional): Specifies the page number of logs to fetch, ranging from 1 to 100.
https://api.gelato.digital/tasks/web3functions/networks/{chainId}/tasks/{taskId}/logs?limit=NrLogs&page=PageNr

For example, if your chainId, taskId, NrLogs and PageNr are:

chainId: 137
taskId: 0xdeaeee394c952d8b23c86eacc704adf7b605d89d992cec9a5fc86e4a517f053b
NrLogs:2
PageNr: 1

Then the URL to go to is:

https://api.gelato.digital/tasks/web3functions/networks/137/tasks/0xdeaeee394c952d8b23c86eacc704adf7b605d89d992cec9a5fc86e4a517f053b/logs?limit=2&page=1

For this taskId, here is the returned task information:

{
    "logs": [
        {
            "date":"2023-06-09T08:43:52.404Z",
            "state":"WaitingForConfirmation",
            "type":"WaitingForConfirmation",
            "message":"txHash: 0x788726ed95f2f916a47cae0c6cdfbea91e1c8e3756f91e0efc08fa501daed8f0"
        },
        {
            "date":"2023-06-09T08:43:51.835Z",
            "state":"ExecPending",
            "type":"ExecPendingCheck",
            "message":"Task submitted for execution",
            "web3FunctionLogs":[
                "Text generated: ",
                "Chaffinches are small, colourful birds which feed on seeds and insects. They have buff-coloured breasts streaked with brown markings, bright pinkish-red faces and wings marked with white bars. In summer they breed in woodlands; in winter many move south to warmer areas.",
                "Text generated: ",
                "Chameleons are lizards known for their ability to change color, excellent vision and long, sticky tongues used to catch prey."
            ]
        }
    ]
}

Alerts

Web3 Functions provides an alerting service to enable you to get notified about your task executions, problems or when your balance is getting low. Alerting currently supports notifications in Telegram and Discord, with other channels on the way.

Types of notifications

Setting up Telegram Notifications

You can visit your notifications area to follow the steps listed below.

  1. Add GelatoWatcherBot to your Telegram - if you have Telegram installed you can just click on the link to do this.
  2. Enter the command /start
  3. The bot will show you the main alerts that you can request by entering the command.

When you enter each command the bot will step you through the inputs required to finish setting up the alert.

You can view the full list of commands at any time by entering /help

Telegram Bot Commands

Discord DM Notifications

In this mode you receive your alerts as DM’s to your Discord handle. To activate:

  1. Join our Gelato Discord server
  2. Choose from the list of commands below

If you would prefer to receive alerts in a specific channel please see how to get Discord notifications in your server.

Command

Discord notifications in your own server

  1. Add our Gelato Bot to your server using this invite link (you need to be admin of the server)
  2. If you want to receive notifications in a private channel, make sure to add Gelato Bot as a member in the channel where you want to receive the notification.
  3. Enter the following commands in the channel you want to receive alerts.

Command

Default Thresholds

Unless overridden these are the default levels that are used for each network.

If you need more notifications or new communication channels, your feedback and suggestions are always welcome.