OptionalonBeforeInit: () => voidOptional callback invoked before SDK construction.
Power users can call diag.setLogger() in this callback to override the
framework's default DiagLogger. The callback runs AFTER the framework sets
frameworkDiagLogger as default.
true if OpenTelemetry was initialized, false if disabled
Initialize the OpenTelemetry SDK. Call this at application startup, before any other code.
All @opentelemetry/* packages are loaded dynamically on first call (see DD-020). When OTEL is disabled, no packages are loaded and the function returns immediately — saving ~15-20 MB of memory.
Builds both trace and metric exporters from the unified config. Only HTTP and Express instrumentations are loaded — other auto-instrumentations are irrelevant for MCP servers.