monkey-front-core 0.0.552 → 0.0.553

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3901,8 +3901,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
3901
3901
  }], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxTokenStorageService }, { type: i1$1.TranslateService }, { type: MonkeyEcxErrorConfigService }]; } });
3902
3902
 
3903
3903
  class MonkeyEcxLogsConfigService {
3904
- constructor() {
3904
+ constructor(tokenStorage) {
3905
+ this.tokenStorage = tokenStorage;
3905
3906
  this.allSet = false;
3907
+ // not to do
3906
3908
  }
3907
3909
  apply(params, configBootstrap, environment, identifyCode) {
3908
3910
  const { program, logs } = params;
@@ -3927,15 +3929,36 @@ class MonkeyEcxLogsConfigService {
3927
3929
  this.allSet = true;
3928
3930
  }
3929
3931
  }
3932
+ async applyInfoToDataDog(environment) {
3933
+ try {
3934
+ const token = await this.tokenStorage.getToken();
3935
+ if (token.accessToken && environment.dataDogApplicationId) {
3936
+ const me = await this.tokenStorage.getMe();
3937
+ const user = {
3938
+ id: token.username,
3939
+ email: token.username,
3940
+ name: me.name,
3941
+ locale: me.locale
3942
+ };
3943
+ datadogRum.setUser(user);
3944
+ }
3945
+ }
3946
+ catch (e) {
3947
+ // not to do
3948
+ }
3949
+ }
3950
+ clearDataDogInfo() {
3951
+ datadogRum.clearUser();
3952
+ }
3930
3953
  }
3931
- MonkeyEcxLogsConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxLogsConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3954
+ MonkeyEcxLogsConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxLogsConfigService, deps: [{ token: MonkeyEcxTokenStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
3932
3955
  MonkeyEcxLogsConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxLogsConfigService, providedIn: 'root' });
3933
3956
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxLogsConfigService, decorators: [{
3934
3957
  type: Injectable,
3935
3958
  args: [{
3936
3959
  providedIn: 'root'
3937
3960
  }]
3938
- }] });
3961
+ }], ctorParameters: function () { return [{ type: MonkeyEcxTokenStorageService }]; } });
3939
3962
 
3940
3963
  class MonkeyEcxServiceWorkerConfigService {
3941
3964
  constructor(appRef, updates, modalService) {