Creating a span for every component using component lifecycle events can be tedious. A better (?) approach could be to inject tracing behavior as a mixin via decorators:
@Component({
selector: 'app-heroes',
templateUrl: './heroes.component.html'
})
@Trace({start: OnInit, end: OnDestroy})
export class HeroesComponent {
localspan: LocalSpan;
The current problem with this approach is it breaks tree shaking for your application:
https://blog.nrwl.io/metaprogramming-higher-order-components-and-mixins-with-angular-ivy-75748fcbc310
so this shouldn't be built until Angular Ivy is released.
Creating a span for every component using component lifecycle events can be tedious. A better (?) approach could be to inject tracing behavior as a mixin via decorators:
The current problem with this approach is it breaks tree shaking for your application:
https://blog.nrwl.io/metaprogramming-higher-order-components-and-mixins-with-angular-ivy-75748fcbc310
so this shouldn't be built until Angular Ivy is released.