This repository was archived by the owner on Oct 3, 2023. It is now read-only.
Commit 1996040
authored
Add a public method to convert OpenCensus View to MetricDescriptor. (#277)
This is useful if you want to use your code as source of truth of
MetricDescritors.
Managing MetricDescriptors outside of the Go code (e.g. in Terraform
configs) is painful, as the changes to MD requires delete/recreate,
after deleting all alert policies associated with the metric. On the
other hand, the externally managed MDs are bound to be out of sync with
what's present in the code.
In the end we decide to just extract/collect views from our go code as
source of truth, and thus we need to have a public method to convert
views to MD.1 parent cb914a5 commit 1996040
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
472 | 482 | | |
473 | 483 | | |
474 | 484 | | |
| |||
0 commit comments