Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wenn Nutzer Anfragen an Ihre API senden, protokolliert der Extensible Service Proxy (ESP) mithilfe von Cloud Logging Informationen über die Anfragen und Antworten. Auf dieser Seite werden die protokollierten Daten beschrieben.
So finden Sie Cloud Endpoints-Logs auf der Seite Log-Explorer:
Rufen Sie in der Google Cloud Console die Seite Verwaltung > Logging auf:
Das Objekt jsonPayload enthält alle vom ESP gemeldeten Informationen. In der folgenden Tabelle werden die Felder dieses Objekts beschrieben:
Feld
Beschreibung
url
URL-Pfad der Anfrage.
producer_project_id
ID desGoogle Cloud -Projekts, dem die API gehört.
api_name
Name der aufgerufenen API.
api_version
Version der aufgerufenen benannten API.
api_method
Methode der aufgerufenen benannten API.
api_key
Vom aufrufenden Nutzer verwendeter API-Schlüssel, falls vorhanden.
http_method
HTTP-Methode der Anfrage, z. B. GET oder POST.
request_size_in_bytes
Größe des Anfragetexts in Byte.
http_response_code
HTTP-Statuscode der Antwort, z. B. 200, 404 oder 500.
response_size_in_bytes
Größe des Antworttexts in Byte.
request_latency_in_ms
Die Zeit in Millisekunden, die es gedauert hat, um auf die Anfrage zu antworten, einschließlich der vom ESP und seinem Back-End benötigten Zeit. Für Streamingmethoden nicht vorhanden.
timestamp
Zeitstempel für den Eingang der Anfrage.
location
Google Cloud -Zone, von der die Anfrage bearbeitet wurde.
log_message
Kurze Meldung zur aufgerufenen Methode und ihrem Status, wenn sie abgelehnt wird. Für abgelehnte Aufrufe werden keine API-Informationsfelder protokolliert.
error_cause
Fehlermeldung, wenn die Antwort ein Fehler war.
labels
Der Abschnitt labels enthält Informationen zur Identifizierung der Logquelle, z. B. die Google Cloud Projekt-ID, den Endpoints-Dienstnamen, die API-Versionsnummer und den Methodennamen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-03 (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)"]]