Files
adam-acs/app/services/telemetry.ts
T
Kevin L'HereecandCopilot d1c65dbf1e chore: initial commit — AdonisJS v7 TR-069 ACS
- Docker infrastructure (Dockerfile, docker-compose.yml, genieacs-sim)
- AdonisJS v7 app with Inertia.js + Vue 3
- MongoDB integration
- CWMP/TR-069 state machine engine
- Configuration engine with compliance tracking
- Branding: ADAM ACS (favicon, navbar, locales)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 16:46:37 +02:00

27 lines
739 B
TypeScript

import env from '#start/env'
let initialized = false
export function initTelemetry() {
if (initialized) return
initialized = true
const exporterUri = env.get('OTEL_EXPORTER_URI')
if (!exporterUri) return
// OpenTelemetry setup is optional - only initialize when available
import('@opentelemetry/sdk-node')
.then(({ NodeSDK }) => {
return import('@opentelemetry/auto-instrumentations-node').then(({ getNodeAutoInstrumentations }) => {
const sdk = new NodeSDK({
serviceName: env.get('OTEL_SERVICE_NAME', 'papaye-v2'),
instrumentations: [getNodeAutoInstrumentations()],
})
sdk.start()
})
})
.catch(() => {
// OpenTelemetry not available, skip
})
}