You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(angular): Update Angular docs for v7 release (#4963)
This PR updates our Angular SDK docs for the v7 release. It adds information about compatibility of our SDK with different Angular versions and updates information on `TraceDirective` compatibility.
If you're using version 6 of the Angular SDK, using `TraceDirective` or `TraceModule` causes a
34
+
compiler error at application compile time of your Angular application. This is a [known issue](https://github.com/getsentry/sentry-javascript/issues/3282)
35
+
of our Angular SDK v6 and it was [fixed](https://github.com/getsentry/sentry-javascript/issues/4644)
36
+
in v7 of our Angular SDK. We recommend upgrading to the latest Angular SDK version.
37
+
Otherwise, please use options 2 (`TraceClassDecorator`) and 3 (`TraceMethodDecorator`)
38
+
below to track your Angular components.
39
+
40
+
</Alert>
41
+
42
+
2.`TraceClassDecorator` tracks a duration between `OnInit` and `AfterViewInit` lifecycle hooks in components:
8
43
9
44
```javascript
10
45
import { Component } from"@angular/core";
@@ -20,7 +55,7 @@ export class HeaderComponent {
20
55
}
21
56
```
22
57
23
-
2.`TraceMethodDecorator` tracks a specific lifecycle hooks as point-in-time spans in components:
58
+
3.`TraceMethodDecorator` tracks a specific lifecycle hooks as point-in-time spans in components:
24
59
25
60
```javascript
26
61
import { Component, OnInit } from"@angular/core";
@@ -40,20 +75,20 @@ You can also add your own custom spans by attaching them to the current active t
40
75
helper. For example, to track the duration of the Angular bootstraping process:
0 commit comments