{"id":517435,"date":"2023-12-12T14:59:08","date_gmt":"2023-12-12T13:59:08","guid":{"rendered":"https:\/\/www.devoteam.com\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/"},"modified":"2025-04-10T10:32:59","modified_gmt":"2025-04-10T08:32:59","slug":"tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics","status":"publish","type":"expert-view","link":"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/","title":{"rendered":"Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Explore how to enhance Firestore debugging using Google Cloud Audit Logs and Log Analytics.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>This <\/em>article<em> was written by Sijohn Mathew &#8211; Senior Cloud Architect\u00a0in Devoteam G Cloud\u00a0in Stockholm.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction: Necessity of Traceability in Firestore<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this guide, we will explore enhancing Firestore debugging with Google Cloud Audit Logs and Log Analytics. Sit back and follow my 3 simple steps that will allow you to gain valuable insights into your application\u2019s data access patterns.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But firstly, a few words about Firestore. As a developer, I appreciate Firestore&#8217;s scalability and user-friendly approach for rapid development. It&#8217;s ideal for real-time web\/mobile apps dealing with large data. Yet, as apps expand and data grows, monitoring and debugging Firestore queries, and managing Pay-as-you-go costs, become more challenging.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While Firebase Dashboard provides some basic monitoring tools to understand the daily usage patterns (see the picture below), they don\u2019t offer direct insights into the origin of queries, and the collections or documents with which the queries interact etc, which can make troubleshooting performance issues and optimizing data access patterns a daunting task.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is where Google Cloud Audit Logs and Log Analytics come in handy to address a few of these challenges.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/image-13.png\" alt=\"\" class=\"wp-image-90935\"\/><figcaption class=\"wp-element-caption\"><em>Firebase Built-In Dashboard<br><\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Enable Firestore Data Access Audit Logs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To start tracing Firestore queries, first enable Data Access Audit Logs in the Firebase console.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to <strong><a href=\"https:\/\/console.cloud.google.com\/\">IAM &amp; Admin<\/a> &gt; Audit Logs. <\/strong>Find Access Approval &amp; Firestore\/Datastore API. Select Data Read &amp; Data Write Log Types for both Service and Save. This will ensure that all Firestore read and write operations are recorded in audit logs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/image-1-5.png\" alt=\"\" class=\"wp-image-90945\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Create a Log Analytics Bucket<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Log Analytics brings capabilities to search, aggregate, or transform logs at query time directly into Cloud Logging. It leverages the power of BigQuery to enable Cloud Logging users to perform Analytics on Log data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Log Analytics is included in the standard Google Cloud Logging pricing. Queries submitted through the Log Analytics user interface do not incur any additional cost. Enabling analysis in BigQuery is optional and, if enabled, queries submitted against the BigQuery linked data set including Data Studio, Looker and via BigQuery API, incur the standard BigQuery query cost.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to <strong>Operations \u2192 Logging \u2192 <a href=\"https:\/\/console.cloud.google.com\/projectselector2\/logs\/analytics?supportedpurview=folder,organizationId,project\">Log Analytics<\/a><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If are not already using Log Analytics, you get an option to \u201c<strong>Create Log Bucket<\/strong>\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/image-2-4.png\" alt=\"\" class=\"wp-image-90955\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Set the Retention Period Eg: 5 days etc. Default is 30 Days<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Optionally you can Create a BigQuery dataset that link to this bucket. This will help if you need to analyse the logs in the BigQuery SQL Studio.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After clicking the \u201c<strong>Create Bucket<\/strong>\u201d, you will be prompted to create a Sink. Follow the screens.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/image-3-4.png\" alt=\"\" class=\"wp-image-90965\"\/><figcaption class=\"wp-element-caption\"><em>Create logs routing Sink<\/em><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The key here is the Inclusion filter. Remember to add the below inclusion filter<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>protoPayload.serviceName=\"firestore.googleapis.com\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Analyze Logs Using Queries in Logs Explorer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">With Firestore audit logs flowing into Log Analytics, you can now start analyzing them using queries in the Logs Explorer. The Logs Explorer provides a powerful SQL-like query language that allows you to filter and visualize log data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to <strong><a href=\"https:\/\/console.cloud.google.com\/logs\/analytics\">Log Analytics<\/a><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/image-4-3.png\" alt=\"\" class=\"wp-image-90977\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Explore the \u201c<strong>proto_payload<\/strong>\u201d attribute. This will give insights to many details on the Firestore DB usage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example queries in the Logs Explorer<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To find the most frequently used methods in Firestore API Calls:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nSELECT\n  DISTINCT proto_payload.audit_log.method_name as method_name, count(*) as count\nFROM\n  `&lt;your-project-id&gt;.global.firestore_query_analytics._AllLogs`\n  group by method_name\n  order by count desc\nLIMIT 1000<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/image-5-2.png\" alt=\"\" class=\"wp-image-90990\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/cloud.google.com\/firestore\/docs\/audit-logging\"><u>Firestore<\/u><\/a>: If a JSON Web Token (JWT) was used for third-party authentication, the <code>thirdPartyPrincipal<\/code> field includes the token&#8217;s header and payload. For example, audit logs for requests authenticated with <a href=\"https:\/\/firebase.google.com\/docs\/auth\">Firebase Authentication<\/a> include that request&#8217;s <a href=\"https:\/\/firebase.google.com\/docs\/auth\/users#auth_tokens\">auth token<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sample Query to list and extract details from the <strong>proto_payload<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT\n  timestamp, resource.type, proto_payload, \n  proto_payload.audit_log.authentication_info.principal_email as auth_email, \n  proto_payload.audit_log.authentication_info.third_party_principal as auth_thrirdparty,\n  proto_payload.audit_log.authentication_info.third_party_principal.payload.email as auth_thrirdparty_email, \n  proto_payload.audit_log.request.collectionId as collectionId, \n  proto_payload.audit_log.metadata.processingDuration as duration, \n  proto_payload.audit_log.request_metadata.caller_ip as callerip\nFROM\n  `&lt;your-project-id&gt;.global.firestore_query_analytics._AllLogs`\n  WHERE proto_payload.audit_log.method_name IN  \n          ('google.firestore.v1.Firestore.Listen')\nLIMIT 10000<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Finding Collections that are accessed from different IP\u2019s by user ids by the ListDocuments API:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/image-6-2.png\" alt=\"\" class=\"wp-image-91000\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Finding Documents which are accessed by Write API users (categorized principal email &amp; JWT token):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/image-7-2.png\" alt=\"\" class=\"wp-image-91010\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Extra-Tips-&amp;-Tricks\">Extra Firestore Tips &amp; Tricks<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>Analysing Log Data in BigQuery<\/strong><\/em> : If you are more comfortable with running queries in Bigquery SQL, you can do the same in the BigQuery console if you have enabled BigQuery in the Step-2<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>Log Router &amp; Log Storage: <\/strong><\/em>To view\/edit the above created Sink. Navigate to Log Router (<a href=\"https:\/\/console.cloud.google.com\/logs\/router\"><em><u>https:\/\/console.cloud.google.com\/logs\/router<\/u><\/em><\/a>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similarly to view the bucket details or to enable\/disable BigQuery Analysis. Visit the Log Storage Section (<a href=\"https:\/\/console.cloud.google.com\/logs\/storage\"><em><u>https:\/\/console.cloud.google.com\/logs\/storage<\/u><\/em><\/a><em>)<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Clean-Up\">Clean Up<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once you collect enough log data for analysing the Firestore Data Access pattern, may be for 2\u20133 days. Turn off the Audit Logs to prevent huge Logging cost.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to <strong><a href=\"https:\/\/console.cloud.google.com\/iam-admin\/audit\">IAM &amp; Admin<\/a> &gt; Audit Logs. <\/strong>Find Access Approval &amp; Firestore\/Datastore API. De-Select Data Read &amp; Data Write Log Types for both Service and Save.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Conclusion\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By analyzing Firestore audit logs using Google Cloud Audit Logs and Log Analytics, you can gain valuable insights into your application\u2019s data access patterns. Here are some key observations you can make:<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li><strong>Identify frequently accessed collections and documents:<\/strong> Analyze the frequency of reads and writes to pinpoint frequently accessed collections and documents. This can help you optimize data access patterns and identify potential bottlenecks.<\/li>\n\n\n\n<li><strong>Track app activity and user behavior: <\/strong>Monitor read and write operations initiated by specific user IDs. This can help you understand user behavior and identify any anomalies or suspicious activity.<\/li>\n\n\n\n<li><strong>Debug query performance:<\/strong> Analyze query duration and throughput to identify slow-running queries or performance bottlenecks. This can help you optimize query structure and improve overall application performance.<\/li>\n<\/ol>\n\n\n\n\t<div class=\"align wp-block-acf-lead-magnet\">\n\n\t\n\t\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-70787b68 wp-block-group-is-layout-flex\" style=\"border-top-color:var(--wp--preset--color--gray);border-top-width:1px;border-bottom-color:var(--wp--preset--color--gray);border-bottom-width:1px;margin-top:var(--wp--preset--spacing--x-large);margin-bottom:var(--wp--preset--spacing--x-large);padding-top:var(--wp--preset--spacing--large);padding-bottom:var(--wp--preset--spacing--large)\">\n<figure class=\"wp-block-image size-large has-custom-border\"><img decoding=\"async\" src=\"https:\/\/devo2024.local\/wp-content\/uploads\/2024\/09\/diego-jimenez-A-NVHPka9Rk-unsplash-scaled-1-1024x683.jpg\" alt=\"\" class=\"wp-image-37449\" style=\"border-top-right-radius:150px;border-bottom-right-radius:150px;aspect-ratio:3\/2;object-fit:cover\"\/><\/figure>\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-2efe2b56 wp-block-group-is-layout-constrained\" style=\"padding-right:0;padding-left:0\"><p>We are happy to support your Google Cloud journey, contact us to see how we can answer your needs.<\/p>\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" target=\"\" href=\"https:\/\/gcloud.devoteam.com\/contact-us\/\">Talk to our experts<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\t\n\t<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Explore how to enhance Firestore debugging using Google Cloud Audit Logs and Log Analytics. This article was written by Sijohn Mathew &#8211; Senior Cloud Architect\u00a0in Devoteam G Cloud\u00a0in Stockholm. Introduction: Necessity of Traceability in Firestore In this guide, we will explore enhancing Firestore debugging with Google Cloud Audit Logs and Log Analytics. Sit back and [&hellip;]<\/p>\n","protected":false},"featured_media":322518,"template":"","categories":[907],"tags":[1833],"industry":[],"class_list":["post-517435","expert-view","type-expert-view","status-publish","has-post-thumbnail","hentry","category-google-cloud","tag-google-cloud-lu"],"acf":[],"cards":"\n\t<div class=\"single-post-card\">\n\n\t\t<figure class=\"wp-block-post-featured-image\"><a href=\"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/\" target=\"_self\" ><img width=\"2560\" height=\"1707\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1.jpg\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics\" style=\"aspect-ratio:4\/3;width:100%;object-fit:cover;\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1.jpg 2560w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-300x200.jpg 300w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-1024x683.jpg 1024w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-768x512.jpg 768w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-1536x1024.jpg 1536w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-2048x1366.jpg 2048w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/a><\/figure>\n\n\t\t\n\t\t<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-43282307 wp-block-group-is-layout-flex\">\n\t<p style=\"font-style:normal;font-weight:700\" class=\"has-link-color wp-elements-1 wp-block-lp-post-type has-text-color has-primary-color has-small-font-size\">Expert View<\/p>\n\n\t\t\n\t\t<h3 style=\"font-style:normal;font-weight:400\" class=\"wp-block-post-title has-base-font-size\"><a href=\"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/\" target=\"_self\" >Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics<\/a><\/h3><\/div>\n\t\t\n\t<\/div>\n\n","yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.4 (Yoast SEO v28.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics | Devoteam<\/title>\n<meta name=\"description\" content=\"In this step by step guide, we will explore enhancing Firestore debugging with Google Cloud Audit Logs and Log Analytics.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics\" \/>\n<meta property=\"og:description\" content=\"In this step by step guide, we will explore enhancing Firestore debugging with Google Cloud Audit Logs and Log Analytics.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/\" \/>\n<meta property=\"og:site_name\" content=\"Devoteam\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-10T08:32:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1707\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/expert-view\\\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\\\/\",\"url\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/expert-view\\\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\\\/\",\"name\":\"Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics | Devoteam\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/expert-view\\\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/expert-view\\\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/61A9714-scaled-1.jpg\",\"datePublished\":\"2023-12-12T13:59:08+00:00\",\"dateModified\":\"2025-04-10T08:32:59+00:00\",\"description\":\"In this step by step guide, we will explore enhancing Firestore debugging with Google Cloud Audit Logs and Log Analytics.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/expert-view\\\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\\\/#breadcrumb\"},\"inLanguage\":\"en-LU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/devoteam.info\\\/lu\\\/expert-view\\\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-LU\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/expert-view\\\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\\\/#primaryimage\",\"url\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/61A9714-scaled-1.jpg\",\"contentUrl\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/61A9714-scaled-1.jpg\",\"width\":2560,\"height\":1707},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/expert-view\\\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Expert View\",\"item\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/expert-view\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/#website\",\"url\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/\",\"name\":\"Devoteam\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/devoteam.info\\\/lu\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-LU\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics | Devoteam","description":"In this step by step guide, we will explore enhancing Firestore debugging with Google Cloud Audit Logs and Log Analytics.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/","og_locale":"en_US","og_type":"article","og_title":"Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics","og_description":"In this step by step guide, we will explore enhancing Firestore debugging with Google Cloud Audit Logs and Log Analytics.","og_url":"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/","og_site_name":"Devoteam","article_modified_time":"2025-04-10T08:32:59+00:00","og_image":[{"width":2560,"height":1707,"url":"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/","url":"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/","name":"Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics | Devoteam","isPartOf":{"@id":"https:\/\/devoteam.info\/lu\/#website"},"primaryImageOfPage":{"@id":"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/#primaryimage"},"image":{"@id":"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/#primaryimage"},"thumbnailUrl":"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1.jpg","datePublished":"2023-12-12T13:59:08+00:00","dateModified":"2025-04-10T08:32:59+00:00","description":"In this step by step guide, we will explore enhancing Firestore debugging with Google Cloud Audit Logs and Log Analytics.","breadcrumb":{"@id":"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/#breadcrumb"},"inLanguage":"en-LU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/"]}]},{"@type":"ImageObject","inLanguage":"en-LU","@id":"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/#primaryimage","url":"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1.jpg","contentUrl":"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1.jpg","width":2560,"height":1707},{"@type":"BreadcrumbList","@id":"https:\/\/devoteam.info\/lu\/expert-view\/tracing-firestore-queries-a-step-by-step-guide-for-google-cloud-audit-logs-and-log-analytics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devoteam.info\/lu\/"},{"@type":"ListItem","position":2,"name":"Expert View","item":"https:\/\/devoteam.info\/lu\/expert-view\/"},{"@type":"ListItem","position":3,"name":"Tracing Firestore Queries: A Step-by-Step Guide for Google Cloud Audit Logs and Log Analytics"}]},{"@type":"WebSite","@id":"https:\/\/devoteam.info\/lu\/#website","url":"https:\/\/devoteam.info\/lu\/","name":"Devoteam","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devoteam.info\/lu\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-LU"}]}},"uagb_featured_image_src":{"full":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1.jpg",2560,1707,false],"thumbnail":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-150x150.jpg",150,150,true],"medium":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-300x200.jpg",300,200,true],"medium_large":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-768x512.jpg",768,512,true],"large":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-1024x683.jpg",1024,683,true],"1536x1536":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-1536x1024.jpg",1536,1024,true],"2048x2048":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/61A9714-scaled-1-2048x1366.jpg",2048,1366,true]},"uagb_author_info":{"display_name":"Julien Pawlowski","author_link":"https:\/\/devoteam.info\/lu\/author\/"},"uagb_comment_info":0,"uagb_excerpt":"Explore how to enhance Firestore debugging using Google Cloud Audit Logs and Log Analytics. This article was written by Sijohn Mathew &#8211; Senior Cloud Architect\u00a0in Devoteam G Cloud\u00a0in Stockholm. Introduction: Necessity of Traceability in Firestore In this guide, we will explore enhancing Firestore debugging with Google Cloud Audit Logs and Log Analytics. Sit back and&hellip;","_links":{"self":[{"href":"https:\/\/devoteam.info\/lu\/wp-json\/wp\/v2\/expert-view\/517435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devoteam.info\/lu\/wp-json\/wp\/v2\/expert-view"}],"about":[{"href":"https:\/\/devoteam.info\/lu\/wp-json\/wp\/v2\/types\/expert-view"}],"version-history":[{"count":0,"href":"https:\/\/devoteam.info\/lu\/wp-json\/wp\/v2\/expert-view\/517435\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devoteam.info\/lu\/wp-json\/wp\/v2\/media\/322518"}],"wp:attachment":[{"href":"https:\/\/devoteam.info\/lu\/wp-json\/wp\/v2\/media?parent=517435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devoteam.info\/lu\/wp-json\/wp\/v2\/categories?post=517435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devoteam.info\/lu\/wp-json\/wp\/v2\/tags?post=517435"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/devoteam.info\/lu\/wp-json\/wp\/v2\/industry?post=517435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}