Buka Metrics, lalu pilih API method di bagian Methods.
Grafik traffic latensi akan muncul, yang diberi label Traffic by API method.
Selanjutnya, pastikan Anda mengaktifkan logging audit.
Buka Log Audit.
Centang opsi Admin Read, Data Read, dan Data Write.
Klik Simpan.
Selanjutnya, identifikasi ID percakapan dengan latensi yang lebih lama dari nilai tertentu di Log analytics. Misalnya, pada screenshot berikut, Anda dapat melihat percakapan yang berdurasi lebih dari 10 detik pada hari tertentu.
Buka Log Analytics.
Berikan waktu terhadap TIMESTAMP_DIFF.
Atau, gunakan stempel waktu untuk mengidentifikasi percakapan tertentu selama periode tertentu di Log explorer.
Masukkan nama metode di protoPayload.methodName.
Masukkan rentang waktu di Stempel waktu.
Lihat hasilnya di Kolom log.
Anda dapat mengakses API Agent Assist apa pun dengan Cloud Logging diaktifkan dengan mengikuti semua langkah sebelumnya.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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."]]