# Elastic APM - Angular-1.3.17 integration

**URL:** <https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362>\
**Category:** Elastic Observability\
**Created:** [October 19, 2023, 7:27am UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362 "2023-10-19T07:27:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [October 19, 2023, 7:27am UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/1 "2023-10-19T07:27:55Z")

</div>

hi Team,

Am working on to integrate RUM service to angular-1.3.17, please can you help me with the steps.

Facing issues with integration and other artifacts regarding calling the libraries/modules used.

Getting error that modules like NgModule, BrowserModule, Routes, RouterModule, ApmModule, ApmService.

Modules not loaded.

How do I install these modules to make Elastic APM work.

---

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [October 25, 2023, 5:11am UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/2 "2023-10-25T05:11:49Z")

</div>

hi @carly.richmond & @vigneshshanmugam ,

Please can you help

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [October 25, 2023, 9:33am UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/3 "2023-10-25T09:33:56Z")

</div>

Hi @Dixit,

To confirm, are you trying to get the RUM agent working with AngularJS 1.3.17? That is a very old version of Angular that is past EOL.

Can you share which version of the RUM agent you have installed, along with which RUM dependencies you are installing (e.g. @elastic/apm-rum versus @elastic/apm-rum-angular)?

---

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [October 25, 2023, 4:26pm UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/4 "2023-10-25T16:26:23Z")

</div>

hi @carly.richmond ,

Please do suggest me steps, what I have to go through as I have tried(may be I might have missed few things) which was mentioned in the documentation.

Yes, agreed angular-1.3.17 is old and we are in the process of upgrade. When the new design with angular \>2.0 is ready, it would take a while.

Am using the documentation provided here in elastic RUM section - [Getting started | APM Real User Monitoring JavaScript Agent Reference [1.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/rum-js/1.x/getting-started.html)  
npm install elastic-apm-js-base --save

Angular followed below packages -

npm i @elastic/apm-rum-angular@1.2.3

npm i @elastic/apm-rum

npm i @elastic/apm-rum-core

NgModule, BrowserModule, Routes, RouterModule, ApmModule, ApmService

NgModule } from 'node\_modules@angular/core'  
import { BrowserModule } from '@angular/platform-browser'  
import { Routes, RouterModule } from '@angular/router'  
import { ApmModule, ApmService

Appreciate your help !

---

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [October 25, 2023, 4:27pm UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/5 "2023-10-25T16:27:05Z")

</div>

hi @carly.richmond ,

Not sure where to start with the implementation.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [October 26, 2023, 12:15pm UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/6 "2023-10-26T12:15:35Z")

</div>

I'm not 100% sure if the AngularJS is supported by the agent, but hopefully someone else will chime in to confirm.

What versions of @elastic/apm-rum and @elastic/apm-rum core are you installing? If you are installing the latest `@elastic/apm-rum` and `@elastic/apm-rum-core` alongside `@elastic/apm-rum-angular@1.2.3` I think you will have an incompatibility issue, which does look to be the case as your error is complaining about Angular 2+ modules.

---

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [October 27, 2023, 8:29am UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/8 "2023-10-27T08:29:14Z")

</div>

hi @carly.richmond ,

Please help me with the pointers, from where can I download and install @elastic/apm-rum and @elastic/apm-rum-core which is compatible with `@elastic/apm-rum-angular@1.2.3`.

Any steps would appreciate as am bit new to Angular Integration to elastic APM

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [October 27, 2023, 9:26am UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/9 "2023-10-27T09:26:51Z")

</div>

Digging around in the release on [GitHub](https://github.com/elastic/apm-agent-rum-js/blob/%40elastic/apm-rum-angular%401.2.3/packages/rum-angular/package.json), I _think_ you need the following:

- [@elastic/apm-rum-core 5.11](https://github.com/elastic/apm-agent-rum-js/blob/%40elastic/apm-rum-angular%401.2.3/packages/rum-core/package.json)
- [@elastic/apm-rum 5.8.0](https://github.com/elastic/apm-agent-rum-js/blob/%40elastic/apm-rum-angular%401.2.3/packages/rum/package.json)

This is purely a guess! However you should be able to install with `npm`.

However, one concern I have is the peer dependencies state [angular 8+](https://github.com/elastic/apm-agent-rum-js/blob/%40elastic/apm-rum-angular%401.2.3/packages/rum-angular/package.json#L45).

---

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [October 27, 2023, 1:46pm UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/10 "2023-10-27T13:46:20Z")

</div>

hi @carly.richmond ,

Please help me with these messages as getting as warning , while installing elastic APM packages

Is this due to incompatibility issues ? Please help in this regard

npm i @elastic/apm-rum-angular@1.2.3 -

```auto
 npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'jivacore.ngui@1.2.0',
npm WARN EBADENGINE required: { node: '>=0.12.04' },
npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'npm@1.1.71',
npm WARN EBADENGINE required: { node: '>=0.6', npm: '1' },
npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'tar@0.1.14',
npm WARN EBADENGINE required: { node: '~0.5.9 || 0.6 || 0.7 || 0.8' },
npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
npm WARN EBADENGINE }

```

npm i @elastic/apm-rum-core@5.11 -

```auto
 npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'jivacore.ngui@1.2.0',
npm WARN EBADENGINE required: { node: '>=0.12.04' },
npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'npm@1.1.71',
npm WARN EBADENGINE required: { node: '>=0.6', npm: '1' },
npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'tar@0.1.14',
npm WARN EBADENGINE required: { node: '~0.5.9 || 0.6 || 0.7 || 0.8' },
npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
npm WARN EBADENGINE }

```

npm i @elastic/apm-rum@5.8.0

```auto
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'jivacore.ngui@1.2.0',
npm WARN EBADENGINE required: { node: '>=0.12.04' },
npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'npm@1.1.71',
npm WARN EBADENGINE required: { node: '>=0.6', npm: '1' },
npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'tar@0.1.14',
npm WARN EBADENGINE required: { node: '~0.5.9 || 0.6 || 0.7 || 0.8' },
npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
npm WARN EBADENGINE }

```

---

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [October 28, 2023, 12:46pm UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/11 "2023-10-28T12:46:26Z")

</div>

hi @carly.richmond ,

Am seeing these errors in browser not sure why when the elastic APM - Angular packages are installed.

Like this for all the modules mentioned in the code below  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/9/497975e493bd50a6b72530ffb6ed5567eea33748.png)

import { NgModule } from 'node\_modules/@angular/core'  
import { BrowserModule } from '@angular/platform-browser'  
import { Routes, RouterModule } from '@angular/router'  
import { ApmModule, ApmService } from '@elastic/apm-rum-angular'

/\* const routes: Routes = [  
{ path: 'contact', component: ContactListComponent },  
{ path: 'contact/:id', component: ContactDetailComponent }  
] \*/

@NgModule({

imports: [ApmModule, BrowserModule, RouterModule.forRoot(routes)],  
declarations: [AppComponent, ContactListComponent, ContactDetailComponent],  
providers: [ApmService],  
bootstrap: [AppComponent]  
})  
export class AppModule {  
constructor(service: ApmService) {  
// Agent API is exposed through this apm instance  
const apm = service.init({  
serviceName: 'angular-app',  
serverUrl: '[http://POCWQAAPM:8200](http://POCWQAAPM:8200)'  
})  
}  
}

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [October 31, 2023, 11:14am UTC](https://discuss.elastic.co/t/elastic-apm-angular-1-3-17-integration/345362/12 "2023-10-31T11:14:52Z")

</div>

Hi @Dixit,

This is down to incompatibility. It looks link apm-rum-angular isn't compatible with AngularJS, which does makes sense given the concern I raised before with the Angular 8 peer dependency. NgModule originates from Angular 2+.

I've not tried to instrument an AngularJS application myself as it's long post EOL, and I'm not confident the agent supports it. I would recommend upgrading to a supported version of Angular as soon as possible and add the instrumentation then, which you are already doing.

As a last resort, you could try removing `@elastic/apm-rum-angular` and `@elastic/apm-rum-core` dependencies and do a simple vanilla JS RUM install [using the documentation here](https://www.elastic.co/guide/en/apm/agent/rum-js/5.x/install-the-agent.html). Disclaimer, I've not tried this!
