Use system info and build info as user agent, and expose DebugInfo (#41)

* Refactor setting and unsetting system info

* detect version on init

* Update client.go

* Update client_test.go

Co-authored-by: Copilot <[email protected]>

* Update client.go

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Nikola Jokic
2025-12-17 16:29:45 +01:00
committed by GitHub
co-authored by Copilot
parent 40342b1e2a
commit f3ab19d2b8
5 changed files with 467 additions and 131 deletions
+1 -7
View File
@@ -92,13 +92,7 @@ func run(ctx context.Context, c Config) error {
}
// Set the user agent for the scaleset client now that we have the scale set ID
scalesetClient.SetUserAgent(scaleset.UserAgentInfo{
System: "dockerscaleset",
Version: "0.1.0",
CommitSHA: "unknown",
ScaleSetID: scaleSet.ID,
Subsystem: scaleSet.Name,
})
scalesetClient.SetSystemInfo(systemInfo(scaleSet.ID))
defer func() {
logger.Info(