🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(sentry): don't throw trpcclienterror in sentry (#9534)
Nimar288b6d4ff29f
diff --git a/web/instrumentation-client.ts b/web/instrumentation-client.tsindex 3bc4ab9186..f18dd7ae3e 100644--- a/web/instrumentation-client.ts+++ b/web/instrumentation-client.ts@@ -10,6 +10,23 @@ Sentry.init({environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,release: process.env.NEXT_PUBLIC_BUILD_ID,+ beforeSend(event, hint) {+ const error = hint.originalException;++ // Filter out TRPCClientErrors, we track them in DataDog.+ // The users see those via toast notifications -> see handleTrpcError in web/src/utils/api.ts+ if (+ error &&+ typeof error === "object" &&+ "name" in error &&+ error.name === "TRPCClientError"+ ) {+ return null;+ }++ return event;+ },+// Replay may only be enabled for the client-sideintegrations: [Sentry.replayIntegration({