Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2220#discussion_r70768940
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/metrics/groups/AbstractMetricGroup.java
 ---
    @@ -100,10 +101,29 @@ public AbstractMetricGroup(MetricRegistry registry, 
String[] scope) {
         * @return fully qualified metric name
          */
        public String getMetricIdentifier(String metricName) {
    +           return getMetricIdentifier(metricName, null);
    +   }
    +
    +   /**
    +    * Returns the fully qualified metric name, for example
    +    * {@code "host-7.taskmanager-2.window_word_count.my-mapper.metricName"}
    +    *
    +    * @param metricName metric name
    +    * @param filter character filter which is applied to the fully 
qualified metric name
    +    * @return fully qualified metric name
    +    */
    +   public String getMetricIdentifier(String metricName, CharacterFilter 
filter) {
                if (scopeString == null) {
    -                   scopeString = 
ScopeFormat.concat(registry.getDelimiter(), scopeComponents);
    +                   if (filter != null) {
    +                           scopeString = 
ScopeFormat.concat(registry.getDelimiter(), scopeComponents);
    --- End diff --
    
    if no filter is given we will now never assign to scopeString, breaking all 
names. We should assume that no filtering is required.


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

Reply via email to