Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(instrumentation): enhance error handling for HTTP client exceptions in Sentry integration (#9913)

marliessophiefa99dab9dd62
diff --git a/web/instrumentation-client.ts b/web/instrumentation-client.ts
index 4cc406e85b..2b6afb4b2f 100644
--- a/web/instrumentation-client.ts
+++ b/web/instrumentation-client.ts
@@ -29,7 +29,9 @@ Sentry.init({
// These are captured at the network level by httpClientIntegration but are already
// handled by tRPC's error handling system
if (
- event.exception?.values?.[0]?.mechanism?.type === "http.client" &&
+ (event.exception?.values?.[0]?.mechanism?.type === "http.client" ||
+ event.exception?.values?.[0]?.mechanism?.type ===
+ "auto.http.client.fetch") &&
event.request?.url?.includes("/api/trpc/")
) {
return null;