Beyond being a dashboard, the Defer Console aims to become the best control panel for operating background operations.
We recently introduced the Functions Insight UI, followed by Execution filters and new actions (pause, auto-archive) to provide a better experience as the number the executions and functions per project grew.
As part of this vision, we are happy to release a major feature to help narrow down specific executions: Function Metadata.
As your applications grow, the listing of a given Function's executions becomes hard to navigate:
Even with pages of 25 executions and actual time filters, it is hard to narrow down a specific set of executions.
For this reason, the Function Metadata feature allows you to attach some metadata to executions that become filters in the Defer Console.
Attaching metadata to execution is achieved by using addMetadata() from @defer/client:
import type { NextApiRequest, NextApiResponse } from "next"import { addMetadata } from "@defer/client" import sendEmailsFn from "./sendEmails" export default async function handler( req: NextApiRequest, res: NextApiResponse<{ ok: boolean }>) { const sendEmails = addMetadata(sendEmailsFn, { email: req.body.email }) await sendEmails(req.body.email) res.status(200).json({ ok: true, })}
Find a working example in the defer.demo repository.
There is no limit to the number of metadata assignable to an execution; however, for now, values must be string.
New executions coming with metadata will make the Metadata filter appear in your Execution list' filters:
Once a specific metadata is selected, you can filter to a value:
Combined with the Executed At and Status filters, filtering specific executions is now straightforward:
Bryan and I built background processing solutions in multiple companies (ex: at Algolia).
Building internal dashboards to operate background jobs and workflows was a must-have feature to scale technical and customer support.
Those internal dashboards always contained standard features: advanced filtering, search, recovery, and debugging actions, along with proper observability tools (infra, operations, etc).
The Defer Console will constantly improve with its ambitious roadmap and frequent releases, with rolling out soon:
Long-running Builds or stuck Executions get frustrating without a way to inspect them. As many of you asked, we will soon release the support for live logs for Builds and Executions.
- Cancellable running functions
Mistakes happen, and the Defer Console should help you mitigate them quickly. Again, a long-awaited Community feature will soon be released: cancel running functions.
- Revamped Execution's view
The current Execution's view hasn't evolved much since the beginning of Defer and will soon be enriched with better live metrics - live logs -, essential technical information (detailed timings, metadata) and more actions (rerun with new arguments).
Most of Defer Scheduler's features are now available locally for a smoother experience.
Our Scheduler is now directly accessible for advanced use cases such as building a configurable notifications system, create batches of executions or user configurable worflows.