Refactor code structure for improved readability and maintainability
This commit is contained in:
+14
-7
@@ -1,15 +1,22 @@
|
||||
// import { DateUtils } from '@repo/utils';
|
||||
// import { CurrencyUtils } from '@repo/utils';
|
||||
// ─── Observability Bootstrap (MUST be first) ────────────────────
|
||||
// Initializes Grafana Faro + OTel auto-instrumentation before any
|
||||
// React code or HTTP requests are executed.
|
||||
import { initTelemetry } from '@repo/core-api/observability/setup';
|
||||
|
||||
initTelemetry({
|
||||
appName: import.meta.env.VITE_APP_NAME || 'fe-monorepo-web',
|
||||
appVersion: import.meta.env.VITE_APP_VERSION || '0.0.0',
|
||||
telemetryUrl: import.meta.env.VITE_FARO_URL || 'https://telemetry.eigen.co.id/collect',
|
||||
otlpTraceUrl: import.meta.env.VITE_OTLP_TRACE_URL || 'https://telemetry.eigen.co.id/v1/traces',
|
||||
environment: import.meta.env.VITE_ENV || 'development',
|
||||
});
|
||||
|
||||
// ─── Application Bootstrap ──────────────────────────────────────
|
||||
import './main.css';
|
||||
import { lazy, StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
const App = lazy(() => import('./apps'));
|
||||
|
||||
// DateUtils.setGlobalConfig('Asia/Jakarta');
|
||||
// DateUtils.setGlobalConfig('Asia/Makassar');
|
||||
|
||||
// CurrencyUtils.setGlobalPrefix('IDR ');
|
||||
// CurrencyUtils.setGlobalDecimalSeparator(',');
|
||||
createRoot(document.getElementById('app')!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
|
||||
Reference in New Issue
Block a user