zzzming commented on code in PR #20498:
URL: https://github.com/apache/pulsar/pull/20498#discussion_r1218675384


##########
pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/ElasticSearchSink.java:
##########
@@ -139,29 +161,35 @@ public void write(Record<GenericObject> record) throws 
Exception {
                     } else {
                         elasticsearchClient.indexDocument(record, idAndDoc);
                     }
+                    incrementCounter(METRICS_TOTAL_SUCCESS, 1);
                 }
             } catch (JsonProcessingException jsonProcessingException) {
                 switch (elasticSearchConfig.getMalformedDocAction()) {
                     case IGNORE:
+                        incrementCounter(METRICS_TOTAL_SKIP, 1);

Review Comment:
   In the second commit, does it make sense to change this to a new metric? I 
added an IGNORE counter. I agree it should not use the SKIP metrics.
   ```          
                  case IGNORE:
                           incrementCounter(METRICS_TOTAL_IGNORE, 1);
   ```



-- 
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: commits-unsubscr...@pulsar.apache.org

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

Reply via email to