Github user zentol commented on the issue:
https://github.com/apache/flink/pull/2106
well it would work, but i think we can improve it a little. :)
The AbstractStreamOperator contains a protected MetricGroup field which you
can use in the WindowOperator instead of going through the RuntimeContext. You
can access it directly or via getMetricGroup().
Also, you create 2 groups with a constant name. This means that all metrics
that are registered in a trigger now contain "WindowOperator.Trigger" in their
final metric name.
Now the Trigger group is probably _fine_, but is now also mandatory. I
would prefer removing it; if users want to group their metrics by Trigger they
can easily do so themselves.
The WindowOperator group should be removed. It is inconsistent with other
operators and provides no really specific information. It will usually be
redundant since the operator name often contains the String "window" somewhere.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---