34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
// ─── 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';
|
|
import { setupI18n } from '@repo/core-i18n';
|
|
|
|
const App = lazy(() => import('./apps'));
|
|
|
|
async function bootstrap() {
|
|
// Initialize i18next and load language from secureStorage
|
|
await setupI18n();
|
|
|
|
createRoot(document.getElementById('app')!).render(
|
|
<StrictMode>
|
|
<App />
|
|
</StrictMode>,
|
|
);
|
|
}
|
|
|
|
bootstrap();
|