Commit b02a2c0
committed
[SPARK-53187]Support SparkCluster event related metrics set
### What changes were proposed in this pull request?
This PR adds SparkCluster as a supported type in metrics and therefore supports publishing execution metrics for it.
### Why are the changes needed?
Operatoer by default publish metrics by resource type (SparkApplication) - by adding this support, we suppor the same set of counter and histogram for received event and timed execution
### Does this PR introduce _any_ user-facing change?
More Metrics becomes available for SparkClusters
### How was this patch tested?
From dev sandbox we can see metrics like
```
metrics_operator.sdk_sparkapplication_added_resource_event_Count{type="counters"} 9010
metrics_operator.sdk_sparkapplication_reconciliation_failed_Count{type="counters"} 9
metrics_operator.sdk_sparkapplication_reconciliation_finished_Count{type="counters"} 182841
metrics_operator.sdk_sparkapplication_reconciliation_retries_Count{type="counters"} 9
metrics_operator.sdk_sparkcluster_added_resource_event_Count{type="counters"} 9009
metrics_operator.sdk_sparkcluster_reconciliation_failed_Count{type="counters"} 0
metrics_operator.sdk_sparkcluster_reconciliation_finished_Count{type="counters"} 182821
metrics_operator.sdk_sparkcluster_reconciliation_retries_Count{type="counters"} 0
```
### Was this patch authored or co-authored using generative AI tooling?
No1 parent 1ed8ce2 commit b02a2c0
File tree
1 file changed
+3
-0
lines changed- spark-operator/src/main/java/org/apache/spark/k8s/operator/metrics/source
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
| 309 | + | |
| 310 | + | |
308 | 311 | | |
309 | 312 | | |
310 | 313 | | |
| |||
0 commit comments