40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import "@/App.css";
|
|
|
|
import {
|
|
getWebInstrumentations,
|
|
initializeFaro,
|
|
ReactIntegration,
|
|
ConsoleInstrumentation,
|
|
WebVitalsInstrumentation,
|
|
LogLevel,
|
|
} from "@grafana/faro-react";
|
|
import Dashboard from "@/components/Dashboard/Dashboard";
|
|
|
|
function App() {
|
|
const isProduction = import.meta.env.PROD;
|
|
|
|
if (isProduction && window.location.hostname === "localhost") {
|
|
console.debug("Initializing Faro environment...");
|
|
|
|
initializeFaro({
|
|
url: "http://localhost:12347/collect",
|
|
app: {
|
|
name: "monitor-im-flur",
|
|
version: import.meta.env.VITE_APP_VERSION || "0.0.1",
|
|
environment: "production",
|
|
},
|
|
instrumentations: [
|
|
...getWebInstrumentations({
|
|
captureConsole: true,
|
|
}),
|
|
new ConsoleInstrumentation(),
|
|
new WebVitalsInstrumentation(),
|
|
new ReactIntegration(),
|
|
],
|
|
});
|
|
}
|
|
return <Dashboard />;
|
|
}
|
|
|
|
export default App;
|