You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ramesh-muthusamy (via GitHub)" <gi...@apache.org> on 2023/08/09 19:59:08 UTC
[GitHub] [spark] ramesh-muthusamy commented on a diff in pull request #42416: [SPARK-44741][CORE] Spark StatsD metrics reporter to support metrics filter option
ramesh-muthusamy commented on code in PR #42416:
URL: https://github.com/apache/spark/pull/42416#discussion_r1289131446
##########
core/src/test/scala/org/apache/spark/metrics/sink/StatsdSinkSuite.scala:
##########
@@ -171,5 +174,32 @@ class StatsdSinkSuite extends SparkFunSuite {
}
}
}
+
+
+ test("metrics StatsD sink with filtered Gauge") {
+ withSocketAndSink { (socket, sink) =>
+ val gauge = new Gauge[Double] {
+ override def getValue: Double = 1.23
+ }
+
+ val filteredMetricKeys = Set(
+ "test-123.driver.CodeGenerator.generatedMethodSize",
+ "test-123.driver.CodeGenerator.generatedMethodSize"
+ )
+
+ filteredMetricKeys.foreach(sink.registry.register(_, gauge))
+
+ sink.registry.register("test-123.driver.spark.streaming.local.latency", gauge)
+ sink.report()
+
+ val p = new DatagramPacket(new Array[Byte](socketBufferSize), socketBufferSize)
Review Comment:
@dongjoon-hyun resolved the issue, these propped up from the rebase that I did.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org