Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Memantau metrik reCAPTCHA
Dokumen ini menjelaskan metrik reCAPTCHA yang dihasilkan
Identity Platform sebagai hasil dari integrasi Identity Platform dengan reCAPTCHA Enterprise API dan cara
melihatnya dengan Cloud Monitoring.
Jika Anda telah mengaktifkan perlindungan dari bot reCAPTCHA atau reCAPTCHA SMS defense dalam mode audit, memantau metrik reCAPTCHA akan membantu Anda menentukan apakah Anda dapat mengaktifkan penerapan. Anda harus mempertimbangkan hal berikut
sebelum mengaktifkan penerapan:
Jika sebagian besar permintaan terbaru memiliki token yang valid dan rasio verdict PASSED
ke FAILED_AUDIT atau FAILED_ENFORCE dapat diterima untuk kasus
bisnis Anda, pertimbangkan untuk mengaktifkan penegakan.
Jika sebagian besar permintaan terbaru kemungkinan berasal dari klien yang sudah lama,
pertimbangkan untuk menunggu lebih banyak pengguna mengupdate aplikasi mereka sebelum mengaktifkan
penerapan. Penerapan integrasi Identity Platform dengan reCAPTCHA Enterprise API akan merusak versi aplikasi sebelumnya yang tidak terintegrasi dengan reCAPTCHA.
Untuk memastikan bahwa fitur integrasi berfungsi sebagaimana mestinya, Anda dapat memeriksa metrik berikut yang dihasilkan project Anda ke Cloud Monitoring.
Metrik ini melacak berbagai verdict yang ditampilkan oleh reCAPTCHA. Verdict
akan dibuat jika token ada. Anda dapat memfilter berdasarkan verdict
berikut:
PASSED: Menunjukkan bahwa permintaan tertentu diizinkan saat penerapan diaktifkan.
FAILED_AUDIT: Menunjukkan bahwa permintaan tertentu ditolak saat mode audit reCAPTCHA diaktifkan.
FAILED_ENFORCE: Menunjukkan bahwa permintaan tertentu ditolak saat mode penerapan reCAPTCHA diaktifkan.
CLIENT_TYPE_MISSING: Menunjukkan bahwa permintaan tertentu memiliki jenis klien yang tidak ada saat penerapan reCAPTCHA diaktifkan. Error ini
biasanya terjadi jika permintaan dikirim menggunakan versi SDK klien
yang sudah tidak berlaku dan tidak memiliki dukungan reCAPTCHA.
KEYS_MISSING: Menunjukkan bahwa permintaan tertentu tidak dapat diverifikasi karena
Identity Platform tidak dapat mengambil kunci reCAPTCHA yang valid saat
penerapan reCAPTCHA diaktifkan.
Metrik ini melacak jumlah dan status token reCAPTCHA yang diterima oleh backend Identity Platform. Anda dapat memfilter berdasarkan status berikut:
VALID: Menunjukkan bahwa token reCAPTCHA yang diteruskan valid.
EXPIRED: Menunjukkan bahwa token reCAPTCHA yang diteruskan telah berakhir masa berlakunya. Token yang sudah tidak berlaku mungkin menunjukkan masalah jaringan klien atau penyalahgunaan.
DUPLICATE: Menunjukkan bahwa token reCAPTCHA yang diteruskan adalah duplikat. Token duplikat mungkin menunjukkan masalah jaringan klien atau penyalahgunaan.
INVALID: Menunjukkan bahwa token reCAPTCHA yang diteruskan tidak valid. Token yang tidak valid dapat menunjukkan penyalahgunaan.
MISSING: Menunjukkan bahwa token reCAPTCHA tidak ada dalam
permintaan yang diberikan. Token yang tidak ada mungkin menunjukkan aplikasi klien yang sudah tidak berlaku.
UNCHECKED: Menunjukkan bahwa token reCAPTCHA tidak diperiksa karena verdict CLIENT_TYPE_MISSING atau KEYS_MISSING.
Jika aplikasi berhasil diluncurkan kepada pengguna, Anda akan melihat traffic dengan token yang valid. Jumlah token yang valid kemungkinan sebanding dengan jumlah pengguna
yang menggunakan aplikasi yang telah diupdate.
Metrik ini melacak distribusi skor reCAPTCHA. Hal ini dapat
membantu Anda menentukan rentang skor yang optimal untuk konfigurasi perlindungan terhadap bot.
Metrik ini melacak distribusi skor risiko reCAPTCHA SMS defense untuk project Identity Platform tertentu. Hal ini dapat membantu Anda menentukan rentang skor yang optimal untuk konfigurasi pertahanan SMS reCAPTCHA.
Melihat metrik reCAPTCHA
Untuk melihat metrik reCAPTCHA dengan Cloud Monitoring, lakukan langkah berikut:
Di konsol Google Cloud , buka halaman Metrics Explorer.
Dari Select a metric, masukkan Identity Toolkit Tenant. Jika menggunakan multi-tenancy, Anda dapat melihat metrik untuk setiap tenant, serta project induk, dengan membiarkan tenant_name kosong.
[[["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 details how to monitor reCAPTCHA metrics emitted by Identity Platform after integrating with the reCAPTCHA Enterprise API, including optional SMS toll fraud protection.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eidentitytoolkit.googleapis.com/recaptcha/verdict_count\u003c/code\u003e metric tracks verdicts like \u003ccode\u003ePASSED\u003c/code\u003e, \u003ccode\u003eFAILED_AUDIT\u003c/code\u003e, \u003ccode\u003eFAILED_ENFORCE\u003c/code\u003e, \u003ccode\u003eCLIENT_TYPE_MISSING\u003c/code\u003e, and \u003ccode\u003eKEYS_MISSING\u003c/code\u003e, which indicate the success or failure of reCAPTCHA checks.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eidentitytoolkit.googleapis.com/recaptcha/token_count\u003c/code\u003e metric tracks the status of reCAPTCHA tokens received, including \u003ccode\u003eVALID\u003c/code\u003e, \u003ccode\u003eEXPIRED\u003c/code\u003e, \u003ccode\u003eDUPLICATE\u003c/code\u003e, \u003ccode\u003eINVALID\u003c/code\u003e, \u003ccode\u003eMISSING\u003c/code\u003e, and \u003ccode\u003eUNCHECKED\u003c/code\u003e statuses.\u003c/p\u003e\n"],["\u003cp\u003eMonitoring \u003ccode\u003eidentitytoolkit.googleapis.com/recaptcha/risk_scores\u003c/code\u003e and \u003ccode\u003eidentitytoolkit.googleapis.com/recaptcha/sms_tf_risk_scores\u003c/code\u003e helps define optimal score ranges for bot and SMS toll fraud protection configurations.\u003c/p\u003e\n"],["\u003cp\u003eTo view these metrics, you can access the Metrics Explorer in the Google Cloud console and search for "Identity Toolkit Tenant".\u003c/p\u003e\n"]]],[],null,["# Monitor reCAPTCHA metrics\n=========================\n\nThis document describes the reCAPTCHA metrics that your\nIdentity Platform emits as a result of the Identity Platform integration with the reCAPTCHA Enterprise API and how to\nview them with Cloud Monitoring.\n\nreCAPTCHA metrics\n-----------------\n\nAfter you [set up the\nIdentity Platform integration with the reCAPTCHA Enterprise API](/identity-platform/docs/recaptcha-enterprise), and\noptionally, [enable\nreCAPTCHA SMS defense](/identity-platform/docs/recaptcha-tfp), you\ncan monitor the reCAPTCHA metrics your project emits to ensure\nthat your authentication flows are protected. If reCAPTCHA\nkey provisioning fails or if required service accounts weren't created,\nreCAPTCHA authentication fails open.\n\nIf you've enabled reCAPTCHA bot protection or reCAPTCHA SMS defense in\naudit mode, monitoring the reCAPTCHA metrics will help you\ndetermine if you can enable enforcement. You should consider the following\nbefore enabling enforcement:\n\n- If the majority of recent requests have valid tokens and the ratio of `PASSED` to `FAILED_AUDIT` or `FAILED_ENFORCE` verdicts is acceptable for your business case, consider enabling enforcement.\n- If a majority of the recent requests are likely from outdated clients, consider waiting for more users to update their app before enabling enforcement. Enforcing Identity Platform integration with the reCAPTCHA Enterprise API breaks prior app versions that are not integrated with reCAPTCHA.\n\nTo ensure that the integration features are working as intended, you can examine\nthe following metrics your project emits to Cloud Monitoring.\n\n### `identitytoolkit.googleapis.com/recaptcha/verdict_count`\n\nThis metric tracks the different verdicts returned by reCAPTCHA. A\nverdict is generated if a token is present. You can filter on the following\nverdicts:\n\n- `PASSED`: Indicates that a given request is allowed when enforcement is enabled.\n- `FAILED_AUDIT`: Indicates that a given request is denied when reCAPTCHA audit mode is enabled.\n- `FAILED_ENFORCE`: Indicates that a given request is denied when reCAPTCHA enforcement mode is enabled.\n- `CLIENT_TYPE_MISSING`: Indicates that a given request has a missing client type when reCAPTCHA enforcement is enabled. This error typically occurs if a request was sent using an outdated client SDK version that does not have reCAPTCHA support.\n- `KEYS_MISSING`: Indicates that a given request can't be verified because Identity Platform can't retrieve valid reCAPTCHA keys when reCAPTCHA enforcement is enabled.\n\nTo modify your score ranges to change the ratio of passed-to-failed verdicts,\nsee [Enable reCAPTCHA bot protection](/identity-platform/docs/recaptcha-enterprise#enable).\n\n### `identitytoolkit.googleapis.com/recaptcha/token_count`\n\nThis metric tracks the number and status of reCAPTCHA tokens received\nby the Identity Platform backend. You can filter on the following statuses:\n\n- `VALID`: Indicates that the reCAPTCHA token passed in is valid.\n- `EXPIRED`: Indicates that the reCAPTCHA token passed in has expired. An expired token might indicate client network issues or abuse.\n- `DUPLICATE`: Indicates that the reCAPTCHA token passed in is a duplicate. A duplicate token might indicate client network issues or abuse.\n- `INVALID`: Indicates that the reCAPTCHA token passed in is invalid. An invalid token might indicate abuse.\n- `MISSING`: Indicates that the reCAPTCHA token doesn't exist in the given request. Missing tokens might indicate an outdated client app.\n- `UNCHECKED`: Indicates that the reCAPTCHA token was not checked due to `CLIENT_TYPE_MISSING` or `KEYS_MISSING` verdicts.\n\nIf your app rolled out successfully to users, you will see traffic with valid\ntokens. The number of valid tokens is likely proportional to the number of users\nwho are using your updated app.\n\n### `identitytoolkit.googleapis.com/recaptcha/risk_scores`\n\nThis metric tracks the reCAPTCHA score distribution. This can\nhelp you define the optimal score ranges for your bot protection configuration.\n\n### `identitytoolkit.googleapis.com/recaptcha/sms_tf_risk_scores`\n\nThis metric tracks the reCAPTCHA SMS defense risk score\ndistribution for a particular Identity Platform project. This can help you define the optimal score ranges for your reCAPTCHA SMS defense configuration.\n\nView reCAPTCHA metrics\n----------------------\n\nTo view the reCAPTCHA metrics with Cloud Monitoring, do the\nfollowing:\n\n1. In the Google Cloud console, go to the **Metrics explorer** page.\n\n [Go to Metrics explorer](https://console.cloud.google.com/monitoring/metrics-explorer)\n2. From **Select a metric** , enter **Identity Toolkit Tenant** . If you are\n using multi-tenancy, you can view metrics for each tenant, as well as the\n parent project, by leaving `tenant_name` empty.\n\nWhat's next\n-----------\n\n- Learn how to [troubleshoot common\n issues](/identity-platform/docs/recaptcha-troubleshooting) with the reCAPTCHA integration."]]