38 lines
1.4 KiB
TypeScript
38 lines
1.4 KiB
TypeScript
// ─── Optional Telemetry Bootstrap ───────────────────────────────
|
|
// Landing app uses minimal telemetry. Remove this block entirely
|
|
// if you want zero observability overhead.
|
|
import { initTelemetry } from '@repo/core-api/observability/setup';
|
|
|
|
initTelemetry({
|
|
appName: import.meta.env.VITE_APP_NAME || 'fe-monorepo-landing',
|
|
appVersion: import.meta.env.VITE_APP_VERSION || '0.0.0',
|
|
telemetryUrl: import.meta.env.VITE_FARO_URL || 'https://telemetry.eigen.co.id/collect',
|
|
environment: import.meta.env.VITE_ENV || 'development',
|
|
// No otlpTraceUrl — only Faro collector, minimal overhead
|
|
});
|
|
|
|
// ─── Application Bootstrap ──────────────────────────────────────
|
|
import './main.css';
|
|
import { StrictMode } from 'react';
|
|
import { createRoot } from 'react-dom/client';
|
|
import { setupI18n } from '@repo/core-i18n';
|
|
import { secureStorage, AppStorageKey } from './core/storage';
|
|
import App from './app';
|
|
|
|
async function bootstrap() {
|
|
await setupI18n({
|
|
storageAdapter: {
|
|
getLanguage: async () => await secureStorage.getItem<string>(AppStorageKey.LOCALE),
|
|
setLanguage: async (lng: string) => await secureStorage.setItem(AppStorageKey.LOCALE, lng),
|
|
},
|
|
});
|
|
|
|
createRoot(document.getElementById('app')!).render(
|
|
<StrictMode>
|
|
<App />
|
|
</StrictMode>,
|
|
);
|
|
}
|
|
|
|
bootstrap();
|