From 1a207185ff27398009558dfb8293260d9335d0b9 Mon Sep 17 00:00:00 2001 From: Arif Hasanic Date: Sat, 11 Jul 2026 17:37:06 +0200 Subject: [PATCH] checky check so faro will only send data on the server --- src/App.tsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 9f8d0a0..3c9e975 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,16 +8,20 @@ import { import Dashboard from "@/components/Dashboard/Dashboard"; function App() { - initializeFaro({ - url: "http://localhost:12347/collect", // Points to your local Alloy container - app: { - name: "monitor-im-flur", - version: "1.0.0", - environment: "development", - }, - instrumentations: [...getWebInstrumentations(), new ReactIntegration()], - }); - + if (window.location.hostname === "localhost") { + initializeFaro({ + url: "http://localhost:12347/collect", + app: { + name: "monitor-im-flur", + version: "0.0.1", + environment: "development", + }, + instrumentations: [ + ...getWebInstrumentations(), + new ReactIntegration(), + ], + }); + } return ; }