diff --git a/web/docs/guides/platform/logs.mdx b/web/docs/guides/platform/logs.mdx index e40ac2a8a8d..c1be8d25568 100644 --- a/web/docs/guides/platform/logs.mdx +++ b/web/docs/guides/platform/logs.mdx @@ -1,20 +1,39 @@ --- id: logs -title: Log Browser +title: Logging description: Getting started with Supabase Platform Log Browser --- The Supabase Platform provides a log browser that allows log tracing and debugging. Currently, PostgreSQL and Cloudflare edge logs are available. -The features discussed in this article are only available through the Supabase platform and are not available on self-hosted. +:::note -The log browser can be accessed through: +The features discussed in this article are only available through the Supabase Platform and are not available on self-hosted. -- `Project Overview > Settings > API` -- `Project Overview > Settings > Database` +::: + +## Log Explorer ![Sidebar navigation steps](/img/guides/platform/logs/sidebar-navigation.png) +The log browser can be accessed in the sidebar under `Log Explorer`. The Log Explorer is for exploring all the logs within your project and is not specific to any product. + +## Product Logs + +As well as a Log Explorer, Supabase provides a logging interface specific to each product. + +### API Logs + +![API Logs](/img/guides/platform/logs/logs-api.png) + +The API Logs can be found under `Database > API Logs`. These show all network requests for the REST and GraphQL [API](/docs/guides/api). + +### Postgres Logs + +![Postgres Logs](/img/guides/platform/logs/logs-database.png) + +The Postgres Logs can be found under `Database > Postgres Logs`. These show all queries and activity for your [Database](/docs/guides/database). + ## Basic Querying Features - Simple regex-based search on the event message. @@ -28,9 +47,7 @@ To access advanced querying features, you will need to enable **custom queries** ![Enabling query mode](/img/guides/platform/logs/query-mode.png) - - -`SELECT` queries allow complex and powerful aggregated result sets, letting you to perform in-depth analysis of your log data. +`select` queries allow complex and powerful aggregated result sets, letting you to perform in-depth analysis of your log data. For example, you may enter the following into the API logs dashboard to query for each user's IP address: @@ -55,14 +72,14 @@ The table references are as follows: Note that cross-table joining is currently not supported. -#### Unnesting Arrays +### Unnesting Arrays In the above example, in order to query the metadata field, we need to unnest the field and add it as a join. Wehn we click on an individual log, we can see that log metadata is stored as an array of objects. In order to query any value that is an array, we would need to `UNNEST()` that field and add it to the query as a join, thereby allowing us to reference the nested fields within the array. -#### Functions +### Functions You may have also noticed from the above examples that we are able to use certain SQL functions within our queries. The querying engine currently supported is BigQuery, hence you may use [any valid BigQuery function](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators) within your query. @@ -71,7 +88,7 @@ You may have also noticed from the above examples that we are able to use certai Each log timestamp is stored as a `TIMESTAMP` data type. In order to utilize the `timestamp` field in a query, you would need to use the appropriate [timestamp functions](https://cloud.google.com/bigquery/docs/reference/standard-sql/timestamp_functions#timestamp). -### Template Queries +## Template Queries Templates are available to help shorten the time needed to craft these queries. There are examples for each complexity level, which can serve as a foundation for your custom queries. diff --git a/web/static/img/guides/platform/logs/logs-api.png b/web/static/img/guides/platform/logs/logs-api.png new file mode 100644 index 00000000000..a5051f4ca2a Binary files /dev/null and b/web/static/img/guides/platform/logs/logs-api.png differ diff --git a/web/static/img/guides/platform/logs/logs-database.png b/web/static/img/guides/platform/logs/logs-database.png new file mode 100644 index 00000000000..2b67b16a2a8 Binary files /dev/null and b/web/static/img/guides/platform/logs/logs-database.png differ diff --git a/web/static/img/guides/platform/logs/sidebar-navigation.png b/web/static/img/guides/platform/logs/sidebar-navigation.png index 1514460dd79..41cf3ebdfe4 100644 Binary files a/web/static/img/guides/platform/logs/sidebar-navigation.png and b/web/static/img/guides/platform/logs/sidebar-navigation.png differ diff --git a/www/_blog/2022-03-30-supabase-enterprise.mdx b/www/_blog/2022-03-30-supabase-enterprise.mdx index 9ab43778ea4..0a73edfad40 100644 --- a/www/_blog/2022-03-30-supabase-enterprise.mdx +++ b/www/_blog/2022-03-30-supabase-enterprise.mdx @@ -133,7 +133,7 @@ Some features are too good to limit to large customers, so today we're introduci To simplify pricing, we've merged the “Pro” and “Pay as you go” tiers and introduced monthly spend caps to avoid nasty billing surprises. -These changes to keep Supabase pricing [predictable, transparent, and developer friendly](/blog/2021/03/29/pricing). +These changes are to keep Supabase pricing [predictable, transparent, and developer friendly](/blog/2021/03/29/pricing). When you upgrade to the Pro Tier, spend caps are turned on by default, limiting your per-project costs to $25 per month. We're also retaining our soft limits while we manage the transition to granular spend-caps, so your service will continue to run even if your usage exceeds $25 (we'll contact you directly when you go over the limit). Right now there is a global project spend-cap, and in the future you'll have full control with configurable spend-caps on a “per-feature” basis. @@ -149,12 +149,12 @@ We're also retaining our soft limits while we manage the transition to granular /> -Today we're progressively releasing self-serve Database Add-Ons. -What do you do when your project hits production and your user-base is sky-rocketing? -Supabase is one of the most popular devtools amongst YC companies, who see exponential growth over a 3 month period. -Many developers have been asking for the control to scale their projects on-demand, and our Database Add-ons release gives everyone the control to do that themse. +Today we're releasing self-serve Database Add-ons. -Database Add-ons are available today for a small set of customers, and will be generally available by the end of next week (Fridy 8th April). +What do you do when your project hits production and your userbase is sky-rocketing? +Many developers have been asking to scale their projects on-demand. Database Add-ons give everyone this control. + +Today, Database Add-ons are available for a small set of customers. We will progressively release this for everyone by the end of next week (Fridy 8th April). ### New Log Explorer @@ -171,8 +171,12 @@ Database Add-ons are available today for a small set of customers, and will be g Today we're releasing a brand new [Log Explorer](/docs/guides/platform/logs) in the Supabase Dashboard. As big advocates of SQL, we've done what any good Postgres fanatics would do - we're giving you the ability to query your logs using SQL. And if you're new to SQL, we have plenty of templates included. -Log history is available to every Supabase project, with 7 days of log history available on the Free Tier and 30 days for the Pro-tier. Enterprise customer can query as far back as 90 days. This is just one of the exciting features we are releasing through our [Logflare acquisition](/blog/2021/12/02/supabase-acquires-logflare). +Log history is available to every Supabase project: + +- Free Tier: 7 days of log history +- Pro Tier: 30 days of log history +- Enterprise Tier: 90 days of log history ### Elixir Livebooks @@ -181,8 +185,8 @@ Today we're releasing [Elixir Livebooks for Monitoring](https://github.com/supab ![PGBoucner](/images/blog/launch-week-4/enterprise-day/pg-bouncer.png) While our default PgBouncer settings work for 98% of our customers, sometimes they require customization for unique load patterns. -For example, Supabase is popular with Web3 projects, and traffic to Web3 projects can be very unpredictable - especially when you partner with Snoop Dogg. -When [sound.xyz](http://sound.xyz) [dropped an NFT with Snoop](https://www.sound.xyz/snoopdogg/death-row-mix-vol-1) recently, we customized their pooler to handle significant load. +For example, Supabase is popular with web3 projects where traffic can be very unpredictable - especially when you partner with Snoop Dogg. +When [sound.xyz](http://sound.xyz) dropped [an NFT with Snoop](https://www.sound.xyz/snoopdogg/death-row-mix-vol-1), we customized their pooler to handle significant load. Their database handled over 9,000 simultaneously connections from Vercel's serverless API.