Method metrics with AOP

As of now, we only managed to monitor our system with specific moments: calls to metrics, metrics, and errors occurring. A sure way to monitor everything in our application is to use AOP (Aspect-oriented programming) within our Angular apps. AOP is not a new technique, but it isn't widely used in the JavaScript ecosystem. AOP consists of defining aspects. Aspects are subprograms that are associated with specified pieces of our application. Aspects are woven into methods at compilation time and are executed before and/or after the method they are woven into. In the case of Angular-based applications, the method will be woven at transpilation from TypeScript to JavaScript. Weaving an aspect to a method in vanilla JavaScript ...

Get Angular Design Patterns now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.