Firestore audit logging information

This document describes audit logging for Firestore. Google Cloud servicesgenerate audit logs that record administrative and access activities within your Google Cloud resources.For more information about Cloud Audit Logs, see the following:

Notes

When configuring audit logging, use the service namedatastore.googleapis.com to configure bothdatastore.googleapis.com andfirestore.googleapis.com.Once configured, logs for the Firestore API include the the service namefirestore.googleapis.com.

To view the time it took to process aDATA_READ orDATA_WRITE request, see theprocessing_duration field within themetadata object of anAuditLog.processing_duration describes the time the database took to actually process a request. This is smaller than the end-user latency. In particular, it does not include network overhead.

ForListenrequests,processing_duration is only present on the Audit Log for the initial result set returned. Its absent from subsequent Audit Logs for that sameListen target.

Individual writes from import, bulk delete operations and TTL are not audit logged.

Service name

Firestore audit logs use the service namefirestore.googleapis.com.Filter for this service:

protoPayload.serviceName="firestore.googleapis.com"

Methods by permission type

Firestore also includes the following operations as part of theKey Visualizer diagnostic tool. These areData Access audit logs and have the service namefirestorekeyvisualizer.googleapis.com. They are enabled by turning onDATA_READ for thefirestore.googleapis.com service.
  • google.cloud.keyvisualizer.KeyVisualizer.GetScan
  • google.cloud.keyvisualizer.KeyVisualizer.ListScans

Each IAM permission has atype property, whose value is an enumthat can be one of four values:ADMIN_READ,ADMIN_WRITE,DATA_READ, orDATA_WRITE. When you call a method,Firestore generates an audit log whose category is dependent on thetype property of the permission required to perform the method.Methods that require an IAM permission with thetype property valueofDATA_READ,DATA_WRITE, orADMIN_READ generateData Access audit logs.Methods that require an IAM permission with thetype property valueofADMIN_WRITE generateAdmin Activity audit logs.

API methods in the following list that are marked with (LRO) are long-running operations (LROs).These methods usually generate two audit log entries: one when the operation starts andanother when it ends. For more information seeAudit logs for long-running operations.
Permission typeMethods
ADMIN_READgoogle.cloud.location.Locations.GetLocation
google.cloud.location.Locations.ListLocations
google.firestore.admin.v1.FirestoreAdmin.GetBackup
google.firestore.admin.v1.FirestoreAdmin.GetBackupSchedule
google.firestore.admin.v1.FirestoreAdmin.GetDatabase
google.firestore.admin.v1.FirestoreAdmin.GetField
google.firestore.admin.v1.FirestoreAdmin.GetIndex
google.firestore.admin.v1.FirestoreAdmin.ListBackupSchedules
google.firestore.admin.v1.FirestoreAdmin.ListBackups
google.firestore.admin.v1.FirestoreAdmin.ListDatabases
google.firestore.admin.v1.FirestoreAdmin.ListFields
google.firestore.admin.v1.FirestoreAdmin.ListIndexes
google.firestore.admin.v1beta1.FirestoreAdmin.GetIndex
google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes
google.firestore.admin.v1beta2.FirestoreAdmin.GetField
google.firestore.admin.v1beta2.FirestoreAdmin.GetIndex
google.firestore.admin.v1beta2.FirestoreAdmin.ListFields
google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes
google.longrunning.Operations.GetOperation
google.longrunning.Operations.ListOperations
ADMIN_WRITEgoogle.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments (LRO)
google.firestore.admin.v1.FirestoreAdmin.CreateBackupSchedule
google.firestore.admin.v1.FirestoreAdmin.CreateDatabase
google.firestore.admin.v1.FirestoreAdmin.CreateIndex (LRO)
google.firestore.admin.v1.FirestoreAdmin.DeleteBackup
google.firestore.admin.v1.FirestoreAdmin.DeleteBackupSchedule
google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase
google.firestore.admin.v1.FirestoreAdmin.DeleteIndex
google.firestore.admin.v1.FirestoreAdmin.ExportDocuments (LRO)
google.firestore.admin.v1.FirestoreAdmin.ImportDocuments (LRO)
google.firestore.admin.v1.FirestoreAdmin.RestoreDatabase
google.firestore.admin.v1.FirestoreAdmin.UpdateBackupSchedule
google.firestore.admin.v1.FirestoreAdmin.UpdateDatabase
google.firestore.admin.v1.FirestoreAdmin.UpdateField (LRO)
google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex (LRO)
google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex
google.firestore.admin.v1beta1.FirestoreAdmin.ExportDocuments (LRO)
google.firestore.admin.v1beta1.FirestoreAdmin.ImportDocuments (LRO)
google.firestore.admin.v1beta2.FirestoreAdmin.CreateIndex (LRO)
google.firestore.admin.v1beta2.FirestoreAdmin.DeleteIndex
google.firestore.admin.v1beta2.FirestoreAdmin.ExportDocuments (LRO)
google.firestore.admin.v1beta2.FirestoreAdmin.ImportDocuments (LRO)
google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField (LRO)
google.longrunning.Operations.CancelOperation
google.longrunning.Operations.DeleteOperation
DATA_READgoogle.firestore.v1.Firestore.BatchGetDocuments
google.firestore.v1.Firestore.BeginTransaction
google.firestore.v1.Firestore.GetDocument
google.firestore.v1.Firestore.ListCollectionIds
google.firestore.v1.Firestore.ListDocuments
google.firestore.v1.Firestore.Listen
google.firestore.v1.Firestore.PartitionQuery
google.firestore.v1.Firestore.Rollback
google.firestore.v1.Firestore.RunAggregationQuery
google.firestore.v1.Firestore.RunQuery
google.firestore.v1beta1.Firestore.BatchGetDocuments
google.firestore.v1beta1.Firestore.BatchWrite
google.firestore.v1beta1.Firestore.BeginTransaction
google.firestore.v1beta1.Firestore.GetDocument
google.firestore.v1beta1.Firestore.ListCollectionIds
google.firestore.v1beta1.Firestore.ListDocuments
google.firestore.v1beta1.Firestore.PartitionQuery
google.firestore.v1beta1.Firestore.Rollback
google.firestore.v1beta1.Firestore.RunAggregationQuery
google.firestore.v1beta1.Firestore.RunQuery
DATA_WRITEgoogle.firestore.v1.Firestore.BatchWrite
google.firestore.v1.Firestore.Commit
google.firestore.v1.Firestore.CreateDocument
google.firestore.v1.Firestore.DeleteDocument
google.firestore.v1.Firestore.UpdateDocument
google.firestore.v1.Firestore.Write
google.firestore.v1beta1.Firestore.BatchWrite
google.firestore.v1beta1.Firestore.Commit
google.firestore.v1beta1.Firestore.CreateDocument
google.firestore.v1beta1.Firestore.DeleteDocument
google.firestore.v1beta1.Firestore.UpdateDocument

API interface audit logs

For information about how and which permissions are evaluated for each method,see the Identity and Access Management documentation for Firestore.

google.cloud.location.Locations

The following audit logs are associated with methods belonging togoogle.cloud.location.Locations.

GetLocation

ListLocations

google.firestore.admin.v1.FirestoreAdmin

The following audit logs are associated with methods belonging togoogle.firestore.admin.v1.FirestoreAdmin.

BulkDeleteDocuments

CreateBackupSchedule

CreateDatabase

CreateIndex

DeleteBackup

DeleteBackupSchedule

DeleteDatabase

DeleteIndex

ExportDocuments

GetBackup

GetBackupSchedule

GetDatabase

GetField

GetIndex

ImportDocuments

ListBackupSchedules

ListBackups

ListDatabases

ListFields

ListIndexes

RestoreDatabase

UpdateBackupSchedule

UpdateDatabase

UpdateField

google.firestore.admin.v1beta1.FirestoreAdmin

The following audit logs are associated with methods belonging togoogle.firestore.admin.v1beta1.FirestoreAdmin.

CreateIndex

DeleteIndex

ExportDocuments

GetIndex

ImportDocuments

ListIndexes

google.firestore.admin.v1beta2.FirestoreAdmin

The following audit logs are associated with methods belonging togoogle.firestore.admin.v1beta2.FirestoreAdmin.

CreateIndex

DeleteIndex

ExportDocuments

GetField

GetIndex

ImportDocuments

ListFields

ListIndexes

UpdateField

google.firestore.v1.Firestore

The following audit logs are associated with methods belonging togoogle.firestore.v1.Firestore.

BatchGetDocuments

BatchWrite

  • Method:google.firestore.v1.Firestore.BatchWrite
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.create - DATA_WRITE
    • datastore.entities.delete - DATA_WRITE
    • datastore.entities.update - DATA_WRITE
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.BatchWrite"

BeginTransaction

Commit

  • Method:google.firestore.v1.Firestore.Commit
  • Audit log type:Data access
  • Permissions:
    • datastore.databases.get - DATA_READ
    • datastore.entities.create - DATA_WRITE
    • datastore.entities.delete - DATA_WRITE
    • datastore.entities.get - DATA_READ
    • datastore.entities.update - DATA_WRITE
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.Commit"

CreateDocument

  • Method:google.firestore.v1.Firestore.CreateDocument
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.allocateIds - DATA_WRITE
    • datastore.entities.create - DATA_WRITE
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.CreateDocument"

DeleteDocument

GetDocument

  • Method:google.firestore.v1.Firestore.GetDocument
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.get - DATA_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.GetDocument"

ListCollectionIds

ListDocuments

  • Method:google.firestore.v1.Firestore.ListDocuments
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.get - DATA_READ
    • datastore.entities.list - DATA_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.ListDocuments"

Listen

Note:

Listen is a long-lived RPC that combines multiple streaming targets. Each target is a query or a set of document keys. The stream for each target includes an initial result set and a sequence of updates, additions, and removals to the result set. The targets are the relevant audit unit. Firestore audits each target as follows:

PartitionQuery

  • Method:google.firestore.v1.Firestore.PartitionQuery
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.get - DATA_READ
    • datastore.entities.list - DATA_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.PartitionQuery"

Rollback

  • Method:google.firestore.v1.Firestore.Rollback
  • Audit log type:Data access
  • Permissions:
    • datastore.databases.get - DATA_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.Rollback"

RunAggregationQuery

  • Method:google.firestore.v1.Firestore.RunAggregationQuery
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.get - DATA_READ
    • datastore.entities.list - DATA_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.RunAggregationQuery"

RunQuery

  • Method:google.firestore.v1.Firestore.RunQuery
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.get - DATA_READ
    • datastore.entities.list - DATA_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.RunQuery"
Note:RunQuery is a short-lived streaming RPC and emits a log entry when the last message (document) is sent.

UpdateDocument

  • Method:google.firestore.v1.Firestore.UpdateDocument
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.create - DATA_WRITE
    • datastore.entities.update - DATA_WRITE
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.UpdateDocument"

Write

  • Method:google.firestore.v1.Firestore.Write
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.create - DATA_WRITE
    • datastore.entities.update - DATA_WRITE
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1.Firestore.Write"
Note:Write emits a log entry for every message received as each message corresponds to an independent write to the database. The emitted log entries use the sameoperation.id.

google.firestore.v1beta1.Firestore

The following audit logs are associated with methods belonging togoogle.firestore.v1beta1.Firestore.

BatchGetDocuments

  • Method:google.firestore.v1beta1.Firestore.BatchGetDocuments
  • Audit log type:Data access
  • Permissions:
    • datastore.databases.get - DATA_READ
    • datastore.entities.get - DATA_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1beta1.Firestore.BatchGetDocuments"

BatchWrite

  • Method:google.firestore.v1beta1.Firestore.BatchWrite
  • Audit log type:Data access
  • Permissions:
    • datastore.databases.get - DATA_READ
    • datastore.entities.create - DATA_WRITE
    • datastore.entities.update - DATA_WRITE
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1beta1.Firestore.BatchWrite"

BeginTransaction

Commit

  • Method:google.firestore.v1beta1.Firestore.Commit
  • Audit log type:Data access
  • Permissions:
    • datastore.databases.get - DATA_READ
    • datastore.entities.create - DATA_WRITE
    • datastore.entities.delete - DATA_WRITE
    • datastore.entities.update - DATA_WRITE
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1beta1.Firestore.Commit"

CreateDocument

  • Method:google.firestore.v1beta1.Firestore.CreateDocument
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.allocateIds - DATA_WRITE
    • datastore.entities.create - DATA_WRITE
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1beta1.Firestore.CreateDocument"

DeleteDocument

GetDocument

ListCollectionIds

ListDocuments

  • Method:google.firestore.v1beta1.Firestore.ListDocuments
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.get - DATA_READ
    • datastore.entities.list - DATA_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1beta1.Firestore.ListDocuments"

PartitionQuery

  • Method:google.firestore.v1beta1.Firestore.PartitionQuery
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.get - DATA_READ
    • datastore.entities.list - DATA_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1beta1.Firestore.PartitionQuery"

Rollback

RunAggregationQuery

RunQuery

  • Method:google.firestore.v1beta1.Firestore.RunQuery
  • Audit log type:Data access
  • Permissions:
    • datastore.entities.get - DATA_READ
    • datastore.entities.list - DATA_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.firestore.v1beta1.Firestore.RunQuery"
Note:RunQuery is a short-lived streaming RPC and emits a log entry when the last message (document) is sent.

UpdateDocument

google.longrunning.Operations

The following audit logs are associated with methods belonging togoogle.longrunning.Operations.

CancelOperation

DeleteOperation

GetOperation

  • Method:google.longrunning.Operations.GetOperation
  • Audit log type:Data access
  • Permissions:
    • datastore.operations.get - ADMIN_READ
  • Method is a long-running or streaming operation:No.
  • Filter for this method: protoPayload.methodName="google.longrunning.Operations.GetOperation"

ListOperations

Identify request callers

Audit Log entries include information about the identity that performed thelogged operation. To identify a request caller, see the following fields withinanAuditLog object:

  • The caller's identity is held in theAuthenticationInfofield. This can include theprincipalEmail of the user. This information issometimes redacted.

    If a JSON Web Token (JWT) was used for third-party authentication, thethirdPartyPrincipal field includes the token's header and payload.For example, audit logs for requests authenticated withFirebase Authenticationinclude that request'sauth token.

  • ThecallerIp field within therequestMetadataobject of anAuditLog entry includes the IP address of the caller.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.