Skip to content

Commit

Permalink
chore: delete Sentry (#292)
Browse files Browse the repository at this point in the history
chore: delete Sentry

# Summary

One of the central tenets of measurement is this question: are you
prepared to change what you work on based on the outcome of the data.

Explorer is not under the kind of active development that requires deep
insights into runtime data at this time. Put another way, I personally
have never performed work on the Explorer based on a result that I
observed in Sentry.

Until this changes, let's get rid of it.
  • Loading branch information
steveluscher committed Sep 15, 2023
1 parent 73e4e20 commit 15a5268
Show file tree
Hide file tree
Showing 44 changed files with 78 additions and 480 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,5 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts

# Sentry Auth Token
.sentryclirc

# Speedy Web Compiler
.swc/
2 changes: 1 addition & 1 deletion app/components/account/FeatureAccountSection.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Address } from '@components/common/Address';
import { TableCardBody } from '@components/common/TableCardBody';
import { Account } from '@providers/accounts';
import { ErrorBoundary } from '@sentry/nextjs';
import { PublicKey } from '@solana/web3.js';
import { parseFeatureAccount } from '@utils/parseFeatureAccount';
import { ErrorBoundary } from 'react-error-boundary';

import { UnknownAccountCard } from './UnknownAccountCard';

Expand Down
3 changes: 1 addition & 2 deletions app/components/account/TokenAccountSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Cluster } from '@utils/cluster';
import { CoingeckoStatus, useCoinGecko } from '@utils/coingecko';
import { displayTimestampWithoutDate } from '@utils/date';
import { abbreviatedNumber, normalizeTokenAmount } from '@utils/index';
import { reportError } from '@utils/sentry';
import { addressLabel } from '@utils/tx';
import { MintAccountInfo, MultisigAccountInfo, TokenAccount, TokenAccountInfo } from '@validators/accounts/token';
import { BigNumber } from 'bignumber.js';
Expand Down Expand Up @@ -67,7 +66,7 @@ export function TokenAccountSection({ account, tokenAccount, tokenInfo }: { acco
}
} catch (err) {
if (cluster !== Cluster.Custom) {
reportError(err, {
console.error(err, {
address: account.pubkey.toBase58(),
});
}
Expand Down
9 changes: 4 additions & 5 deletions app/components/account/TokenHistoryCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { ConfirmedSignatureInfo, ParsedInstruction, PartiallyDecodedInstruction,
import { Cluster } from '@utils/cluster';
import { INNER_INSTRUCTIONS_START_SLOT } from '@utils/index';
import { getTokenProgramInstructionName } from '@utils/instruction';
import { reportError } from '@utils/sentry';
import { displayAddress, intoTransactionInstruction } from '@utils/tx';
import Link from 'next/link';
import { usePathname, useSearchParams } from 'next/navigation';
Expand Down Expand Up @@ -401,28 +400,28 @@ const TokenTransactionRow = React.memo(function TokenTransactionRow({
try {
name = parseSerumInstructionTitle(transactionInstruction);
} catch (error) {
reportError(error, { signature: tx.signature });
console.error(error, { signature: tx.signature });
return undefined;
}
} else if (transactionInstruction && isTokenSwapInstruction(transactionInstruction)) {
try {
name = parseTokenSwapInstructionTitle(transactionInstruction);
} catch (error) {
reportError(error, { signature: tx.signature });
console.error(error, { signature: tx.signature });
return undefined;
}
} else if (transactionInstruction && isTokenLendingInstruction(transactionInstruction)) {
try {
name = parseTokenLendingInstructionTitle(transactionInstruction);
} catch (error) {
reportError(error, { signature: tx.signature });
console.error(error, { signature: tx.signature });
return undefined;
}
} else if (transactionInstruction && isMangoInstruction(transactionInstruction)) {
try {
name = parseMangoInstructionTitle(transactionInstruction);
} catch (error) {
reportError(error, { signature: tx.signature });
console.error(error, { signature: tx.signature });
return undefined;
}
} else {
Expand Down
3 changes: 1 addition & 2 deletions app/components/account/history/TokenTransfersCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ParsedInstruction, ParsedTransactionWithMeta, PartiallyDecodedInstructi
import { Cluster } from '@utils/cluster';
import { normalizeTokenAmount } from '@utils/index';
import { InstructionContainer } from '@utils/instruction';
import { reportError } from '@utils/sentry';
import React, { useMemo } from 'react';
import Moment from 'react-moment';
import { create } from 'superstruct';
Expand Down Expand Up @@ -231,7 +230,7 @@ function getTransfer(
}
} catch (error) {
if (cluster === Cluster.MainnetBeta) {
reportError(error, {
console.error(error, {
signature,
});
}
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/AddressLookupTableDetailsCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useCluster } from '@providers/cluster';
import { SignatureResult, TransactionInstruction } from '@solana/web3.js';
import { reportError } from '@utils/sentry';
import React from 'react';

import { parseAddressLookupTableInstructionTitle } from './address-lookup-table/types';
Expand All @@ -27,7 +26,7 @@ export function AddressLookupTableDetailsCard({
try {
title = parseAddressLookupTableInstructionTitle(ix);
} catch (error) {
reportError(error, {
console.error(error, {
signature: signature,
url: url,
});
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/ComputeBudgetDetailsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { SolBalance } from '@components/common/SolBalance';
import { useCluster } from '@providers/cluster';
import { ComputeBudgetInstruction, SignatureResult, TransactionInstruction } from '@solana/web3.js';
import { microLamportsToLamportsString } from '@utils/index';
import { reportError } from '@utils/sentry';
import React from 'react';

import { InstructionCard } from './InstructionCard';
Expand Down Expand Up @@ -144,7 +143,7 @@ export function ComputeBudgetDetailsCard({
}
}
} catch (error) {
reportError(error, {
console.error(error, {
signature: signature,
url: url,
});
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/MangoDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useCluster } from '@providers/cluster';
import { SignatureResult, TransactionInstruction } from '@solana/web3.js';
import { reportError } from '@utils/sentry';

import { InstructionCard } from './InstructionCard';
import { AddOracleDetailsCard } from './mango/AddOracleDetailsCard';
Expand Down Expand Up @@ -93,7 +92,7 @@ export function MangoDetailsCard(props: {
return <AddSpotMarketDetailsCard info={decodeAddSpotMarket(ix)} {...props} />;
}
} catch (error) {
reportError(error, {
console.error(error, {
signature: signature,
url: url,
});
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/SerumDetailsCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useCluster } from '@providers/cluster';
import { SignatureResult, TransactionInstruction } from '@solana/web3.js';
import { reportError } from '@utils/sentry';
import React from 'react';

import { InstructionCard } from './InstructionCard';
Expand Down Expand Up @@ -97,7 +96,7 @@ export function SerumDetailsCard(initialProps: {
return <ConsumeEventsPermissionedDetailsCard info={decodeConsumeEventsPermissioned(ix)} {...props} />;
}
} catch (error) {
reportError(error, {
console.error(error, {
signature: signature,
url: url,
});
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/TokenLendingDetailsCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useCluster } from '@providers/cluster';
import { SignatureResult, TransactionInstruction } from '@solana/web3.js';
import { reportError } from '@utils/sentry';
import React from 'react';

import { InstructionCard } from './InstructionCard';
Expand All @@ -27,7 +26,7 @@ export function TokenLendingDetailsCard({
try {
title = parseTokenLendingInstructionTitle(ix);
} catch (error) {
reportError(error, {
console.error(error, {
signature: signature,
url: url,
});
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/TokenSwapDetailsCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useCluster } from '@providers/cluster';
import { SignatureResult, TransactionInstruction } from '@solana/web3.js';
import { reportError } from '@utils/sentry';
import React from 'react';

import { InstructionCard } from './InstructionCard';
Expand All @@ -27,7 +26,7 @@ export function TokenSwapDetailsCard({
try {
title = parseTokenSwapInstructionTitle(ix);
} catch (error) {
reportError(error, {
console.error(error, {
signature: signature,
url: url,
});
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/WormholeDetailsCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useCluster } from '@providers/cluster';
import { SignatureResult, TransactionInstruction } from '@solana/web3.js';
import { reportError } from '@utils/sentry';
import React from 'react';

import { InstructionCard } from './InstructionCard';
Expand All @@ -27,7 +26,7 @@ export function WormholeDetailsCard({
try {
title = parsWormholeInstructionTitle(ix);
} catch (error) {
reportError(error, {
console.error(error, {
signature: signature,
url: url,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ParsedInstruction, ParsedTransaction, SignatureResult } from '@solana/web3.js';
import { reportError } from '@utils/sentry';
import { ParsedInfo } from '@validators/index';
import React from 'react';
import { create } from 'superstruct';
Expand Down Expand Up @@ -38,7 +37,7 @@ export function AssociatedTokenDetailsCard(props: DetailsProps) {
return <UnknownDetailsCard {...props} />;
}
} catch (error) {
reportError(error, {
console.error(error, {
signature: props.tx.signatures[0],
});
return <UnknownDetailsCard {...props} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Address } from '@components/common/Address';
import { BPF_LOADER_PROGRAM_ID, ParsedInstruction, ParsedTransaction, SignatureResult } from '@solana/web3.js';
import { wrap } from '@utils/index';
import { reportError } from '@utils/sentry';
import { ParsedInfo } from '@validators/index';
import React from 'react';
import { create } from 'superstruct';
Expand Down Expand Up @@ -36,7 +35,7 @@ export function BpfLoaderDetailsCard(props: DetailsProps) {
return <UnknownDetailsCard {...props} />;
}
} catch (error) {
reportError(error, {
console.error(error, {
signature: props.tx.signatures[0],
});
return <UnknownDetailsCard {...props} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Address } from '@components/common/Address';
import { ParsedInstruction, ParsedTransaction, PublicKey, SignatureResult } from '@solana/web3.js';
import { camelToTitleCase } from '@utils/index';
import { reportError } from '@utils/sentry';
import { ParsedInfo } from '@validators/index';
import React from 'react';
import { create, Struct } from 'superstruct';
Expand Down Expand Up @@ -56,7 +55,7 @@ export function BpfUpgradeableLoaderDetailsCard(props: DetailsProps) {
return <UnknownDetailsCard {...props} />;
}
} catch (error) {
reportError(error, {
console.error(error, {
signature: props.tx.signatures[0],
});
return <UnknownDetailsCard {...props} />;
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/pyth/PythDetailsCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useCluster } from '@providers/cluster';
import { SignatureResult, TransactionInstruction } from '@solana/web3.js';
import { reportError } from '@utils/sentry';
import React from 'react';

import { InstructionCard } from '../InstructionCard';
Expand Down Expand Up @@ -70,7 +69,7 @@ export function PythDetailsCard(props: {
return <SetMinPublishersDetailsCard info={PythInstruction.decodeSetMinPublishers(ix)} {...props} />;
}
} catch (error) {
reportError(error, {
console.error(error, {
signature: signature,
url: url,
});
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/stake/StakeDetailsCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ParsedInstruction, ParsedTransaction, SignatureResult } from '@solana/web3.js';
import { reportError } from '@utils/sentry';
import { ParsedInfo } from '@validators/index';
import React from 'react';
import { create } from 'superstruct';
Expand Down Expand Up @@ -68,7 +67,7 @@ export function StakeDetailsCard(props: DetailsProps) {
return <UnknownDetailsCard {...props} />;
}
} catch (error) {
reportError(error, {
console.error(error, {
signature: props.tx.signatures[0],
});
return <UnknownDetailsCard {...props} />;
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/system/SystemDetailsCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ParsedInstruction, ParsedTransaction, SignatureResult } from '@solana/web3.js';
import { reportError } from '@utils/sentry';
import { ParsedInfo } from '@validators/index';
import React from 'react';
import { create } from 'superstruct';
Expand Down Expand Up @@ -103,7 +102,7 @@ export function SystemDetailsCard(props: DetailsProps) {
return <UnknownDetailsCard {...props} />;
}
} catch (error) {
reportError(error, {
console.error(error, {
signature: props.tx.signatures[0],
});
return <UnknownDetailsCard {...props} />;
Expand Down
3 changes: 1 addition & 2 deletions app/components/instruction/vote/VoteDetailsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useCluster } from '@providers/cluster';
import { PublicKey } from '@solana/web3.js';
import { displayTimestamp } from '@utils/date';
import { camelToTitleCase } from '@utils/index';
import { reportError } from '@utils/sentry';
import { ParsedInfo } from '@validators/index';
import React from 'react';
import { create, Struct } from 'superstruct';
Expand Down Expand Up @@ -41,7 +40,7 @@ export function VoteDetailsCard(props: InstructionDetailsProps) {
return renderDetails<VoteSwitchInfo>(props, parsed, VoteSwitchInfo);
}
} catch (error) {
reportError(error, {
console.error(error, {
url,
});
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/transaction/InstructionsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { useAnchorProgram } from '@providers/anchor';
import { useCluster } from '@providers/cluster';
import { useTransactionDetails, useTransactionStatus } from '@providers/transactions';
import { useFetchTransactionDetails } from '@providers/transactions/parsed';
import { ErrorBoundary } from '@sentry/nextjs';
import {
ComputeBudgetProgram,
ParsedInnerInstruction,
Expand All @@ -41,6 +40,7 @@ import { Cluster } from '@utils/cluster';
import { INNER_INSTRUCTIONS_START_SLOT, SignatureProps } from '@utils/index';
import { intoTransactionInstruction } from '@utils/tx';
import React from 'react';
import { ErrorBoundary } from 'react-error-boundary';

import AnchorDetailsCard from '../instruction/AnchorDetailsCard';
import { isMangoInstruction } from '../instruction/mango/types';
Expand Down
5 changes: 2 additions & 3 deletions app/providers/accounts/history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
TransactionSignature,
} from '@solana/web3.js';
import { Cluster } from '@utils/cluster';
import { reportError } from '@utils/sentry';
import React from 'react';

const MAX_TRANSACTION_BATCH_SIZE = 10;
Expand Down Expand Up @@ -141,7 +140,7 @@ async function fetchAccountHistory(
status = FetchStatus.Fetched;
} catch (error) {
if (cluster !== Cluster.Custom) {
reportError(error, { url });
console.error(error, { url });
}
status = FetchStatus.FetchFailed;
}
Expand All @@ -153,7 +152,7 @@ async function fetchAccountHistory(
transactionMap = await fetchParsedTransactions(url, signatures);
} catch (error) {
if (cluster !== Cluster.Custom) {
reportError(error, { url });
console.error(error, { url });
}
status = FetchStatus.FetchFailed;
}
Expand Down

1 comment on commit 15a5268

@vercel
Copy link

@vercel vercel bot commented on 15a5268 Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

explorer – ./

explorer-git-master-solana-labs.vercel.app
explorer-solana-labs.vercel.app
explorer.solana.com

Please sign in to comment.