Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/2517
  
    alright, I'll sketch some code:
    MetricRegistry:
    ```
    List<MetricReporter> reporters = ...
    List<FrontMetricGroup> groups = ...
    List<Character> delimiter = ...
    
    char getDelimiter(int reporterIndex) {
    return delimiter.get(reporterIndex);
    
    void register(Metric metric, String metricName, MetricGroup group) {
    ...
    for (int x= 0; x<reporters.size();x++) {
       FrontMetricGroup front = groups.get(x);
       front.setReference(group);
       reporter.notifyOfAddedMetric(metric, metricName, front);
    }
    ...
    }
    ```
    
    AbstractMetricGroup:
    ```
    String getMetricIdentifier(String name, CharacterFilter filter, int 
reporterIndex) {
        <copy&paste gMI(name, filter), replace registry.getDelimiter() with 
registry.getDelimiter(reporterIndex)>
    }
    ```
    
    FrontMetricGroup:
    ```
    AbstractMetricGroup reference;
    int index;
    
    FrontMetricGroup(int index) {
        this.index = index;
    }
    
    setReference(AbstractMetricGroup reference) {
        this.reference = reference;
    }
    
    @Override
    String getMetricIndentifier(String name, CharacterFilter filter) {
        return reference.getMetricIdentifier(name, filter, this.index);
    }
    
    <all other MetricGroup methods, forwarding the call to reference>
    ```
    
    Does this answer your question?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to