instrumentation

command
v1.26.0-alpha.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

README

This directory contains the regression test for controlling the list of stable metrics

If you add or remove a stable metric, this test will fail and you will need to update the golden list of tests stored in testdata/. Changes to that file require review by sig-instrumentation.

To update the list, run

./hack/update-generated-stable-metrics.sh

Add the changed file to your PR, then send for review.

If you want to test the stability framework, you can add metrics to the file in test/instrumentation/testdata/pkg/kubelet/metrics/metrics.go and run test verification via:

./test/instrumentation/test-verify.sh

To update the golden test list, you can run:

./test/instrumentation/test-update.sh

To update the list of documented metrics, please run:

./test/instrumentation/update-documentation-metrics.sh

To update the documented list of metrics for k8s/website, please run:

./test/instrumentation/update-documentation.sh

Documentation

Overview

This stand-alone package is utilized for dynamically generating/maintaining a list of metrics; this list is determined by the stability class of the metric. We statically analyze all files in the Kubernetes code base to:

  • Determine whether the metric falls into a stability class with stability guarantees.
  • Determine the metric's metadata, i.e. the name, labels, type of metric.
  • Output (based on the above) the metrics which meet our criteria into a yaml file.

Due to the dynamic nature of how metrics can be written, we only support the subset of metrics which can actually be parsed. If a metric cannot be parsed, it must be delegated to the stability class `Internal`, which will exempt the metric from static analysis.

Directories

Path Synopsis
This stand-alone package is utilized for dynamically generating/maintaining documentation on all parseable metrics in the Kubernetes code base.
This stand-alone package is utilized for dynamically generating/maintaining documentation on all parseable metrics in the Kubernetes code base.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL