Skip to content

Commit ffb6820

Browse files
authored
Merge pull request #2203 from RedisInsight/be/feature/RI-4625_application_start_port
#RI-4625 - add port to application start event
2 parents 93fe4c5 + 07e2349 commit ffb6820

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

redisinsight/api/src/modules/server/server.service.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const mockEventPayload: ITelemetryEvent = {
3434
appVersion: SERVER_CONFIG.appVersion,
3535
osPlatform: process.platform,
3636
buildType: SERVER_CONFIG.buildType,
37+
port: SERVER_CONFIG.port,
3738
},
3839
nonTracking: true,
3940
};

redisinsight/api/src/modules/server/server.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export class ServerService implements OnApplicationBootstrap {
6363
appVersion: SERVER_CONFIG.appVersion,
6464
osPlatform: process.platform,
6565
buildType: SERVER_CONFIG.buildType,
66+
port: process.env.API_PORT || SERVER_CONFIG.port,
6667
},
6768
nonTracking: true,
6869
});

redisinsight/api/test/api/analytics/analytics.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ describe('Analytics', () => {
2626
fail('APPLICATION_STARTED or APPLICATION_FIRST_START events were not found');
2727
}
2828

29-
expect(found?.properties).to.have.all.keys('appVersion', 'osPlatform', 'buildType', 'controlNumber', 'controlGroup');
29+
expect(found?.properties).to.have.all.keys('appVersion', 'osPlatform', 'buildType', 'controlNumber', 'controlGroup', 'port');
3030
expect(found?.properties?.appVersion).to.be.a('string');
3131
expect(found?.properties?.osPlatform).to.be.a('string');
3232
expect(found?.properties?.buildType).to.be.a('string');
33+
expect(found?.properties?.port).to.be.a('number');
3334
});
3435
});

0 commit comments

Comments
 (0)