mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
runsc: Add version information to sandbox metric metadata.
This allows the runsc version to be tracked in monitoring. PiperOrigin-RevId: 519025313
This commit is contained in:
committed by
gVisor bot
parent
d0326a67da
commit
1c9531cd53
@@ -18,6 +18,7 @@ go_library(
|
||||
"//pkg/refs",
|
||||
"//pkg/sentry/watchdog",
|
||||
"//runsc/flag",
|
||||
"//runsc/version",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import (
|
||||
"gvisor.dev/gvisor/pkg/refs"
|
||||
"gvisor.dev/gvisor/pkg/sentry/watchdog"
|
||||
"gvisor.dev/gvisor/runsc/flag"
|
||||
"gvisor.dev/gvisor/runsc/version"
|
||||
)
|
||||
|
||||
// Config holds configuration that is not part of the runtime spec.
|
||||
@@ -391,6 +392,7 @@ func (b Bundle) Validate() error {
|
||||
// exported about the sandbox this config represents.
|
||||
func (c *Config) MetricMetadata() map[string]string {
|
||||
return map[string]string{
|
||||
"version": version.Version(),
|
||||
"platform": c.Platform,
|
||||
"network": c.Network.String(),
|
||||
"numcores": strconv.Itoa(runtime.NumCPU()),
|
||||
|
||||
Reference in New Issue
Block a user