Two major tools at your disposal for system health and monitoring are the Experience API logs, and system alerts.
Experience API logs
These logs give you an in-depth overview of your server-side API calls, including events, pageviews, clicks, and choose variation calls. They enable you to verify that your API calls are correct and identify implementation issues. You can also use logs to troubleshoot unexpected behavior and find the root cause.
Note that logs are near real-time, but not necessarily up to the exact moment. Real-time support will be released in early 2024.
To access the API Logs, go to Settings › API Logs.
API log details
The timeline aggregates API calls into successful calls, calls with errors and calls with warnings. Hover over a bar for more details.
Below the timeline a table lists the recent API calls that occurred in the selected time range. Press Load More to see more API calls.
The following fields are available. To display more fields, click Columns at the top of the API Logs page.
Column |
Details |
---|---|
Endpoint |
The type of API calls, such as choose or pageview |
Detail |
Details about the request type, such as what type of event was called |
Request ID |
A unique identifier for each API call |
Status |
Displays the status code. 200 or 204 means everything was ok. Other codes are described next to the code. |
User ID |
The user ID provided in the API request |
Session ID |
The session ID provided in the API request |
Timestamp |
Displayed in seconds granularity |
Request Duration |
The time the request took in Dynamic Yield’s servers (excludes time spent in transit) |
You can drill down on any API call to view more details by clicking anywhere in the row. This response is only available for logs that are under 32 KB. If the response exceeds this limit - it will not appear at all in the log (it doesn't mean that there was an error in the response itself or that it was not delivered properly).
Selecting a time range
You specify the time range by using the date picker:
You can also zoom in on a specific time range by clicking and dragging a box over the range you want.
A banner indicating the time range you set will appear. You can undo the zoom by clicking X.
Filter log
Click the filters on the right to filter the API calls by date, duration, type, status, or errors. The number of calls per filter appears next to each filter option.
Multiple selections under the same filter type (e.g. Choose and Pageview under Type) are considered as "OR"; while multiple selections under different filter types (e.g. Pageview under Type and Error under Status) are considered as "AND".
You can also filter by using the search tool to specify a userID or a requestID.
Use cases
Use Case |
Resolution |
---|---|
During initial implementation I am making calls to the API to check that all attributes are received with the intended values (context type etc.) and no warnings. |
Open the API Log and monitor the incoming calls, using the refresh button to view the latest calls. |
During implementation, I noticed there are some warnings on API calls. |
Select the row in the API log to see more details. You can see the full warnings including, for example - specific missing SKUs. |
In production (or any other high volume environment), I suspect there are some problematic API calls, but I am not sure exactly when they are happening. |
You can zoom in on a specific time range that has a high volume of errors or warnings. You can also use filters to only view API calls that have the errors or warnings you are looking for. |
In a high-volume platform, I want to see what one user is doing. |
Enter their user ID in the search bar to filter the log. |
Someone wants to tell me about an issue by sharing a bookmark or reference to the issue. |
This can be accomplished by entering the User ID in the search bar. If you don’t have the user ID, enter the request ID and use that to look for the user ID in the filtered results. |
I know there are currently errors/warnings and I want to know “when it broke”, so I can (a) understand the scope of the problem, (b) correlate it with any changes I made |
Zoom in to a suspected time range, and then use filters to narrow down the results to a specific error or warning type. |
I applied a fix to some error/warning and want to see there are no more requests with this type of issue |
Use the time-range control and/or filters to see if/when a problem stopped and whether the issue was fully or partially resolved. |
Alerts
Alerts provide visibility into the health of your API implementation, enabling you to easily communicate ongoing implementation issues with your IT/R&D departments, and expedite the resolution of the underlying issues.
How does it work?
- API errors and warnings that occur frequently are displayed as an alert on the Experience OS dashboard.
- Click View Issue Summary to open a popup that provides information about the issue, including type, cause, and frequency. Or, click View Logs to go directly to the API Logs screen.
- From here, you can view the error logs, or copy them to your clipboard to share with IT/R&D.
- API alert counts are likely to be significantly higher than the API error log counts. This is because a single API error log can present multiple issues, thus triggering multiple alerts.
- For an alert to be displayed on the Experience OS dashboard, it must occur over 50 times. This is to ensure only significant and meaningful errors trigger an alert.
- Error logs are saved for 7 days. If you attempt to view error logs older than 7 days, the API logs screen will not display any results.
- Events reported via Experience API are excluded from the API logs if the "active_consent_accepted" property is set to "false" in the request.