mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-31 13:47:02 +02:00
feat: report hostedBy and licenseType (#10141)
Added two new fields to FeatureInfo (what gets reported as telemetry) reporting license type and hostedBy. Will be overriden in Enterprise.
This commit is contained in:
parent
dbc34a10bd
commit
c13ab85b1c
@ -433,6 +433,8 @@ export class InstanceStatsService {
|
|||||||
userActive,
|
userActive,
|
||||||
productionChanges,
|
productionChanges,
|
||||||
postgresVersion,
|
postgresVersion,
|
||||||
|
licenseType,
|
||||||
|
hostedBy,
|
||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
this.getToggleCount(),
|
this.getToggleCount(),
|
||||||
this.getRegisteredUsers(),
|
this.getRegisteredUsers(),
|
||||||
@ -454,6 +456,8 @@ export class InstanceStatsService {
|
|||||||
this.getActiveUsers(),
|
this.getActiveUsers(),
|
||||||
this.getProductionChanges(),
|
this.getProductionChanges(),
|
||||||
this.postgresVersion(),
|
this.postgresVersion(),
|
||||||
|
this.getLicenseType(),
|
||||||
|
this.getHostedBy(),
|
||||||
]);
|
]);
|
||||||
const versionInfo = await this.versionService.getVersionInfo();
|
const versionInfo = await this.versionService.getVersionInfo();
|
||||||
|
|
||||||
@ -487,10 +491,20 @@ export class InstanceStatsService {
|
|||||||
productionChanges60: productionChanges.last60,
|
productionChanges60: productionChanges.last60,
|
||||||
productionChanges90: productionChanges.last90,
|
productionChanges90: productionChanges.last90,
|
||||||
postgresVersion,
|
postgresVersion,
|
||||||
|
licenseType,
|
||||||
|
hostedBy,
|
||||||
};
|
};
|
||||||
return featureInfo;
|
return featureInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getHostedBy(): string {
|
||||||
|
return 'self-hosted';
|
||||||
|
}
|
||||||
|
|
||||||
|
getLicenseType(): string {
|
||||||
|
return 'oss';
|
||||||
|
}
|
||||||
|
|
||||||
featuresExported(): Promise<number> {
|
featuresExported(): Promise<number> {
|
||||||
return this.memorize('searchEventsCountFeaturesExported', () =>
|
return this.memorize('searchEventsCountFeaturesExported', () =>
|
||||||
this.eventStore.searchEventsCount([
|
this.eventStore.searchEventsCount([
|
||||||
|
@ -41,6 +41,8 @@ const fakeTelemetryData = {
|
|||||||
productionChanges60: 0,
|
productionChanges60: 0,
|
||||||
productionChanges90: 0,
|
productionChanges90: 0,
|
||||||
postgresVersion: '17.1 (Debian 17.1-1.pgdg120+1)',
|
postgresVersion: '17.1 (Debian 17.1-1.pgdg120+1)',
|
||||||
|
licenseType: 'test',
|
||||||
|
hostedBy: 'self-hosted',
|
||||||
};
|
};
|
||||||
|
|
||||||
test('yields current versions', async () => {
|
test('yields current versions', async () => {
|
||||||
|
@ -50,6 +50,8 @@ export interface IFeatureUsageInfo {
|
|||||||
productionChanges60: number;
|
productionChanges60: number;
|
||||||
productionChanges90: number;
|
productionChanges90: number;
|
||||||
postgresVersion: string;
|
postgresVersion: string;
|
||||||
|
licenseType: string;
|
||||||
|
hostedBy: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class VersionService {
|
export default class VersionService {
|
||||||
|
Loading…
Reference in New Issue
Block a user