You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/03/10 05:10:18 UTC

[GitHub] [beam] hengfengli opened a new pull request #17064: [BEAM-12164]: add metrics for partition reads, queries, and latencies for Spanner Change Streams Connector

hengfengli opened a new pull request #17064:
URL: https://github.com/apache/beam/pull/17064


   This change adds the following Dataflow custom metrics: 
   
   - ACTIVE_PARTITION_READ_COUNT
   - QUERY_COUNT
   - DATA_RECORD_COMMITTED_TO_EMITTED_0MS_TO_1000MS_COUNT
   - DATA_RECORD_COMMITTED_TO_EMITTED_1000MS_TO_3000MS_COUNT
   - DATA_RECORD_COMMITTED_TO_EMITTED_3000MS_TO_INF_COUNT
   


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] pabloem commented on pull request #17064: [BEAM-12164]: add metrics for partition reads, queries, and latencies for Spanner Change Streams Connector

Posted by GitBox <gi...@apache.org>.
pabloem commented on pull request #17064:
URL: https://github.com/apache/beam/pull/17064#issuecomment-1069353808


   LGTM


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] pabloem commented on a change in pull request #17064: [BEAM-12164]: add metrics for partition reads, queries, and latencies for Spanner Change Streams Connector

Posted by GitBox <gi...@apache.org>.
pabloem commented on a change in pull request #17064:
URL: https://github.com/apache/beam/pull/17064#discussion_r827416400



##########
File path: sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/ChangeStreamMetrics.java
##########
@@ -84,6 +88,25 @@
   public static final Counter DATA_RECORD_COUNT =
       Metrics.counter(ChangeStreamMetrics.class, "data_record_count");
 
+  /** Counter for the total number of queries issued during the execution of the Connector. */
+  public static final Counter QUERY_COUNT =
+      Metrics.counter(ChangeStreamMetrics.class, "query_count");
+
+  /** Counter for record latencies [0, 1000) ms during the execution of the Connector. */
+  public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_0MS_TO_1000MS_COUNT =
+      Metrics.counter(
+          ChangeStreamMetrics.class, "data_record_committed_to_emitted_0ms_to_1000ms_count");
+
+  /** Counter for record latencies [1000, 3000) ms during the execution of the Connector. */
+  public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_1000MS_TO_3000MS_COUNT =
+      Metrics.counter(
+          ChangeStreamMetrics.class, "data_record_committed_to_emitted_1000ms_to_3000ms_count");
+
+  /** Counter for record latencies equal or above 3000ms during the execution of the Connector. */
+  public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_3000MS_TO_INF_COUNT =
+      Metrics.counter(
+          ChangeStreamMetrics.class, "data_record_committed_to_emitted_3000ms_to_inf_count");

Review comment:
       we also have a `Metrics.distribution` that you can use for cases like these. Did you consider it?




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] pabloem commented on a change in pull request #17064: [BEAM-12164]: add metrics for partition reads, queries, and latencies for Spanner Change Streams Connector

Posted by GitBox <gi...@apache.org>.
pabloem commented on a change in pull request #17064:
URL: https://github.com/apache/beam/pull/17064#discussion_r827526345



##########
File path: sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/ChangeStreamMetrics.java
##########
@@ -84,6 +88,25 @@
   public static final Counter DATA_RECORD_COUNT =
       Metrics.counter(ChangeStreamMetrics.class, "data_record_count");
 
+  /** Counter for the total number of queries issued during the execution of the Connector. */
+  public static final Counter QUERY_COUNT =
+      Metrics.counter(ChangeStreamMetrics.class, "query_count");
+
+  /** Counter for record latencies [0, 1000) ms during the execution of the Connector. */
+  public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_0MS_TO_1000MS_COUNT =
+      Metrics.counter(
+          ChangeStreamMetrics.class, "data_record_committed_to_emitted_0ms_to_1000ms_count");
+
+  /** Counter for record latencies [1000, 3000) ms during the execution of the Connector. */
+  public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_1000MS_TO_3000MS_COUNT =
+      Metrics.counter(
+          ChangeStreamMetrics.class, "data_record_committed_to_emitted_1000ms_to_3000ms_count");
+
+  /** Counter for record latencies equal or above 3000ms during the execution of the Connector. */
+  public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_3000MS_TO_INF_COUNT =
+      Metrics.counter(
+          ChangeStreamMetrics.class, "data_record_committed_to_emitted_3000ms_to_inf_count");

Review comment:
       makes sense. We are aware of the limitations of distribution metrics, but we want to be cautious to add more because users can inadvertently overwhelm the system.




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] thiagotnunes commented on a change in pull request #17064: [BEAM-12164]: add metrics for partition reads, queries, and latencies for Spanner Change Streams Connector

Posted by GitBox <gi...@apache.org>.
thiagotnunes commented on a change in pull request #17064:
URL: https://github.com/apache/beam/pull/17064#discussion_r827443912



##########
File path: sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/ChangeStreamMetrics.java
##########
@@ -84,6 +88,25 @@
   public static final Counter DATA_RECORD_COUNT =
       Metrics.counter(ChangeStreamMetrics.class, "data_record_count");
 
+  /** Counter for the total number of queries issued during the execution of the Connector. */
+  public static final Counter QUERY_COUNT =
+      Metrics.counter(ChangeStreamMetrics.class, "query_count");
+
+  /** Counter for record latencies [0, 1000) ms during the execution of the Connector. */
+  public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_0MS_TO_1000MS_COUNT =
+      Metrics.counter(
+          ChangeStreamMetrics.class, "data_record_committed_to_emitted_0ms_to_1000ms_count");
+
+  /** Counter for record latencies [1000, 3000) ms during the execution of the Connector. */
+  public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_1000MS_TO_3000MS_COUNT =
+      Metrics.counter(
+          ChangeStreamMetrics.class, "data_record_committed_to_emitted_1000ms_to_3000ms_count");
+
+  /** Counter for record latencies equal or above 3000ms during the execution of the Connector. */
+  public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_3000MS_TO_INF_COUNT =
+      Metrics.counter(
+          ChangeStreamMetrics.class, "data_record_committed_to_emitted_3000ms_to_inf_count");

Review comment:
       We only get min, mean and max with the distributions, that is why we are bucketing here (to get a histogram)




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] pabloem commented on pull request #17064: [BEAM-12164]: add metrics for partition reads, queries, and latencies for Spanner Change Streams Connector

Posted by GitBox <gi...@apache.org>.
pabloem commented on pull request #17064:
URL: https://github.com/apache/beam/pull/17064#issuecomment-1068485406


   this LGTM


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] pabloem commented on pull request #17064: [BEAM-12164]: add metrics for partition reads, queries, and latencies for Spanner Change Streams Connector

Posted by GitBox <gi...@apache.org>.
pabloem commented on pull request #17064:
URL: https://github.com/apache/beam/pull/17064#issuecomment-1068625460


   Run Java PostCommit


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] pabloem merged pull request #17064: [BEAM-12164]: add metrics for partition reads, queries, and latencies for Spanner Change Streams Connector

Posted by GitBox <gi...@apache.org>.
pabloem merged pull request #17064:
URL: https://github.com/apache/beam/pull/17064


   


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] thiagotnunes commented on pull request #17064: [BEAM-12164]: add metrics for partition reads, queries, and latencies for Spanner Change Streams Connector

Posted by GitBox <gi...@apache.org>.
thiagotnunes commented on pull request #17064:
URL: https://github.com/apache/beam/pull/17064#issuecomment-1067532559


   @hengfengli it seems CI failure is unrelated?
   
   ```
   11:06:10 * What went wrong:
   11:06:10 Execution failed for task ':runners:flink:1.14:test'.
   11:06:10 > Failed to store cache entry for task ':runners:flink:1.14:test'
   ```


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] hengfengli commented on pull request #17064: [BEAM-12164]: add metrics for partition reads, queries, and latencies for Spanner Change Streams Connector

Posted by GitBox <gi...@apache.org>.
hengfengli commented on pull request #17064:
URL: https://github.com/apache/beam/pull/17064#issuecomment-1067534770


   @thiagotnunes Yes, it is unrelated. 


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org