Add MetricMetadataKeys list to config, used internally.

PiperOrigin-RevId: 539245495
This commit is contained in:
Etienne Perot
2023-06-09 21:13:09 -07:00
committed by gVisor bot
parent 7706a5177f
commit 8ec8dbe7e8
+16
View File
@@ -396,8 +396,24 @@ func (b Bundle) Validate() error {
return nil
}
// MetricMetadataKeys is the set of keys of metric metadata labels
// as returned by `Config.MetricMetadata`.
var MetricMetadataKeys = []string{
"version",
"platform",
"network",
"numcores",
"coretags",
"overlay",
"fsmode",
"cpuarch",
"go",
"experiment",
}
// MetricMetadata returns key-value pairs that are useful to include in metrics
// exported about the sandbox this config represents.
// It must return the same set of labels as listed in `MetricMetadataKeys`.
func (c *Config) MetricMetadata() map[string]string {
var fsMode = "goferfs"
if c.DirectFS {