When instrumenting Splunk BRUM with the NPM package in AngularJS, the instrumentation may not work if configuration is loaded dynamically at runtime. This issue typically occurs when the initialization (SplunkOtelWeb.init()) is delayed until after configuration is fetched from the backend, causing missing or incomplete telemetry in Splunk Observability.
SplunkOtelWeb.init() is called.splunk-init and splunk-config, indicating successful initialization.Recommended Troubleshooting:
export const configFactory = (configService: ConfigService) => {
return () => configService.load().then(_ => {
const config = configService.get();
console.log('splunk-init');
console.log('splunk-config', config.splunk);
SplunkOtelWeb.init(config.splunk);
});
}
splunk-init does not appear in the logs, the problem is likely with the application code rather than Splunk BRUM.
To ensure successful BRUM instrumentation:
SplunkOtelWeb.init() at the earliest point in application startup, ideally in index.html or before any network requests are made.splunk-init and splunk-config are present in logs and telemetry appears in Splunk Observability, instrumentation is successful.AngularJS Instrumentation Best Practices
| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
01-Oct-2026
|
Initial Release |