mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-01-09 15:38:08 -05:00
feat(metrics): add user agent for prebuilt tools (#669)
Append "+prebuilt.<source>" to the user agent for tracking the prebuilt tools usage. This is set before the server is initialized and the user agent is set on the client. Using the period to stay consistent with our other appended metadata like "binary.linux"
This commit is contained in:
@@ -305,6 +305,8 @@ func run(cmd *Command) error {
|
||||
}
|
||||
logMsg := fmt.Sprint("Using prebuilt tool configuration for ", cmd.prebuiltConfig)
|
||||
cmd.logger.InfoContext(ctx, logMsg)
|
||||
// Append prebuilt.source to Version string for the User Agent
|
||||
cmd.cfg.Version += "+prebuilt." + cmd.prebuiltConfig
|
||||
} else {
|
||||
// Set default value of tools-file flag to tools.yaml
|
||||
if cmd.tools_file == "" {
|
||||
|
||||
Reference in New Issue
Block a user