Stay organized with collectionsSave and categorize content based on your preferences.
This document gives an overview of the debugging process to understand the usage ofAPIs and Servicesin the Google Cloud console and also their latency spike.
First, follow these steps to identify conversation IDs with high latency:
The latency traffic graph appears, labeledTraffic by API method.
Next, ensure that you enable audit logging.
Go toAudit Logs.
Check the optionsAdmin Read,Data ReadandData Write.
ClickSave.
Next, identify the conversation IDs with latency longer than a certain value inLog analytics. For example, in the following screenshot, you can see conversations longer than 10 seconds on a particular day.
Go toLog analytics.
Provide the time againstTIMESTAMP_DIFF.
Alternatively, use the timestamp to identify specific conversations during a certain period inLog explorer.
Enter the name of the method inprotoPayload.methodName.
Enter the time range inTimestamp.
View the results inLog fields.
You can access any Agent Assist APIs with Cloud Logging enabled by following all of the preceding steps.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis document outlines how to debug API and service usage and latency spikes within the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eYou can identify high-latency conversation IDs by using the "Traffic by API method" graph in the \u003cstrong\u003eMetrics\u003c/strong\u003e section of \u003cstrong\u003eEnabled APIs and Services\u003c/strong\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEnabling \u003cstrong\u003eAdmin Read\u003c/strong\u003e, \u003cstrong\u003eData Read\u003c/strong\u003e, and \u003cstrong\u003eData Write\u003c/strong\u003e audit logs is necessary for debugging.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLog analytics\u003c/code\u003e can be used to find conversations with latency exceeding a specific time, such as 10 seconds.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLog explorer\u003c/code\u003e can be used with the method name and timestamp to identify specific conversations during a time period.\u003c/p\u003e\n"]]],[],null,["# Troubleshooting API and services latency spike\n\nThis document gives an overview of the debugging process to understand the usage of **APIs and Services** in the Google Cloud console and also their latency spike.\n\nFirst, follow these steps to identify conversation IDs with high latency:\n\n1. Open **[Google Cloud console](https://console.cloud.google.com)** and go to the **APIs \\& Services**.\n2. Click **Enabled APIs and Services**.\n3. Go to **Metrics** and select the **API method** under **Methods**.\n\nThe latency traffic graph appears, labeled **Traffic by API method**.\n\nNext, ensure that you enable audit logging.\n\n1. Go to **Audit Logs**.\n2. Check the options **Admin Read** , **Data Read** and **Data Write**.\n3. Click **Save**.\n\nNext, identify the conversation IDs with latency longer than a certain value in `Log analytics`. For example, in the following screenshot, you can see conversations longer than 10 seconds on a particular day.\n\n1. Go to **Log analytics**.\n2. Provide the time against **TIMESTAMP_DIFF**.\n\nAlternatively, use the timestamp to identify specific conversations during a certain period in `Log explorer`.\n\n1. Enter the name of the method in **protoPayload.methodName**.\n2. Enter the time range in **Timestamp**.\n3. View the results in **Log fields**.\n\nYou can access any Agent Assist APIs with Cloud Logging enabled by following all of the preceding steps."]]