File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
backend/src/graphql/queries/tiles Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const getAllRows: QueryResolvers['getAllRows'] = async (
1212 params ,
1313 context ,
1414) => {
15- const { tableId, stringifiedCursor, lastUpdatedAt : _lastUpdatedAt } = params
15+ const { tableId, stringifiedCursor } = params
1616
1717 try {
1818 const table = context . tilesViewKey
Original file line number Diff line number Diff line change 11import { ITableMetadata , ITableRow } from '@plumber/types'
22
3- import { useState } from 'react'
3+ import { useRef , useState } from 'react'
44import { useParams } from 'react-router-dom'
55import { useQuery } from '@apollo/client'
66import { Center , Flex } from '@chakra-ui/react'
7+ import { datadogRum } from '@datadog/browser-rum'
78
89import PrimarySpinner from '@/components/PrimarySpinner'
910import { GET_ALL_ROWS } from '@/graphql/queries/tiles/get-all-rows'
@@ -20,6 +21,7 @@ export default function Tile(): JSX.Element {
2021 } > ( )
2122 const [ rows , setRows ] = useState < ITableRow [ ] > ( [ ] )
2223 const [ isFetching , setIsFetching ] = useState ( true )
24+ const startTime = useRef ( performance . now ( ) )
2325
2426 const { data : getTableData } = useQuery < {
2527 getTable : ITableMetadata
@@ -62,6 +64,11 @@ export default function Tile(): JSX.Element {
6264 currentCursor = newData . getAllRows . stringifiedCursor
6365 setRows ( allRows )
6466 }
67+ datadogRum . setGlobalContextProperty (
68+ 'tile_load_time' ,
69+ performance . now ( ) - startTime . current ,
70+ )
71+ datadogRum . setGlobalContextProperty ( 'tile_row_count' , allRows . length )
6572 setIsFetching ( false )
6673 } ,
6774 } )
You can’t perform that action at this time.
0 commit comments