Skip to content

Commit

Permalink
Comment out unused metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
IanPhilips committed Feb 7, 2025
1 parent 7a7386c commit d898d9e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions backend/api/src/place-bet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { removeUndefinedProps } from 'common/util/object'
import { Bet, getNewBetId, LimitBet, maker } from 'common/bet'
import { floatingEqual } from 'common/util/math'
import { isProd, log, metrics } from 'shared/utils'
import { isProd, log } from 'shared/utils'
import { Answer } from 'common/answer'
import { CpmmState, getCpmmProbability } from 'common/calculate-cpmm'
import { ValidatedAPIParams } from 'common/api/schema'
Expand Down Expand Up @@ -215,7 +215,7 @@ export const placeBetMain = async (
const { newBet, betId, betGroupId } = result

log(`Main transaction finished - auth ${uid}.`)
metrics.inc('app/bet_count', { contract_id: contractId })
// metrics.inc('app/bet_count', { contract_id: contractId })

const continuation = async () => {
await onCreateBets(result)
Expand Down
5 changes: 3 additions & 2 deletions backend/api/src/record-contract-view.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { APIError, APIHandler } from 'api/helpers/endpoint'
import { createSupabaseDirectClient } from 'shared/supabase/init'
import { ValidatedAPIParams } from 'common/api/schema'
import { log, metrics } from 'shared/utils'
import { log } from 'shared/utils'
import { filterDefined } from 'common/util/array'

const VIEW_COLUMNS = {
Expand All @@ -26,7 +26,8 @@ export const recordContractView: APIHandler<'record-contract-view'> = async (
}
if (!viewsByContract[contractId]) viewsByContract[contractId] = []
viewsByContract[contractId].push(body)
metrics.inc('app/contract_view_count', { contract_id: contractId })
// metrics.inc('app/contract_view_count', { contract_id: contractId })

return {
result: { status: 'success' },
continue: async () => {
Expand Down
4 changes: 2 additions & 2 deletions backend/shared/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ export const revalidateStaticProps = async (
)

if (resp.ok) {
metrics.inc('vercel/revalidations_succeeded', { path: pathToRevalidate })
// metrics.inc('vercel/revalidations_succeeded', { path: pathToRevalidate })
log('Revalidated', pathToRevalidate)
} else {
metrics.inc('vercel/revalidations_failed', { path: pathToRevalidate })
// metrics.inc('vercel/revalidations_failed', { path: pathToRevalidate })
try {
const json = await resp.json()
log.error(
Expand Down

0 comments on commit d898d9e

Please sign in to comment.