gvisorgvisor.dev/gvisor/runsc/metricserver/containermetrics Index | Files

package containermetrics

import "gvisor.dev/gvisor/runsc/metricserver/containermetrics"

Package containermetrics returns metrics and labels interesting to export about a container or sandbox.

Index

Functions

func ComputeSpecMetadata

func ComputeSpecMetadata(allContainers []*container.Container) map[string]string

ComputeSpecMetadata returns the labels for the `spec_metadata` metric. It merges data from the Specs of multiple containers running within the same sandbox. This function must support being called with `allContainers` being nil. It must return the same set of label keys regardless of how many containers are in `allContainers`.

func SandboxPrometheusLabels

func SandboxPrometheusLabels(rootContainer *container.Container) (map[string]string, error)

SandboxPrometheusLabels returns a set of Prometheus labels that identifies the sandbox running the given root container.

Source Files

containermetrics.go

Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
4 hours ago

Tools for package owners.