Skip to content

Commit 85d6a5a

Browse files
committed
#RI-6452 - No server_name parameter into CONFIG_DATABASES_DATABASE_ADDED event
1 parent e2722ed commit 85d6a5a

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

redisinsight/api/src/__mocks__/databases.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ export const mockDatabaseOverviewCurrentKeyspace = DatabaseOverviewKeyspace.Curr
232232
export const mockRedisServerInfoDto = {
233233
redis_version: '7.0.5',
234234
redis_mode: 'standalone',
235+
server_name: 'valkey',
235236
os: 'Linux 4.15.0-1087-gcp x86_64',
236237
arch_bits: '64',
237238
tcp_port: '11113',

redisinsight/api/src/modules/database/database.analytics.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ describe('DatabaseAnalytics', () => {
5757
timeout: mockDatabaseWithTlsAuth.timeout / 1_000, // milliseconds to seconds
5858
databaseIndex: 0,
5959
useDecompression: mockDatabaseWithTlsAuth.compressor,
60+
serverName: 'valkey',
6061
...DEFAULT_REDIS_MODULES_SUMMARY,
6162
},
6263
);
@@ -88,6 +89,7 @@ describe('DatabaseAnalytics', () => {
8889
timeout: mockDatabaseWithTlsAuth.timeout / 1_000, // milliseconds to seconds
8990
databaseIndex: 0,
9091
useDecompression: mockDatabaseWithTlsAuth.compressor,
92+
serverName: 'valkey',
9193
...DEFAULT_REDIS_MODULES_SUMMARY,
9294
},
9395
);
@@ -127,6 +129,7 @@ describe('DatabaseAnalytics', () => {
127129
version: 20000,
128130
},
129131
customModules: [{ name: 'rediSQL', version: 1 }],
132+
serverName: null,
130133
},
131134
);
132135
});
@@ -166,6 +169,7 @@ describe('DatabaseAnalytics', () => {
166169
version: 20000,
167170
},
168171
customModules: [{ name: 'rediSQL', version: 1 }],
172+
serverName: null,
169173
},
170174
);
171175
});

redisinsight/api/src/modules/database/database.analytics.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export class DatabaseAnalytics extends TelemetryBaseService {
5151
timeout: instance.timeout / 1_000, // milliseconds to seconds
5252
databaseIndex: instance.db || 0,
5353
useDecompression: instance.compressor || null,
54+
serverName: additionalInfo?.server?.server_name || null,
5455
...modulesSummary,
5556
},
5657
);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ export class DatabaseService {
184184
database,
185185
);
186186
const redisInfo = await this.databaseInfoProvider.getRedisGeneralInfo(client);
187+
187188
this.analytics.sendInstanceAddedEvent(database, redisInfo);
188189
await client.disconnect();
189190
} catch (e) {

0 commit comments

Comments
 (0)