If you are building server-rendered Angular or Next.js apps, check out next-generationFirebase App Hosting,a full-stack solution for modern web frameworks.
View, search, and filter your site's web request logs with Cloud Logging
Stay organized with collectionsSave and categorize content based on your preferences.
You can link your Firebase project toCloud Loggingto view, search, and
filter your web request logs for each of yourHostingsites. These logs are
from the CDN that's automatically provided by Firebase, so every request to your
site and the associated request data are logged.
Here are some things you do withCloud Logginglogs. Visit each section of
this page to learn details.
Better understand your site— Learn from
where and when you have visits to your site, your site's response statuses,
the latency of end user requests, and more.
Filter your logs with queries— Leverage
automatically collected data to filter and plot data associated with each
request or your site.
Use logs-based metrics— Create Cloud
Monitoring charts and alerting policies from predefined system metrics or
user-defined metrics.
If you have multipleHostingsites in your project, you can select which of
yourHostingsites will export logs. You can then filter and view your logs
data byHostingsite and even by domain. By selecting specificHostingsites to export logs, you can also control the amount of data processed for your
project.
Learn aboutCloud Loggingquotas and pricing
Cloud Loggingis no-cost for up to 50GB of data usage per month
(per project).
This usage can be from any Google or Firebase product usingCloud Logging.
You can upgrade your project to the Blaze pricing plan to unlock additional
paid usage. Learn more aboutpricing forCloud Logging.
You can monitor and manageCloud Loggingand billing:
Note that the log entry for a particular request may be delayed or, in rare
cases, dropped. While logs can be used to understand requests, they may not
reflect the true usage that appears in your project usage and billing.
Follow the on-screen instructions to select which of yourHostingsites
should export logs toCloud Logging.
If you already have one or more activeHostingsites, the linking
workflow displays an estimated data usage level for logs from each of yourHostingsites. This value is estimated from the past 30 days.
After linking toCloud Logging, logs for anynewrequests to yourHostingsites will usually show up within 30 minutes of the request being
made.
You can alsounlinkFirebase HostingfromCloud Logging, which stops exports of web request logs toCloud Logging.
Monitor your data usage for logs
After linking toCloud Logging, you can view the data usage level for logs
from yourHostingsites:
Cloud Loggingis no-cost for up to 50GB of data usage per month
(per project).
This usage can be from any Google or Firebase product usingCloud Logging.
You can upgrade your project to the Blaze pricing plan to unlock additional
paid usage. Learn more aboutpricing forCloud Logging.
You can monitor and manageCloud Loggingand billing:
Note that the log entry for a particular request may be delayed or, in rare
cases, dropped. While logs can be used to understand requests, they may not
reflect the true usage that appears in your project usage and billing.
Better understand your site
TheLogs Viewerinterfacein theGoogle Cloudconsole offers tools to view your specific logs and data
using queries and built-in filters and data panels. Learn more about filtering
your logs with queries in the next section below.
Where is your site's traffic coming from at a granular level?You can view information about each request, including source IP, referer,
city, and status.
When are users visiting your site? You can use theHistogram panelto see the distribution by specific time ranges. This can give you insight
into the normal peaks and dips of your app's usage, as well as reveal any
unexpected spikes in traffic.
What's the status distribution for end-user requests? You can view the status for each request and even diagnose requests that
receive errors. You can filter your logs byCritical,ErrororWarning.
How long does your site take to respond to a request? You can view your site's latency for each request using thelatencyvalue captured in each log.
Is your site taking advantage of content caching? Each log contains acacheHitfield to tell you if your site's resource was
served quickly fromHosting's CDN cache, or if it had to make the full
trip to theHostingbackend. This can help you improve your website's
performance by making the most of Firebase's global CDN. For example, you
can use the data to fine-tune the caching habits of yourstatic assetsanddynamic content.
What is the distribution of traffic to your various domains? If you have multiple domains orHostingsites, you can filter your logs
by domain or by site. This allows you to see how your traffic is
distributed. When you filter by domain, you can track which domain is
visited most frequently.
Each log entry has a predefined structure and queryable fields (seeLogEntry).
ForHosting, some fields are standard to an HTTP request, but there are
other field values which come from the processing thatHostingruns on each
request.
Field
Description
Firebase Hostingstores the following fields in thehttpRequestobject of the log
entry. These fields are defined in the HTTP specification.
cacheHit
Whether or not theHostingCDN had the resource of the response in
cache
latency
The request duration, in seconds withspostfix (for
example,1.256s)
protocol
The protocol used for the request (for example,HTTP/1.1,HTTP/2,websocket)
referer
The address of the previous web page from which a link to the
currently requested page was followed (if present)
remoteIp
The originating client IP for the request
requestMethod
The request method (GET,POST,PUT, etc.)
requestSize
The size of the request in bytes
requestUrl
The full URL of the request (for example, https://foo.web.app/barorhttps://custom.domain.com?query=param)
responseSize
The HTTP response size in bytes
serverIp
not populated
status
The HTTP response status (for example,200or404)
userAgent
The user-Agent header of the request
Firebase Hostingstores additional fields in thejsonPayloadobject of the
log entry.
acceptEncoding
(from the HTTP request)Which content encoding, usually a
compression algorithm, the client supports (for example,gziporcompress)
billable
Whether or not your project was billed for the request
customDomain
Whether or not the request was made against a custom domain
hostname
The hostname that the request was made against
remoteIpCountry
The originating country of the request
remoteIpCity
The originating city of the request
Use logs-based metrics
You can view and buildlogs-based metrics,
then use these metrics inCloud Monitoringto create charts and alerting
policies.
Leveragepredefined system metricsthat are automatically recorded, such as the number of logging events that
occurred within a specific time period.
Createuser-defined metricsfor your project. You can count the number of log entries that match a given
query or keep track of particular values with the matching log entries. You
can filter using regular expressions.
UseCloud Monitoringto
record the number of log entries containing particular messages or extract
latency information reported in log entries. You can then use these metrics in
charts and alerting policies.
Firebase Hostingalso generates the followingHosting-specific logging
metrics. These metrics are not specific to a log entry but rather to the
specificHostingsite as a whole.
log_bytes: Total bytes of data usage for each site
response_count: Total count of responses written for the site
This metric includes the field of HTTP status, so you can plot HTTP responses
by status (as an example).
Export logs to otherGoogle Cloudtools
You can also export your site's logs to otherGoogle Cloudtools, likeCloud Monitoringor BigQuery, for example:
UsingCloud Monitoring,
you can create log-based metrics that you can use in charts and alerting
policies.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]