PlatformMonitor

Inspecting a Function run

You identified a failed Function run and want to identify the root cause? Or simply want to dig into this run's timings?

The Function Run Logs will provide all the information to understand how this run ran and the tools to reproduce it locally.

The Function Run Logs

Our Handle failed payments function failed after retrying 5 times:

The "Handle failed payments" Function runs list features a run in a failing state.

Clicking on the failed Function Runs open the Function Run Logs panel:

The Function Run Logs view displays the event payload on the left, some technical attributes (function version, timings) on the right and a timeline of steps on the bottom left.

The Function Run Logs panel is divided in 3 parts:

  • On the left: the Event payload that triggered the Function run
  • On the top right: Timings and other technical information helpful when exchanging with Support
  • On the bottom right: the Timeline of execution of the Function's steps

The Function logs informs us that our Function run failed because of an Error: Failed to downgrade user error.

This is a first clue, let's have a closer look at the Timeline to identify the root cause:


We can now spot that the downgrade-account-billing-plan failed.

Let's expand this step to look at the retries and errors.

The Timelime of steps features two steps: a first one to fetch the subscription from Stripe and second one to update it. The second is marked as failed.

Expanding the second step lists all the attempted retries along with their respective error.



Expanding a step provides the same level of details (the error message and timings) along with retries information.

It seems that our downgrade-account-billing-plan step raised the same error during the following 5 retries, we might have to perform a fix in the database.

Performing actions from the Function Run Logs

The Function Run Logs provides two main actions: replay the Function Run or sending the trigger event to your local Inngest Dev Server.

Sending the trigger Event to your local Inngest Dev Server provides a quick way to reproduce issues that are not linked to external factors (ex: new function version recently deployed, data issues).

After looking at the Function Run Logs, the failure is judged temporary or fixed by a recent deployment, you can replay the Function run by using the "Rerun" button at the top right of the screen.