code: public void updateMetricMeta(Map<String, Long> nameIdMap) {
          if (nameIdMap != null) {
              for (String name : nameIdMap.keySet()) {
                  AsmMetric metric = JStormMetrics.find(name);
                  if (metric != null) {
                      long id = nameIdMap.get(name);
                      metric.setMetricId(id);
                      LOG.debug("set metric id, {}:{}", name, id);
                  }
              }
          }
  
      }
docs: Register metric meta callback. Called in SpoutExecutors/BoltExecutors within topology workers.
  
  JStormMetricsReporter first sends a TOPOLOGY_MASTER_REGISTER_METRICS_STREAM_ID stream to TM to register metrics,
  on success TM will return a TOPOLOGY_MASTER_REGISTER_METRICS_RESP_STREAM_ID stream which contains
  registered metric meta and then call this method to update local meta.