From 51a0bae57476dcfbc9ca29a4491291f637b63079 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Tue, 18 Feb 2025 14:06:48 -0500 Subject: [PATCH] fix(nx-dev): remove OTel-based tracing for now to remove local dev erros (#30096) Locally, when running `nx serve-docs nx-dev`, you'll see errors coming from `/blog` URLs due to instrumentation problems. This is caused by the `@grafana/faro-web-tracing` packages as soon as it is imported in an app router environment. We don't need it for now, so we can just remove it. It means that we will be missing tracing on HTTP requests like XHRs, but we still get performance metrics and error reporting. ## Current Behavior See errors in logs during development ## Expected Behavior No errors in logs ## Related Issue(s) Fixes # --- nx-dev/nx-dev/lib/components/frontend-observability.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nx-dev/nx-dev/lib/components/frontend-observability.tsx b/nx-dev/nx-dev/lib/components/frontend-observability.tsx index 304b46e524..fd2e1902cf 100644 --- a/nx-dev/nx-dev/lib/components/frontend-observability.tsx +++ b/nx-dev/nx-dev/lib/components/frontend-observability.tsx @@ -1,7 +1,6 @@ 'use client'; import { useEffect, useRef } from 'react'; import { getWebInstrumentations, initializeFaro } from '@grafana/faro-web-sdk'; -import { TracingInstrumentation } from '@grafana/faro-web-tracing'; export function FrontendObservability() { const initialized = useRef(false); @@ -25,10 +24,7 @@ export function FrontendObservability() { version, environment, }, - instrumentations: [ - ...getWebInstrumentations(), - new TracingInstrumentation(), - ], + instrumentations: [...getWebInstrumentations()], }); }, []); return null;