Commit Graph

25 Commits

Author SHA1 Message Date
Han Kang
bf7d65c15c clean up errors, ensure they log lines, improve documentation
Change-Id: Icf4da7410dc9ecfb3616511ea55339e1d0690c49
2022-11-08 12:18:08 -08:00
Han Kang
dfff6e4364 update documentation for metrics with deprecated version and version of k8s
Change-Id: Ia04d21f6644e7fc498304c0035d6f1ae58766a91
2022-11-03 14:57:57 -07:00
Han Kang
78704ae47d refactor static analysis code for stability framework
Change-Id: I4049f16063264603fb61cbeb0cdb4010267fc19c
2022-11-02 14:52:31 -07:00
Han Kang
26b7e3a1e9 refactor static analysis code
Change-Id: I888585cc151e97fee08889a57fc20118733a60a5
2022-11-01 15:56:25 -07:00
Han Kang
c2f67ac141 add support for parsing custom collectors from the stability framework
Change-Id: I1053b9f6956de571700c95b96e05c4377806a3cc
2022-11-01 13:56:57 -07:00
Han Kang
3d3ac6ad72 add buckets.go to prometheus import allowlsit
Change-Id: Ifd497f93614536fdcf3bc7d73505d322bf57f123
2022-10-18 13:42:28 -07:00
Han Kang
287738c125 move MergeBuckets into component-base so we can properly support it for static-analysis
Change-Id: I137413b5b0328487a7bcd70eca79a8b0ae6dea51
2022-10-18 10:55:09 -07:00
Han Kang
7b616b39b1 add support for merging calls to Linear/Exponential Buckets
Change-Id: Id6005912ac71c9c15354e9e8242f0febf8569dec
2022-10-17 13:30:30 -07:00
Han Kang
be3e5cb313 add support for parsing buckets from variables of prom.Linear and prom.Expo helpers
Change-Id: I61bb46dcbdc02d506da563bc7973430ecef8c364
2022-10-13 10:44:13 -07:00
Han Kang
bc5d3b06c9 account for timing ratio histogram function calls
Change-Id: Ib27d6018657e4221c36645860bdb9cb9fcf7ebf5
2022-10-12 14:44:28 -07:00
Han Kang
f3cb904618 cleanup printlns
Change-Id: I49a48446029ba2e66b09f138a1477b837d55766a
2022-10-12 09:47:49 -07:00
Han Kang
658d7a184e parse time signatures for maxAge
Change-Id: I91e330d82c4ebbfa38bc52889beb64e6689bfb77
2022-10-12 09:34:14 -07:00
Han Kang
49c08947f7 add support for parsing gauge func
Change-Id: Id0b9cd51dead5ee9f4adac804d62f5d9742320a7
2022-10-12 08:30:41 -07:00
Han Kang
52097bc02d add support for timing histograms and const labels
Change-Id: I8f77d5e16c01a403c7cfdccec464a81f4e3beba0
2022-10-11 17:19:14 -07:00
Han Kang
521a027fea update capabilities of static analysis parser
Change-Id: Ie09399981fcef213e0e7c7d12a8039aedbf0246a
2022-09-27 17:21:14 -07:00
Han Kang
e452850ec3 Add support for summary metrics for stablity checks
Also add entrypoints for verifying and updating a test file for easier
debugging. This is considerably faster than running the stablity checks
against the entire Kubernetes codebase.

Change-Id: I5d5e5b3abf396ebf1317a44130f20771a09afb7f
2022-07-26 15:31:25 -07:00
Pat Christopher
f720c4fd44
hack/verify fixes 2021-07-28 19:26:44 -07:00
Pat Christopher
e75f3fb563
add happy path tests for two types of imports 2021-07-13 20:08:13 -07:00
Pat Christopher
585ce7f04d
missed a paren 2021-07-13 19:03:39 -07:00
Pat Christopher
bde2ef2a1a
review comments 2021-07-13 19:02:23 -07:00
Pat Christopher
ef3c344868
seems to work, needs tests and a lot of cleanup 2021-07-12 20:28:10 -07:00
Marek Siarkowicz
4dd546cf2c Allow usage of consts and variables for stable metrics in static analysis 2019-11-08 09:41:59 +01:00
RainbowMango
4355772bb6 Remove directly reference to Prometheus 2019-10-29 15:08:16 +08:00
Marek Siarkowicz
53fc6f9b58 Finish implementation of stable metrics static analysis
Handle "DeprecatedVersion" field
Fix kube metrics framework path
Implement handling prometheus util functions for generating buckets
2019-08-21 23:46:36 +02:00
Marek Siarkowicz
a5377a684c Implement stable metric validation and verification
Based on KEP:
https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190605-metrics-validation-and-verification.md

Add //test/instrumentation:stable_metric_test that compares metrics
in source code to those available in
"test/instrumentation/testdata/stable-metrics-list.yaml".
2019-08-12 12:01:35 +02:00