File tree Expand file tree Collapse file tree
spark/ingestion/src/main/scala/org/apache/spark/metrics/source Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,19 +32,27 @@ class RedisSinkMetricSource extends Source {
3232
3333 private val executorId = sparkConfig.get(" spark.executor.id" , " " )
3434
35- private def nameWithLabels (name : String ) = {
35+ private def metricWithLabels (name : String ) = {
3636 if (metricLabels.isEmpty) {
3737 name
3838 } else {
3939 s " $name# $metricLabels,job_id= $appId- $executorId"
4040 }
4141 }
4242
43+ private def counterWithLabels (name : String ) = {
44+ if (metricLabels.isEmpty) {
45+ name
46+ } else {
47+ s " $name# $metricLabels"
48+ }
49+ }
50+
4351 val METRIC_TOTAL_ROWS_INSERTED =
44- metricRegistry.counter(nameWithLabels (" feast_ingestion_feature_row_ingested_count" ))
52+ metricRegistry.counter(counterWithLabels (" feast_ingestion_feature_row_ingested_count" ))
4553
4654 val METRIC_ROWS_LAG =
47- metricRegistry.histogram(nameWithLabels (" feast_ingestion_feature_row_lag_ms" ))
55+ metricRegistry.histogram(metricWithLabels (" feast_ingestion_feature_row_lag_ms" ))
4856}
4957
5058object RedisSinkMetricSource {
You can’t perform that action at this time.
0 commit comments