Commit 9c4252b
Merge cockroachdb#155156
155156: build/tools: Add gen-cockroachdb-metrics tool to automate roachprod metric mappings r=Abhinav1299 a=Abhinav1299
This commit introduces `gen-cockroachdb-metrics` tool, which generates a mapping of CockroachDB metrics to Datadog-compatible names for roachprod clusters. The tool integrates with existing Bazel build configurations and autogenerates pkg/roachprod/opentelemetry/cockroachdb_metrics.go file used by OTel agent to map exported metrics of roachprod clusters.
The automation tool generates metric mapping using three sources:
- `docs/generated/metrics/metrics.yaml`: Containing all the metrics emitted by latest version of CRDB.
- `runtime_conditional_metrics` from cockroachdb_metrics_base.yaml: Containing all the dynamically generated metrics which are not documented in metrics.yaml.
- `legacy_metrics` from cockroachdb_metrics_base.yaml: Containing legacy metrics from older CRDB versions for backward compatibility.
This change enhances the observability of CockroachDB metrics in Datadog, ensuring better monitoring and performance tracking.
This commit resolves cockroachdb#148880
Part of: CRDB-54636
Epic: CC-33357
Release note: none
Co-authored-by: Abhinav1299 <[email protected]>File tree
11 files changed
+3979
-2197
lines changed- build
- bazelutil
- tools/gen-cockroachdb-metrics
- docs/generated/metrics
- pkg
- gen
- roachprod/agents/opentelemetry
- testutils/lint
11 files changed
+3979
-2197
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
631 | 641 | | |
632 | 642 | | |
633 | 643 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1165 | 1165 | | |
1166 | 1166 | | |
1167 | 1167 | | |
| 1168 | + | |
1168 | 1169 | | |
1169 | 1170 | | |
1170 | 1171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments