mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
feat: Add auth_type to StartSessionEvent OTel logging (#12034)
Co-authored-by: Shnatu <snatu@google.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -231,6 +231,7 @@ describe('loggers', () => {
|
||||
output_format: 'json',
|
||||
extension_ids: '',
|
||||
extensions_count: 0,
|
||||
auth_type: 'vertex-ai',
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -68,6 +68,7 @@ export class StartSessionEvent implements BaseTelemetryEvent {
|
||||
output_format: OutputFormat;
|
||||
extensions_count: number;
|
||||
extension_ids: string;
|
||||
auth_type?: string;
|
||||
|
||||
constructor(config: Config, toolRegistry?: ToolRegistry) {
|
||||
const generatorConfig = config.getContentGeneratorConfig();
|
||||
@@ -102,6 +103,7 @@ export class StartSessionEvent implements BaseTelemetryEvent {
|
||||
const extensions = config.getExtensions();
|
||||
this.extensions_count = extensions.length;
|
||||
this.extension_ids = extensions.map((e) => e.id).join(',');
|
||||
this.auth_type = generatorConfig?.authType;
|
||||
if (toolRegistry) {
|
||||
const mcpTools = toolRegistry
|
||||
.getAllTools()
|
||||
@@ -135,6 +137,7 @@ export class StartSessionEvent implements BaseTelemetryEvent {
|
||||
output_format: this.output_format,
|
||||
extensions_count: this.extensions_count,
|
||||
extension_ids: this.extension_ids,
|
||||
auth_type: this.auth_type,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user