feat: omit unnecessary sentry logs (#6166)
* fix: omit gracefully handled events from sentry * fix: log locale load exception to sentry
This commit is contained in:
parent
8d36edf2b7
commit
8392c29a1e
@ -1,5 +1,4 @@
|
||||
import { Trans } from '@lingui/macro'
|
||||
import * as Sentry from '@sentry/react'
|
||||
import { Currency, Price, Token } from '@uniswap/sdk-core'
|
||||
import { FeeAmount } from '@uniswap/v3-sdk'
|
||||
import { AutoColumn, ColumnCenter } from 'components/Column'
|
||||
@ -156,10 +155,6 @@ export default function LiquidityChartRangeInput({
|
||||
[isSorted, price, ticksAtLimit]
|
||||
)
|
||||
|
||||
if (error) {
|
||||
Sentry.captureMessage(error.toString(), 'log')
|
||||
}
|
||||
|
||||
const isUninitialized = !currencyA || !currencyB || (formattedData === undefined && !isLoading)
|
||||
|
||||
return (
|
||||
|
@ -1,4 +1,3 @@
|
||||
import * as Sentry from '@sentry/react'
|
||||
import { Token } from '@uniswap/sdk-core'
|
||||
import { SupportedChainId } from 'constants/chains'
|
||||
import uriToHttp from 'lib/utils/uriToHttp'
|
||||
@ -39,11 +38,10 @@ async function getColorFromToken(token: Token): Promise<string | null> {
|
||||
logoURI = URIForEthToken(address)
|
||||
return await getColorFromUriPath(logoURI)
|
||||
} catch (error) {
|
||||
Sentry.captureMessage(error.toString())
|
||||
console.warn(`Unable to load logoURI (${token.symbol}): ${logoURI}`)
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
async function getColorFromUriPath(uri: string): Promise<string | null> {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import * as Sentry from '@sentry/react'
|
||||
import { Currency, Token } from '@uniswap/sdk-core'
|
||||
import { FeeAmount } from '@uniswap/v3-sdk'
|
||||
import useBlockNumber from 'lib/hooks/useBlockNumber'
|
||||
@ -89,8 +88,7 @@ function usePoolTVL(token0: Token | undefined, token1: Token | undefined) {
|
||||
}
|
||||
|
||||
if (latestBlock - (_meta?.block?.number ?? 0) > MAX_DATA_BLOCK_AGE) {
|
||||
Sentry.captureMessage(`Graph stale (latest block: ${latestBlock})`, 'log')
|
||||
|
||||
console.log(`Graph stale (latest block: ${latestBlock})`)
|
||||
return {
|
||||
isLoading,
|
||||
error,
|
||||
|
@ -84,7 +84,8 @@ export async function dynamicActivate(locale: SupportedLocale) {
|
||||
// Bundlers will either export it as default or as a named export named default.
|
||||
i18n.load(locale, catalog.messages || catalog.default.messages)
|
||||
} catch (error) {
|
||||
Sentry.captureMessage(error.toString())
|
||||
console.error(error)
|
||||
Sentry.captureException(new Error(`Unable to load locale (${locale})`))
|
||||
}
|
||||
i18n.activate(locale)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user