From 8ec8dbe7e8fb72f77165ff4757f8949719e396a7 Mon Sep 17 00:00:00 2001 From: Etienne Perot Date: Fri, 9 Jun 2023 21:10:14 -0700 Subject: [PATCH] Add `MetricMetadataKeys` list to `config`, used internally. PiperOrigin-RevId: 539245495 --- runsc/config/config.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/runsc/config/config.go b/runsc/config/config.go index 4f1ac4c9c..c50bf404f 100644 --- a/runsc/config/config.go +++ b/runsc/config/config.go @@ -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 {