checky check so faro will only send data on the server

This commit is contained in:
2026-07-11 17:37:06 +02:00
parent e8c369b83c
commit 1a207185ff
+14 -10
View File
@@ -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 <Dashboard />;
}