Function Logs | Yext Hitchhikers Platform

Function Logs allow users to view details about each function execution in their account. As a refresher, developers can write Typescript functions to be hosted and run within Yext to enact custom logic. These Serverless Functions can be called from a variety of systems throughout the platform, including Pages, Connectors, or Serverless Functions in Apps, which will now all have their logs accessible.

This reference document details the interfaces through which users can view and interact with Function Logs, and provides details about the events, which are recorded as function invocations and function fetches.

Function Logs UI

The Function Logs UI offers a split-screen view, where the left side contains a row for single function invocation, and the right side contains details for the selected invocation. Invocations are listed in descending chronological order, grouped by date. You can use the filter pills and to narrow down the set of invocations to view.

Left Panel - Function Invocations

Each invocation is listed as a row on the left hand side of the Functions table. Information is displayed per row in the following order

Information Limits and Validations
Status (for source and transform) Whether the invocation was a success or failure. Failures include system wide errors, where the function was not properly invoked, or any uncaught errors that occurred as a result of your function invocation.

If any invocation error is present, the status will be Failure.
Plugin ID The ID of the plugin that contains the function that was invoked.
Function Name The name of the function that was invoked
Caller The system that called (or “invoked”) the function. This may be Pages, Connector Transform, Connector Source, Serverless Functions in Apps, or any other system that can invoke a function.
Timestamp The timestamp of function invocation. All rows are grouped by date and appear in descending order (most recent invocations appearing at the top of the table)

Right Panel - Details per Function Invocation

Details about the selected invocation are listed on the right hand side. There are 5 tabs containing a set of details for the invocation.

Information Description
Invocation UID The system-generated unique ID of the function invocation.
Region The data region that the function was invoked in.
Queue Duration The length of time that the function existed in the queue,
Argument Bytes The size of the argument passed to the function, in bytes.
Argument JSON The JSON argument that was passed to the function.

Runtime

The Runtime tab includes details about the actual runtime of the function.

Information Description
Load Duration The duration (in milliseconds) it took to load the Function and various dependencies before the runtime began. Not counted against the invocation time limit.
Runtime Duration The duration (in milliseconds) that the function spent running.
Logs Any console logs that the function produced during the run (e.g. any data written via console.log, console.warn, or console.error). This will include any caught errors. Uncaught errors will be displayed in the errors section under the Response tab.

Response

The Runtime tab includes details about the response returned by the function.

Information Description
Result Bytes The size of the result output by the function, in bytes
Result JSON The JSON object returned by the function.
Errors Any uncaught errors or invoking-system errors that occurred as a result of the function invocation.

Caller Details

The caller details tab includes any details about your function specific to the calling system. For example, this might include the information about the Connector that invoked the function, or deploy information if invoked by our Pages system. The details here will vary from caller to caller. Callers today include:

  • Connector Transform
  • Connector Source
  • Search Query Rule
  • Pages HTTP Function
  • Pages “Event-Driven” Function
  • Webhook

Function Fetches

A “Function Fetch” is an HTTP request made within your function’s execution. For each fetch, the details below will be provided.

NOTE: any HTTP requests made to download packages are not included. Specifically, if you import from a CDN, the import will not be included as a fetch for the given function invocation.

Information Description
Fetch UID The unique ID associated with the fetch.
Fetch Timestamp The timestamp that the fetch was executed.
URL The URL where the fetch was sent.
HTTP Method The HTTP method used for the fetch.
Duration The total duration (in milliseconds) of the fetch.
Request Bytes The size of the fetch request, in bytes
Response Bytes The size of the response of the fetch, in bytes.
Status Code The HTTP status code of the request.
Error Message Any error messages provided in the response of the fetch (if any).

Filtering

The Functions Logs table can be filtered by the following properties:

Information Description
Property Filter Type
Status Success / Failure
Plugin ID “Contains” search
Function Name “Contains” search
Caller Multi-select
Caller Details Key/Value Pair
    True if the specified key CONTAINS the specified value
      Multiple pairs are AND joined
Date Range Date Picker

Logs API vs UI

Stipulation Function Logs via Logs API Function Logs UI
Requires Developer App Yes No
Filterable Yes Yes (More Limited)
Invocations Maximum Page Size (total records returned per request/page) 1,000 (50 default) 20 (per “Load More” click)
Function Fetches Maximum Page Size (total records returned per request/page) 1,000 (50 default) 50

Function Logs Limitations

  • Function Logs UI and API is limited to data from the last 30 days.
  • It may take up to 5 minutes for new update logs to appear in the UI and Logs API.
  • If a value is truncated, “” will appear in the UI/API
    • Truncation occurs when the entire invocation exceeds 1MB. The system will begin truncating data, starting with Logs, then the Error Response, Status, Result… until the entire invocation is under 1MB. Any line items that are truncated will be replaced with “
Feedback