Github user aljoscha commented on the issue:
https://github.com/apache/flink/pull/4665
These are not actually the places where you can count dropped data. I would
suggest to add this at the very end of `processElement()` where we also check
whether we should side-output late data:
https://github.com/apache/flink/blob/6642768ad8f8c5d1856742a6d148f7724c20666c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java#L406.
Also, I think a better metrics name would include "dropped" somehow,
because right now it just says late. Something like `numLateElementsDropped`.
---