Firebase PNV משולב עם Cloud Monitoring ועם Cloud Logging.
Google Cloud Monitoring
Firebase PNV מייצא מדד יחיד, fpnv.googleapis.com/verification_count
, עם התוויות method
, outcome
ו-sms_region
:
סוג המדד שלב ההשקה (רמות בהיררכיית המשאבים) שם לתצוגה |
|
---|---|
סוג, יחידה משאבים במעקב |
תיאור תוויות |
fpnv.googleapis.com/verification_count
בטא
(פרויקט)
Firebase Phone Number Verification מדדים |
|
DELTA , INT64 , 1
fpnv.googleapis.com/App |
מספר הניסיונות לאימות מספר הטלפון.
method :
שיטת האימות שבה נעשה שימוש. תמיד API .
outcome :
התוצאה של ניסיון האימות (SUCCESS ,
FAILURE , QUOTA_EXCEEDED ,
BACKEND_ERROR ).
sms_region :
האזור שממנו נשלחה הבקשה.
|
Google Cloud Logging
אפשר להשתמש ב-Cloud Logging כדי לקבל מידע נוסף על בקשה ספציפית לאימות מספר טלפון. כל ניסיון לאימות מספר טלפון יוצר רשומה מובנית ביומן:
מזהה יומן: 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. */
}
}
לדוגמה, כדי למצוא את כל היומנים של ניסיונות אימות מבוססי-API שמקורם באפליקציה ספציפית ונכשלו מסיבה כלשהי:
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"