Skip to content

Conversation

@devcorpio
Copy link
Contributor

@devcorpio devcorpio commented Jun 29, 2023

Related to #1345

Summary

The changes in this PR will make it possible to use Angular RUM integration in Angular Ivy Applications, including Angular 16.

E2E tests work properly in each of the browsers we support.

Angular 16 app using RUM agent WITHOUT the changes

angular-16-before-change

Angular 16 app using RUM agent WITH the changes

angular-16-after-change

--
The new changes are only compatible with Angular >=12.

Note: From Angular 12 is not possible to disable Ivy

See below the behaviour with older versions:

Angular 9 output:
angular-9

Angular 10 output

angular-10

Angular 11 output
angular-11

How to test

Bear in mind that there are other ways to test this, but this is my favourite way (closer to the reality, users install packages):

  1. Checkout the PR's branch
  2. Install Verdaccio and start it (make sure you are authenticated)
  3. Publish rum agent in Verdaccio
  4. You can confirm that everything has been published by going to http//localhost:4873
  5. In your angular app install the RUM angular package: npm install @elastic/apm-rum-angular@latest --registry http://localhost:4873
@devcorpio devcorpio linked an issue Jun 29, 2023 that may be closed by this pull request
@devcorpio devcorpio marked this pull request as ready for review June 29, 2023 15:47
Copy link
Member

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alberto and myself had a chat offline, we will update the E2E to angular 16 to make it easier for users to reference our example.

@sergey-tihon
Copy link

May we expect some alpha npm package any time soon to test Ivy support?

@devcorpio
Copy link
Contributor Author

devcorpio commented Jul 3, 2023

Alberto and myself had a chat offline, we will update the E2E to angular 16 to make it easier for users to reference our example.

We had a follow-up, we will not do this, for the reasons:

  • Angular > 12 drop support for IE11 (which wasn't particularly a problem, this wasn't the blocker)
  • Angular 16 doesn't support Node.js 14 - which is the version we use in the agent, so we needed to upgrade to Node.js 16
  • Update to Node.js implies supporting NPM 7, which opens a new can of worms

That's why it was decided to do this in a separated tech debt issue, now it's not the right time to do this update

@devcorpio
Copy link
Contributor Author

devcorpio commented Jul 3, 2023

hi @sergey-tihon,

I added a "how to test" section in the PR's description

Copy link
Member

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉 , Tested with Angular 16 and works as expected.

@devcorpio devcorpio changed the title feat(rum-angular): support angular ivy feat(rum-angular)!: support angular ivy Jul 4, 2023
@devcorpio devcorpio merged commit 50bf76d into elastic:main Jul 4, 2023
@devcorpio devcorpio deleted the angular_ivy_support branch July 4, 2023 08:57
devcorpio added a commit that referenced this pull request Jul 5, 2023
BREAKING CHANGE: add angular ivy support
devcorpio added a commit that referenced this pull request Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants