Files
supabase/apps/studio/data/reports/realtime-charts.ts
Francesco SansalvadoreandJordi Enric 715b83b124 chore: realtime reports (#36797)
* init realtime reports page

* realtime metrics

* remove mock

* rebase branch

* chore: add realtime_postgres_changes infra-monitoring query

* clean realtime config

* clean realtime config

* test queries

* fix duplicate values

* update realtime charts components

* update realtime charts types

* update realtime charts types

* restore realtime charts logic

* add realtime charts

* hide redundant refresh and datepicker

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2025-07-03 18:14:19 +02:00

86 lines
2.0 KiB
TypeScript

export const getRealtimeReportAttributes = (isFreePlan: boolean) => [
{
id: 'client-to-realtime-connections',
label: 'Realtime connections',
valuePrecision: 2,
hide: false,
showTooltip: false,
showLegend: false,
showMaxValue: false,
hideChartType: false,
defaultChartStyle: 'bar',
titleTooltip: '',
attributes: [
{
attribute: 'realtime_connections_connected',
provider: 'infra-monitoring',
label: 'Connections',
},
],
},
{
id: 'channel-events',
label: 'Channel Events',
valuePrecision: 2,
hide: false,
showTooltip: true,
showLegend: true,
showMaxValue: false,
hideChartType: false,
defaultChartStyle: 'bar',
attributes: [
{
attribute: 'realtime_channel_events',
provider: 'infra-monitoring',
label: 'Broadcast',
},
{
attribute: 'realtime_channel_db_events',
provider: 'infra-monitoring',
label: 'Postgres Changes',
},
{
attribute: 'realtime_channel_presence_events',
provider: 'infra-monitoring',
label: 'Presence',
},
],
},
// {
// id: 'channel-presence-events',
// label: 'Channel Presence Events',
// valuePrecision: 2,
// hide: false,
// showTooltip: false,
// showLegend: false,
// showMaxValue: false,
// hideChartType: false,
// defaultChartStyle: 'bar',
// attributes: [
// {
// attribute: 'realtime_channel_presence_events',
// provider: 'infra-monitoring',
// label: 'Presence',
// },
// ],
// },
{
id: 'realtime_rate_of_channel_joins',
label: 'Rate of Channel Joins',
valuePrecision: 2,
hide: false,
showTooltip: false,
showLegend: false,
showMaxValue: false,
hideChartType: false,
defaultChartStyle: 'bar',
attributes: [
{
attribute: 'realtime_channel_joins',
provider: 'infra-monitoring',
label: 'Presence',
},
],
},
]