Firebase PNV si integra sia con Cloud Monitoring che con Cloud Logging.
Google Cloud Monitoring
Firebase PNV esporta una singola metrica, fpnv.googleapis.com/verification_count
, con
le etichette method
, outcome
e sms_region
:
Tipo di metrica Fase di lancio (Livelli della gerarchia delle risorse) Nome visualizzato |
|
---|---|
Tipo, Tipo, Unità Risorse monitorate |
Descrizione Etichette |
fpnv.googleapis.com/verification_count
BETA
(progetto)
Firebase Phone Number Verification Metriche |
|
DELTA , INT64 , 1
fpnv.googleapis.com/App |
Numero di tentativi di verifica del numero di telefono.
method :
Metodo di verifica utilizzato. Sempre API .
outcome :
Il risultato del tentativo di verifica (SUCCESS ,
FAILURE , QUOTA_EXCEEDED ,
BACKEND_ERROR ).
sms_region :
La regione da cui ha avuto origine la richiesta.
|
Google Cloud Logging
Puoi utilizzare Cloud Logging per ottenere ulteriori informazioni su una richiesta di verifica specifica del numero di telefono. Ogni tentativo di verifica del numero di telefono genera una voce di log strutturata:
ID log: 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. */
}
}
Ad esempio, per trovare tutti i log dei tentativi di verifica basati su API che hanno avuto origine da un'app specifica e non sono riusciti per qualsiasi motivo:
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"