Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Saat pengguna membuat permintaan ke API Anda,
Extensible Service Proxy (ESP)
menggunakan Cloud Logging untuk mencatat informasi
tentang permintaan dan respons. Halaman ini menjelaskan informasi yang dicatat ke dalam log.
Untuk menemukan log Cloud Endpoints di halaman Logs Explorer:
Di Google Cloud konsol, buka halaman Operations > Logging:
Objek jsonPayload berisi semua informasi yang dilaporkan oleh
ESP. Tabel berikut menjelaskan kolomnya:
Kolom
Deskripsi
url
Jalur URL permintaan.
producer_project_id
Google Cloud project ID yang memiliki API.
api_name
Nama API yang dipanggil.
api_version
Versi API bernama yang dipanggil.
api_method
Metode API bernama yang dipanggil.
api_key
Kunci API yang digunakan oleh konsumen yang memanggil, jika ada.
http_method
Metode HTTP permintaan seperti GET dan POST.
request_size_in_bytes
Ukuran isi permintaan dalam byte.
http_response_code
Kode status HTTP respons seperti 200, 404, dan 500.
response_size_in_bytes
Ukuran isi respons dalam byte.
request_latency_in_ms
Waktu yang diperlukan untuk merespons permintaan dalam milidetik, termasuk waktu yang diperlukan oleh ESP dan backend-nya. Tidak ada untuk metode streaming.
timestamp
Stempel waktu saat permintaan masuk.
location
Google Cloud zona yang melayani permintaan.
log_message
Pesan singkat tentang metode yang dipanggil dan statusnya jika ditolak. Tidak ada kolom informasi API yang dicatat dalam log untuk panggilan yang ditolak.
error_cause
Pesan error jika responsnya adalah error.
labels
Bagian labels berisi informasi yang mengidentifikasi sumber log tersebut, seperti Google Cloud project ID, nama layanan Endpoint, nomor versi API, dan nama metode.
[[["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-08-18 UTC."],[[["\u003cp\u003eExtensible Service Proxy (ESP) logs request and response information to Cloud Logging when users interact with your API.\u003c/p\u003e\n"],["\u003cp\u003eYou can access these logs in the Logs Explorer by selecting "Produced API" and your specific service name.\u003c/p\u003e\n"],["\u003cp\u003eEach log entry is a structured JSON message containing detailed fields about the API request, such as the URL, API name, version, method, and HTTP method used.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ejsonPayload\u003c/code\u003e in the log includes crucial information such as request and response sizes, latency, HTTP response codes, timestamps, and any error causes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003elabels\u003c/code\u003e section in the log provides details about the log's source, including the Google Cloud project ID, Endpoints service name, API version number, and method name.\u003c/p\u003e\n"]]],[],null,["# Endpoints logs\n\n\u003cbr /\u003e\n\nWhen users make requests to your API,\n[Extensible Service Proxy (ESP)](/endpoints/docs/frameworks/glossary#extensible_service_proxy)\nuses Cloud Logging to log information\nabout the requests and responses. This page describes the information logged.\n\nTo locate Cloud Endpoints logs on the **Logs Explorer** page:\n\n1. In the Google Cloud console, go to the **Operations** \\\u003e **Logging**\n page:\n\n\n [Go to the Logs Explorer page](https://console.cloud.google.com/logs/query)\n\n \u003cbr /\u003e\n\n2. Select **Produced API, \u003cvar translate=\"no\"\u003eSERVICE_NAME\u003c/var\u003e** , where\n \u003cvar translate=\"no\"\u003eSERVICE_NAME\u003c/var\u003e is the name of the\n Endpoints service.\n\n | **Note:** You can select **Produced API** from the resource menu only if a recent log message contains the **API** resource type.\n\n \u003cbr /\u003e\n\n3. Click the log you want to investigate. The log contains a structured JSON\n message such as the following:\n\n {\n insertId: \"...\"\n jsonPayload: {...}\n resource: {\n type: \"api\"\n labels: {...}\n }\n timestamp: \"2017-05-08T15:00:02.804424422Z\"\n severity: \"INFO\"\n logName: \"...\"\n }\n\nThe `jsonPayload` object contains all the information reported by\nESP. The following table describes its fields:\n\nWhat's next\n-----------\n\n- [Monitoring your API](/endpoints/docs/frameworks/monitoring-your-api)"]]