kubernetes/test/instrumentation
2024-01-14 10:24:35 -08:00
..
documentation Run test/instrumentation/update-* 2024-01-14 10:24:35 -08:00
sort sort stability list of metrics in the shell command (#120197) 2023-08-28 04:43:54 -07:00
testdata Merge pull request #120574 from logicalhan/cslis 2023-09-14 22:52:12 -07:00
decode_metric.go add support for ExponentialBucketsRange 2023-08-01 11:38:20 -07:00
doc.go
error.go
find_stable_metric.go
main.go
main_test.go
metric.go
OWNERS
README.md
stability-utils.sh sort stability list of metrics in the shell command (#120197) 2023-08-28 04:43:54 -07:00
test-update.sh
test-verify.sh
update-documentation-metrics.sh
update-documentation.sh

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

Then you need to copy the output to the appropriate website directory. Please define the directory in which the website repo lives in an env variable like so:

export WEBSITE_ROOT=<path to website root>

And then from the root of the k8s/k8s repository, please run this command:

cp ./test/instrumentation/documentation/documentation.md $WEBSITE_ROOT/content/en/docs/reference/instrumentation/metrics.md