Commit Graph

74 Commits

Author SHA1 Message Date
Charis 205cbe7d26 chore(studio}: enforce import order, remove bare import specifiers (#44585) 2026-04-07 20:34:10 -04:00
Charis 3b7052b5a9 cleanup: fix import order and prefixes for studio/data (#44501) 2026-04-03 09:15:57 +02:00
Jordi Enric 168c084f4e feat(o11y): overview page (#42098)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Observability Dashboard: unified overview for service health and
database infrastructure with interactive charts and metric cards (CPU,
memory, disk I/O, connections, error rate, slow queries).
* Service Health Monitoring: per-service health cards and a
multi-service table with error/warning counts and drill-down links to
reports/logs.
* Interval Selector: new chart-interval dropdown with plan-aware
retention messaging.
* Menu & Reports: updated Observability menu with Overview entry and
Custom Reports management.
* **Documentation**
  * Added a footer link to troubleshooting guides.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-30 14:00:01 +00:00
Jordi Enric db0a2ab752 refactor useFillTimeSeriesSorted hook (#42255)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Safer error rendering across analytics and reporting with a fallback
"Unknown error".

* **Tests**
* Added unit tests covering timeseries sorting and timestamp validation.

* **Refactor**
* Standardized timeseries hook and all callers to accept a single
options object and improved nullish handling.

* **New Features**
* Exposed timeseries utilities and explicit options/result types;
exported chart data type.

* **Chores**
  * Relaxed index signatures to allow dynamic metric keys.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-29 21:05:09 +01:00
Jordi Enric 88ed2aad97 new home: refactor charts to use old sources (#42245)
- refactors new charts in homepage to use stable analytics endpoints
- changes are behind newHomepageUsageV2 flag

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Centralized per-service health metrics hook with per-service data,
loading/error states and refresh.

* **Improvements**
  * Time-series normalization into fixed buckets aligned to an end time.
* Updated UI: success-rate formatting, per-service loading/error
surfaced, refreshed click/refresh behavior; removed delta display.

* **Removals**
  * Legacy project-metrics query and mapping utilities removed.

* **Tests**
* Extensive unit tests added for date ranges, bucket normalization, and
health metric calculations; some obsolete tests removed.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-28 17:02:00 +00:00
Joshen Lim 2ce307130a Update API types and properly render replication lag in replica detail page (#42191)
* Update API types and properly render replication lag in replica detail page

* Forgot to add the api types
2026-01-28 15:34:01 +08:00
Jordi Enric 6123e00e6c fix: granularity improvements (#41925)
* update granularity

* 2min interval client side

* fix type error

* fix type errors

* fix type error

* correct typing

* fix type

* add tests to ggregate to 2 min fn

* cleanup

* cleanup2

* prettier
2026-01-27 12:51:22 +01:00
Joshen Lim 3b7bba9a9a Add read replicas details page from database replication (#41784)
* Add read replicas details page from database replication

* Clean

* Address 🐰

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2026-01-19 13:44:41 +08:00
Charis 718fa372d4 fix(studio): functions egress not showing in daily breakdown chart (#41848)
The daily breakdown chart doesn't show functions egress because the key
we're looking for doesn't match the key being sent by API.
2026-01-12 03:52:21 -05:00
Raúl Barroso 09df6e8373 refactor: infra queries to use attributes (#41018)
* refactor: infra queries to use `attributes`

This PR refactors the infrastructure monitoring query code reducing duplication and unifying the API request to always be `attributes`:

•  Removed the separate useInfraMonitoringQuery hook and getInfraMonitoring function that handled a single monitoring query
•  Consolidated all infrastructure monitoring queries into a unified useInfraMonitoringAttributesQuery hook that handles multi-attribute requests
•  Moved interval selection logic from the query layer to the consumer (InfrastructureActivity.tsx), where it can be computed dynamically based on user-selected date ranges
•  Simplified query types by removing intermediate InfraMonitoringData and InfraMonitoringVariables types
•  Interval is now computed in the component (defaults to 1d, switches to 1h for date ranges ≤48 hours) rather than hardcoded in the query layer
•  All queries now use the unified multi-attribute endpoint with explicit parameter passing

* fix: handle single-attribute response format
2025-12-04 16:16:12 +01:00
Kevin Grüneberg 915a08812d feat: support new platform plan (#40890) (#41046)
Forward compatible changes to support new platform plan (similar handling to Enterprise)
2025-12-04 17:31:27 +08:00
Joshen Lim 888b1794c6 Revert "feat: support new platform plan" (#40980)
Revert "feat: support new platform plan (#40890)"

This reverts commit ae4fe1b740.
2025-12-03 10:41:53 +08:00
Raúl Barroso 7860dad841 fix: organization usage page (#40956)
* fix: organization usage page

Fixes https://linear.app/supabase/issue/API-759/egress-graph-does-not-change-when-filtering-by-project

* test: org usage
2025-12-02 14:37:24 +01:00
Kevin Grüneberg ae4fe1b740 feat: support new platform plan (#40890)
Forward compatible changes to support new platform plan (similar handling to Enterprise)
2025-12-02 15:35:39 +08:00
Eduardo Gurgel 206512d5a4 fix(studio): realtime metrics (#40824)
* Connected clients is now showing the number of connections at the time. 
* Broadcast events 
* Presence events 
* Postgres changes events
* Rate of Channel joins (unchanged)
* Message payload size : median of payload size 
* Broadcast From Database Replication Lag:  median replication from commit to broadcast
* (Read) Private Channel Subscription RLS Execution Time: median time RLS execution to subscribe
* (Write) Private Channel Subscription RLS Execution Time: median time RLS execution to publish
2025-11-28 10:44:32 +13:00
Raúl Barroso bfef63e874 feat(mgmt-api): update reports API to use multiple attributes (#40473)
* feat(mgmt-api): update reports API

Related to https://github.com/supabase/infrastructure/pull/27519 and https://linear.app/supabase/issue/API-551/extend-infra-monitoring-with-multi-attribute-response

* tests: infra-monitoring-queries

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2025-11-21 12:56:04 +00:00
Ivan Vasilov c83d7255a4 chore: Migrate leftover query keys (#40573)
* Fix queryKey to be compatible with RQ 5.

* Revert .find usage of queryKey.
2025-11-18 10:27:17 -07:00
Filipe Cabaço 038249088a feat: update realtime report (#40252)
* feat: update realtime report

Co-authored-by: Jordi Enric <jordi.err@gmail.com>

* fix: misc bug fixes

* fixup! fix: misc bug fixes

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
Co-authored-by: Ali Waseem <waseema393@gmail.com>
2025-11-12 10:33:27 -05:00
Jordi Enric ece02759d7 [DESIGN-301] Project Homepage: refactor to logflare endpoint (#40124) 2025-11-10 10:30:45 +01:00
Ivan Vasilov 8b657165b5 chore: Migrate to use custom type for ReactQuery queries and mutations (#40073)
* Add custom types for queries, mutations and infinite queries.

* Migrate all queries to use the new type.

* Migrate all infinite queries to useCustomInfiniteQueryOptions.

* Migrate all mutations to use useCustomMutationOptions.

* Add type to all imports in `types` folder.
2025-11-03 13:18:13 +01:00
Joshen Lim 64e3e047eb Final final cleaning up barrel files (#40018)
* Final final cleaning up barrel files

* Fix merge conflict
2025-10-31 14:02:59 +08:00
Ivan Vasilov da4a40e308 chore: Migrate RQ functions to use object syntax style (#39895)
* Migrate all uses of invalidateQueries to use object syntax.

* Migrate the remainder of useInfiniteQuery.

* Migrate all setQueriesData.

* Migrate all fetchQuery uses.

* Migrate some leftover functions from RQ.

* Fix issues found by Charis.
2025-10-28 10:43:14 +01:00
Alaister Young 8855d05803 chore(studio): swap react-query to object syntax (#39842)
* chore(studio): swap react-query to object syntax

* Fix small issues found

* Fix realtime settings

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-27 09:38:27 +01:00
Ivan Vasilov 56d40fe0b2 chore: Migrate eslint for all apps to use flat config (#39486)
* Use the "eslint" command instead of built-in next lint since it's getting obsolete.

* Bump all deps to support eslint 9+.

* Convert the rules in eslint-config-supabase to be flat-config compatible.

* Migrate all apps to use the new eslint config rules.

* Fix all errors found in the new setup.

* Fix the no default exports ignores.

* Scan all files for linting in studio.

* Fix all lint errors.

* Make the reportUnusedDisableDirectives a warning.
2025-10-15 16:35:24 +02:00
Saxon Fletcher 622486f750 Refresh report and status update (#39473)
* refresh report

* project status

* prettier

* Minor refactors

* add back refreshing

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-14 08:09:48 +10:00
Kevin Grüneberg 5a886be0c2 feat: use new org daily stat endpoint (#39357) 2025-10-09 18:59:00 +08:00
Kevin Grüneberg e4aee0728c chore: project daily stats caching / deprecated props (#39277)
Remove deprecated props that have no effect on behaviour and fix the caching (based on date instead of timestamp)
2025-10-06 16:39:49 +08:00
Ziinc 2049e75c1d feat: more charts, use functions.combined-stats (#38128)
* feat: more charts, use functions.combined-stats

* fix padding bottom

* spacing fix

* fix empty state missing title

* fix spacing

* fix api types

* fix api types 2

* fix type errors

* add flag

* rm consolelog

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2025-09-05 10:43:57 +00:00
Riccardo Busetti 77356bf946 feat(replication): Significantly improve the replication UI behavior (#38237) 2025-08-29 12:20:51 +02:00
Kevin Grüneberg d60b3e3b9e feat: cached egress rollout (#37827) 2025-08-13 17:36:48 +08:00
Jordi Enric e4837267f6 Warehouse Clean Up (#37507) 2025-07-28 17:14:57 +02:00
Kevin Grüneberg 77d99e0f04 chore: branching compute hours copy (#35524) 2025-05-07 15:31:03 +00:00
Kevin Grüneberg 12ba4da4a5 feat: groundwork for larger instance sizes (#35373) 2025-05-02 15:45:03 +07:00
Francesco Sansalvadore 939e5c855a feat: reports infra o11y (#33310)
* test client connections charts

* add granularity to database dashboard

* add range selection

* add selection to area charts

* refactor ChartHeader

* fix default

* fix time preset selected label and add tooltip actions

* client connections stacked chart

* polish all new chartts

* change attribute

* fix

* add real queries

* memory stack

* cleanup

* precision 1

* update charts

* add endpoints

* tooltip

* format

* improve charts

* toggle max value

* show limit

* cleanup

* cleanup

* update api schema

* fix ram_usage_max_available

* remove pgbouncer and comments

* show total with percentage in chart header

* pretty

* hide

* update reports database

* remove client_connections

* revert

* fix connectionStrings error

* restore correct queries and conditions

* vertically zoom in to percentage data

* add feature flag logic on charts

* add feature flag logic to date picker

* chore: remove comment

* add tooltip to charts metrics

* chore: comment new pg endpoints

* feat: lazy load ComposedChartHandler queries

* feat: dim non-hovered chart values when hovering chart label item

* feat: improve dim styling

* chore: improve light mode stacked chart colors

* chore: remove 15s interval

* chore: sync types

* chore: remove type

* chore: restore type

* fix hook error

* show chart type toggle

* remove console log

* temp

* keep connections charts as before

* restore DateRangePicker

* show last aggregate value when not hovering

* clean up imports

* disk IOps read and write

* restore flag

* refactor queries

* clean up grafana promo banner

* Update database-charts.ts | updated language

* fix hook error

* fix hook error

* fix hook error

* attempt fix hook error

---------

Co-authored-by: TheOtherBrian1 <91111415+TheOtherBrian1@users.noreply.github.com>
2025-04-14 10:53:52 +02:00
Kevin Grüneberg be2271b9c2 feat: break down log drain egress (#33763) 2025-02-21 10:23:03 +00:00
Kamil Ogórek 1a7c01770b feat: Add supavisor connections to infra report (#33682) 2025-02-20 15:57:41 +08:00
Joshen Lim 8b4fb55b54 Add IS_PLATFORM checks for some unnecessary queries and UI for local (#33557)
* Add IS_PLATFORM checks for some unnecessary queries and UI for local

* Revert changes for analytics/endpoint/[name]

* Smol

* Smol

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2025-02-17 15:09:36 +08:00
Ziinc 45f7561d30 fix: show database charts at 1h resolution (#32962)
* fix: drop default interval

* fix: add datepicker override

* chore: remove comments
2025-01-22 14:26:29 +08:00
Joshen Lim 3440dc9c95 Feat/reports v2/standardize block design (#32936)
* Standardize block designs

* Clean up

* Add warning threshold colors for infra-monitoring stats

* Address all other comments

* Swap create custom report to use PUT
2025-01-21 20:56:13 +08:00
Alaister Young 9d534c9f5a fix: response error codes (#30581)
* fix: response error codes

* upgrade docs

* remove request url modification middleware

* move api routes for self-hosted to platform folder

* remove some lib/common/fetch usage

* docs: use middleware for openapi-fetch (#30600)

Get rid of the unauthedAllowedPost function (I don't think there's any harm in letting any requests that require authentication to just 403, they should be disabled at the React Query level and if not they will fail gracefully enough...)

* fix local count query

* add default values for clone mutation

* fix ts and codegen

* add missing lodash dep to playwright tests

* Fix the playwright tests to match the new folder structure for selfhosted variant.

* remove unused import

* Remove unused state

* remove unused sql debug mutation

* remove unused export

* fix notifications query

* fix jwt updating status

* fix typescript

* save sql snippet after renaming

* update codegen & fix ts error

* override array querySerializer

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-01-20 11:27:38 +08:00
Alaister Young c26a1a7e63 chore(studio): remove unused files (#32623) 2025-01-08 12:39:00 +08:00
Chris Gwilliams 2f63366b44 remove swap usage from DB report (#30877) 2024-12-18 15:00:35 +02:00
Jordi Enric f5b998983a remove warehouse settings page (#30919)
* rm links and page

* add some comments w context
2024-12-06 10:21:46 +00:00
Alaister Young 12cc4e5fbc chore: use service versions endpoint (#30352)
* chore: use service versions endpoint

* update types

* fix types

* fallback postgres version for unknown images
2024-11-08 11:17:16 +08:00
Alaister Young c59be649a3 chore: prefetch project homepage (#30317) 2024-11-07 16:29:07 +08:00
Jordi Enric b6647d445c store selected logs to url (#29802)
* add selected logs to url

* Add mocks for nuqs package.

* fix layout issues n remove magic numbers for height

* fix chart height issue

* fix bug where logs not in first page wouldnt load correctly

* fix spacing between charts and header

* fix postgtres_logs issues, improve size in log detail

* fix borders

* fix default renderer

* fix detail width

* rm maxheight references

* fix tests

* fix typeerrs

* fix stories typerr

* improve colelctions empty state

* move state UP for logs and warehouse tables

* cleanup

* rm params

* rm params

* rm params

* fix log explorer selection

* fix tests types

* cleanup divs

* fix selected log delay

* use isEq for comparison in rows

* fix selection stuck open

* fix btnlink combo

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-10-25 12:40:14 +02:00
Thomas 9f9b083ba5 fix: item description and unit price of Billing Breakdown (#29996) 2024-10-20 12:29:53 +08:00
Jordi Enric f4ed44fc13 update collection form (#29791)
* add component for collection form

* use new comp in create collection

* update updatecollection query

* add comp to update collection dialog

* add missing ttype
2024-10-14 11:46:47 +02:00
Joshen Lim 9aabe4a40f Add number of database connections charts in database reports (#29637)
* Add number of database connections charts in database reports

* Fix type issue

* Fix more type issues

* Remove UI for requires_manual_intervention

* Update apps/studio/data/projects/project-upgrade-mutation.ts

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-10-04 16:55:01 +08:00
Jordi Enric f3b4f658a0 feat: add collection retention days (#29469)
* add create collection retention input

* improve spacing between inputs, add 'days' suffix to input

* add dynamic input description clarifying days and max days for retention

* add admonition and upgrade plan link

* only show admonition on free tier

* update desc

* undo
2024-09-27 15:32:10 +02:00