# APM Errors not Showing in Kibana

**URL:** <https://discuss.elastic.co/t/apm-errors-not-showing-in-kibana/212158>\
**Category:** APM\
**Tags:** rum\
**Created:** [December 17, 2019, 12:06pm UTC](https://discuss.elastic.co/t/apm-errors-not-showing-in-kibana/212158 "2019-12-17T12:06:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akosanovic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akosanovic/32/58345_2.png) [@akosanovic](https://discuss.elastic.co/u/akosanovic)\
**Post date:** [December 17, 2019, 12:06pm UTC](https://discuss.elastic.co/t/apm-errors-not-showing-in-kibana/212158/1 "2019-12-17T12:06:58Z")

</div>

**Steps To Repro:**

- Create new Angular 8 project using Angular CLI

- Add APM Rum agent following the instructions from the official [documentation](https://www.elastic.co/guide/en/apm/agent/rum-js/current/angular-integration.html)

- Throw Error on App Init

Navigate to the cloud Kibana APM and notice that Transactions are logged in correctly but the Error is not getting logged.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/d/6d136019d90106471d4de960539f87bc415bf67a.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/0/a061d36f74c92d58c8c5cebc50edce582a6b9617.png)

**Kibana version** : 7.5.0

**Elasticsearch version** : 7.5.0

**APM Server version** : 7.5.0

**APM Agent language and version** : apm-rum-angular v3

**Browser version** : any

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:

**Fresh install or upgraded from other version?** : Fresh

**Is there anything special in your setup?** : No

**Errors in browser console (if relevant)**:

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/2/3246443529c22e34571abab658704b051c19e7ce.png)

---

<div class="post-metadata">

**Author:** ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)\
**Post date:** [December 20, 2019, 10:50am UTC](https://discuss.elastic.co/t/apm-errors-not-showing-in-kibana/212158/2 "2019-12-20T10:50:08Z")

</div>

Hi Aleksandra,

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.

```auto
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

```auto
@NgModule({
  providers: [{provide: ErrorHandler, useClass: APMErrorHandler}]
})
class MyModule {}

```

Please refer to the Angular docs - [https://angular.io/api/core/ErrorHandler](https://angular.io/api/core/ErrorHandler) and do let us know if you run in to any issues.

Thanks,  
Vignesh

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 10, 2020, 6:50am UTC](https://discuss.elastic.co/t/apm-errors-not-showing-in-kibana/212158/3 "2020-01-10T06:50:16Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
