File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ const UNKNOWN_COMPONENT = 'unknown';
159
159
*/
160
160
@Directive ( { selector : '[trace]' } )
161
161
export class TraceDirective implements OnInit , AfterViewInit {
162
- @Input ( 'trace' ) public componentName : string = UNKNOWN_COMPONENT ;
162
+ @Input ( 'trace' ) public componentName ? : string ;
163
163
164
164
private _tracingSpan ?: Span ;
165
165
@@ -168,6 +168,10 @@ export class TraceDirective implements OnInit, AfterViewInit {
168
168
* @inheritdoc
169
169
*/
170
170
public ngOnInit ( ) : void {
171
+ if ( ! this . componentName ) {
172
+ this . componentName = UNKNOWN_COMPONENT ;
173
+ }
174
+
171
175
const activeTransaction = getActiveTransaction ( ) ;
172
176
if ( activeTransaction ) {
173
177
this . _tracingSpan = activeTransaction . startChild ( {
You can’t perform that action at this time.
0 commit comments