Github user tdas commented on a diff in the pull request: https://github.com/apache/spark/pull/15307#discussion_r82855520 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamExecution.scala --- @@ -176,7 +184,9 @@ class StreamExecution( // Mark ACTIVE and then post the event. QueryStarted event is synchronously sent to listeners, // so must mark this as ACTIVE first. state = ACTIVE - postEvent(new QueryStarted(this.toInfo)) // Assumption: Does not throw exception. + sparkSession.sparkContext.env.metricsSystem.registerSource(streamMetrics) --- End diff -- This is not expensive. A lot of these sources are registered by default in the SparkContext, the additional overhead is minimal. Also, the overhead depends solely on how frequently the Dropwizard metrics polls for the values of rates, latencies, etc. Typically this is every 10s of seconds.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org