Firebase PNV hem Cloud Monitoring hem de Cloud Logging ile entegre olur.
Google Cloud Monitoring
Firebase PNV, method, outcome ve sms_region etiketleriyle tek bir metrik olan fpnv.googleapis.com/verification_count değerini dışa aktarır:
| Metrik türü Lansman aşaması (Kaynak hiyerarşisi düzeyleri) Görünen ad |
|
|---|---|
| Tür, Tür, Birim İzlenen kaynaklar |
Açıklama Etiketler |
fpnv.googleapis.com/verification_count
BETA
(proje)
Firebase Phone Number Verification Metrikler |
|
DELTA, INT64, 1
fpnv.googleapis.com/App |
Telefon numarası doğrulama denemelerinin sayısı.
method:
Kullanılan doğrulama yöntemi. Her zaman API.
outcome:
Doğrulama denemesinin sonucu (SUCCESS,
FAILURE, QUOTA_EXCEEDED,
BACKEND_ERROR).
sms_region:
İsteğin geldiği bölge.
|
Google Cloud Logging
Belirli bir telefon numarası doğrulama isteği hakkında daha fazla bilgi edinmek için Cloud Logging'i kullanabilirsiniz. Her telefon numarası doğrulama denemesi, yapılandırılmış bir günlük girişi oluşturur:
Günlük kimliği: fpnv.googleapis.com/verifications
{
"resource": {
"type": "fpnv.googleapis.com/App",
"labels": [
"resource_container": /* Your Firebase / Google Cloud project ID: "project/your-project-id" */,
"app_id": /* The ID of a Firebase app within your project */
]
},
"severity": /* DEBUG (for successful verification) or WARNING (for failed verification) */,
"jsonPayload": {
"method": /* The method used for the verification attempt: METHOD_UNSPECIFIED, API */,
"outcome": /* The final outcome of the verification attempt: OUTCOME_UNSPECIFIED, SUCCESS, FAILURE, QUOTA_EXCEEDED, BACKEND_ERROR, DEVICE_INTEGRITY_FAILURE */,
"nonce": /* Unique ID for the verification attempt, provided to the SDK by the client if using API verification. */,
"response_code": /* The HTTP response code returned to the client, if the interaction was over HTTP. */,
"sms_region_code": /* The region from which the request originated. */,
"error_code": /* A specific error code from the underlying verification service or provider, if available. */,
"error_message": /* A message describing why the verification failed, if applicable. */
}
}
Örneğin, belirli bir uygulamadan kaynaklanan ve herhangi bir nedenle başarısız olan API tabanlı doğrulama girişimlerine ait tüm günlükleri bulmak için:
log_id("fpnv.googleapis.com/verifications") AND
resource.type="fpnv.googleapis.com/App" AND
resource.labels.app_id="Your Firebase app ID" AND
severity>=WARNING AND
jsonPayload.method:"API"