Thanks for trying out Elastic APM Integration. Had a quick look and it seems that the default integration of Angular Error Handler prints the error message to the console and does not rethrow them as ErrorEvent which means the RUM agent won't be able to track it automatically.
However there is an recommended approach from the Angular docs to implement a custom ErrorHandler for the application module and we could use that to capture errors in APM easily.
import { ErrorHandler } from '@angular/core'
import { apm } from '@elastic/apm-rum'
export class APMErrorHandler implements ErrorHandler {
handleError(error) {
apm.captureError(error)
}
}
and you would have to use that in your Application Module in this way
@NgModule({
providers: [{provide: ErrorHandler, useClass: APMErrorHandler}]
})
class MyModule {}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.