App Check-Anfragemesswerte für Cloud Functions überwachen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Nachdem Sie das App Check SDK in Ihre App eingebunden haben, aber bevor Sie die App Check-Durchsetzung aktivieren, sollten Sie prüfen, ob dadurch Ihre bestehenden legitimen Nutzer beeinträchtigt werden.
Für Cloud Functions können Sie App Check-Messwerte abrufen, indem Sie die Logs Ihrer Funktionen untersuchen. Bei jedem Aufruf einer aufrufbaren Funktion wird ein strukturierter Logeintrag wie im folgenden Beispiel ausgegeben:
{"severity":"INFO",// INFO, WARNING, or ERROR"logging.googleapis.com/labels":{"firebase-log-type":"callable-request-verification"},"jsonPayload":{"message":"Callable header verifications passed.","verifications":{// ..."app":"MISSING",// VALID, INVALID, or MISSING}}}
Sie können diese Messwerte in der Google Cloud Console analysieren, indem Sie einen logbasierten Zählermesswert mit dem folgenden Messwertfilter erstellen:
Wenn Sie wissen, wie sich App Check auf Ihre Nutzer auswirkt, und Sie bereit sind, fortzufahren, können Sie die Erzwingung von App Check für Cloud Functions aktivieren.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-23 (UTC)."],[],[],null,["After you add the App Check SDK to your app, but before you enable\nApp Check enforcement, you should make sure that doing so won't disrupt your\nexisting legitimate users.\n\nFor Cloud Functions, you can get App Check metrics by examining your\nfunctions' logs. Every invocation of a callable function emits a structured log\nentry like the following example: \n\n {\n \"severity\": \"INFO\", // INFO, WARNING, or ERROR\n \"logging.googleapis.com/labels\": {\"firebase-log-type\": \"callable-request-verification\"},\n \"jsonPayload\": {\n \"message\": \"Callable header verifications passed.\",\n \"verifications\": {\n // ...\n \"app\": \"MISSING\", // VALID, INVALID, or MISSING\n }\n }\n }\n\nYou can analyze these metrics in the Google Cloud console by [creating a\nlogs-based counter metric](https://cloud.google.com/logging/docs/logs-based-metrics/counter-metrics)\nwith the following metric filter: \n\n```\nresource.type=\"cloud_function\"\nresource.labels.function_name=\"YOUR_CLOUD_FUNCTION\"\nresource.labels.region=\"us-central1\"\nlabels.firebase-log-type=\"callable-request-verification\"\n```\n\n[Label the metric](https://cloud.google.com/logging/docs/logs-based-metrics/labels#create-label)\nusing the field `jsonPayload.verifications.appCheck`.\n\nNext steps\n\nWhen you understand how App Check will affect your users and you're ready to\nproceed, you can [enable App Check enforcement](/docs/app-check/cloud-functions)\nfor Cloud Functions."]]