Skip to content

Commit 52a1832

Browse files
authored
feat: adding user telemetry orchestration service (#1468)
1 parent 39afe1b commit 52a1832

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

src/app/application-frame/application-frame.component.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { ChangeDetectionStrategy, Component } from '@angular/core';
1+
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
22
import { IconType } from '@hypertrace/assets-library';
33
import { LayoutChangeService } from '@hypertrace/common';
44
import { IconSize } from '@hypertrace/components';
5-
5+
import { UserTelemetryOrchestrationService } from '../shared/telemetry/user-telemetry-orchestration.service';
66
@Component({
77
selector: 'ht-application-frame',
88
styleUrls: ['./application-frame.component.scss'],
@@ -22,4 +22,10 @@ import { IconSize } from '@hypertrace/components';
2222
</div>
2323
`
2424
})
25-
export class ApplicationFrameComponent {}
25+
export class ApplicationFrameComponent implements OnInit {
26+
public constructor(private readonly userTelemetryOrchestrationService: UserTelemetryOrchestrationService) {}
27+
28+
public ngOnInit(): void {
29+
this.userTelemetryOrchestrationService.initialize();
30+
}
31+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Injectable } from '@angular/core';
2+
import { UserTelemetryService } from '@hypertrace/common';
3+
4+
@Injectable({
5+
providedIn: 'root'
6+
})
7+
export class UserTelemetryOrchestrationService {
8+
public constructor(private readonly userTelemetryService: UserTelemetryService) {}
9+
10+
public initialize(): void {
11+
this.userTelemetryService.initialize();
12+
13+
/**
14+
* To Identify user or keep it anonymous, please call this.userTelemetryService.identify()
15+
* to identify the user.
16+
*/
17+
}
18+
}

0 commit comments

Comments
 (0)