You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "nickuncaged1201 (via GitHub)" <gi...@apache.org> on 2023/04/20 22:26:06 UTC

[GitHub] [beam] nickuncaged1201 commented on a diff in pull request #26286: Added dlq and error metrics to pubsublite read schema transform

nickuncaged1201 commented on code in PR #26286:
URL: https://github.com/apache/beam/pull/26286#discussion_r1173143659


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/PubsubLiteReadSchemaTransformProvider.java:
##########
@@ -118,12 +166,14 @@ public PCollectionRowTuple expand(PCollectionRowTuple input) {
                                         .build())
                                 .build()))
                     .apply(
-                        MapElements.into(TypeDescriptors.rows())
-                            .via(
-                                seqMess ->
-                                    valueMapper.apply(
-                                        seqMess.getMessage().getData().toByteArray())))
-                    .setRowSchema(beamSchema));
+                        ParDo.of(new ErrorFn("Read-Error-Counter", valueMapper))

Review Comment:
   Can you change the metric name to use format "IO name"-"read/write"-error-counter. Something like PubSubLite-read-error-counter Keeping the same format makes it a bit easier on me later to capture them in our backend.



-- 
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