mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-18 01:00:39 -07:00
fix(logging): Log NodeJS Version && Make Config.SessionID readonly (#7219)
This commit is contained in:
@@ -262,6 +262,17 @@ describe('ClearcutLogger', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('logs the current nodejs version', () => {
|
||||
const { logger } = setup({});
|
||||
|
||||
const event = logger?.createLogEvent(EventNames.API_ERROR, []);
|
||||
|
||||
expect(event?.event_metadata[0]).toContainEqual({
|
||||
gemini_cli_key: EventMetadataKey.GEMINI_CLI_NODE_VERSION,
|
||||
value: process.versions.node,
|
||||
});
|
||||
});
|
||||
|
||||
it('logs the current surface', () => {
|
||||
const { logger } = setup({});
|
||||
|
||||
|
||||
@@ -889,6 +889,10 @@ export class ClearcutLogger {
|
||||
gemini_cli_key: EventMetadataKey.GEMINI_CLI_OS,
|
||||
value: process.platform,
|
||||
},
|
||||
{
|
||||
gemini_cli_key: EventMetadataKey.GEMINI_CLI_NODE_VERSION,
|
||||
value: process.versions.node,
|
||||
},
|
||||
];
|
||||
return [...data, ...defaultLogMetadata];
|
||||
}
|
||||
|
||||
@@ -325,4 +325,7 @@ export enum EventMetadataKey {
|
||||
|
||||
// Logs the total duration in milliseconds for a content retry failure.
|
||||
GEMINI_CLI_CONTENT_RETRY_FAILURE_TOTAL_DURATION_MS = 81,
|
||||
|
||||
// Logs the current nodejs version
|
||||
GEMINI_CLI_NODE_VERSION = 83,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user