Skip to content

Commit b93d796

Browse files
committed
fix: review update
1 parent 598cec1 commit b93d796

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/options.context.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,14 @@ const getLoggerOptions = (session = getSessionOptions()): LoggingSession => {
188188
const getStatsOptions = (options = getSessionOptions()): StatsSession => {
189189
const { stats: base, mode } = getOptions();
190190
const publicSessionId = options.publicSessionId;
191-
const health = `${CHANNEL_BASENAME}:${mode}:stats:health:${publicSessionId}`;
192-
const session = `${CHANNEL_BASENAME}:${mode}:stats:session:${publicSessionId}`;
193-
const transport = `${CHANNEL_BASENAME}:${mode}:stats:transport:${publicSessionId}`;
194-
const traffic = `${CHANNEL_BASENAME}:${mode}:stats:traffic:${publicSessionId}`;
195-
const channels = { health, transport, traffic, session };
191+
const channel = (type: string) => `${CHANNEL_BASENAME}:${mode}:stats:${type}:${publicSessionId}`;
192+
193+
const channels = {
194+
health: channel('health'),
195+
transport: channel('transport'),
196+
traffic: channel('traffic'),
197+
session: channel('session')
198+
};
196199

197200
return { ...base, publicSessionId, channels };
198201
};

0 commit comments

Comments
 (0)