- 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>
27 lines
739 B
TypeScript
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
|
|
})
|
|
}
|