mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
runsc: Differentiate between directfs and non-directfs in metric labels.
This renames the `gofermode` metadata metric label to `fsmode`, which is either "default" or "directfs". PiperOrigin-RevId: 519247987
This commit is contained in:
committed by
gVisor bot
parent
588b4e13ce
commit
000b5b904a
+12
-8
@@ -391,15 +391,19 @@ func (b Bundle) Validate() error {
|
||||
// MetricMetadata returns key-value pairs that are useful to include in metrics
|
||||
// exported about the sandbox this config represents.
|
||||
func (c *Config) MetricMetadata() map[string]string {
|
||||
var fsMode = "goferfs"
|
||||
if c.DirectFS {
|
||||
fsMode = "directfs"
|
||||
}
|
||||
return map[string]string{
|
||||
"version": version.Version(),
|
||||
"platform": c.Platform,
|
||||
"network": c.Network.String(),
|
||||
"numcores": strconv.Itoa(runtime.NumCPU()),
|
||||
"coretags": strconv.FormatBool(c.EnableCoreTags),
|
||||
"overlay": c.Overlay2.String(),
|
||||
"gofermode": "default",
|
||||
"cpuarch": runtime.GOARCH,
|
||||
"version": version.Version(),
|
||||
"platform": c.Platform,
|
||||
"network": c.Network.String(),
|
||||
"numcores": strconv.Itoa(runtime.NumCPU()),
|
||||
"coretags": strconv.FormatBool(c.EnableCoreTags),
|
||||
"overlay": c.Overlay2.String(),
|
||||
"fsmode": fsMode,
|
||||
"cpuarch": runtime.GOARCH,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user