code: public void reportContextTree(MetricRegistry registry) {
  
      reportRegistry(registry);
  
      if (registry instanceof MetricContext) {
        for (MetricContext context : ((MetricContext) registry).getChildContextsAsMap().values()) {
          reportContextTree(context);
        }
      }
  
    }
docs: Report a {@link com.codahale.metrics.MetricRegistry}. If the input is a {@link org.apache.gobblin.metrics.MetricContext}
  it will also report all of its children recursively.
  @param registry MetricRegistry to report.