kubernetes/test/instrumentation
2023-03-01 11:32:19 -08:00
..
documentation include beta metrics in documentation and update docs for metrics 2023-03-01 11:32:19 -08:00
testdata add 25s bucket 2023-02-15 10:31:12 -08:00
decode_metric.go clean up errors, ensure they log lines, improve documentation 2022-11-08 12:18:08 -08:00
doc.go go fmt 2022-11-08 13:34:17 -08:00
error.go clean up errors, ensure they log lines, improve documentation 2022-11-08 12:18:08 -08:00
find_stable_metric.go clean up errors, ensure they log lines, improve documentation 2022-11-08 12:18:08 -08:00
main_test.go update capabilities of static analysis parser 2022-09-27 17:21:14 -07:00
main.go adjust sizes and documentation 2022-10-25 16:32:55 -04:00
metric.go add support for parsing custom collectors from the stability framework 2022-11-01 13:56:57 -07:00
OWNERS Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
README.md update documentation for metrics with deprecated version and version of k8s 2022-11-03 14:57:57 -07:00
stability-utils.sh Make generated-stable-metrics use git ls-files 2023-01-22 15:22:55 -08:00
test-update.sh Add support for summary metrics for stablity checks 2022-07-26 15:31:25 -07:00
test-verify.sh Add support for summary metrics for stablity checks 2022-07-26 15:31:25 -07:00
update-documentation-metrics.sh add automated documentation generation from our static analysis pipeline 2022-10-25 14:44:09 -04:00
update-documentation.sh fix shellcheck errors 2022-11-07 12:44:40 -08:00

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