File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export type EXPERIMENTAL_SETTINGS = |
17
17
18
18
export class ExperimentalSettings {
19
19
private configcatClient : configcatcommon . IConfigCatClient ;
20
+ private gitpodHostUrl : URL | undefined ;
20
21
21
22
constructor (
22
23
key : string ,
@@ -26,6 +27,10 @@ export class ExperimentalSettings {
26
27
private readonly pendingOwner : Promise < User > ,
27
28
private readonly pendingTeams : Promise < Team [ ] > ,
28
29
) {
30
+ try {
31
+ this . gitpodHostUrl = new URL ( gitpodHost ) ;
32
+ } catch {
33
+ }
29
34
this . configcatClient = configcat . createClientWithLazyLoad ( key , {
30
35
baseUrl : new URL ( '/configcat' , context . extensionMode === vscode . ExtensionMode . Production ? gitpodHost : 'https://gitpod-staging.com' ) . href ,
31
36
logger : {
@@ -81,6 +86,9 @@ export class ExperimentalSettings {
81
86
if ( teamId ) {
82
87
attributes [ "team_id" ] = teamId ;
83
88
}
89
+ if ( this . gitpodHostUrl ) {
90
+ attributes [ "gitpod_host" ] = this . gitpodHostUrl . host ;
91
+ }
84
92
return new configcatcommon . User ( userId , email , undefined , attributes ) ;
85
93
}
86
94
You can’t perform that action at this time.
0 commit comments