code: private void notificationCallback(Notification notification) {
      if (notification instanceof MetricContextCleanupNotification) {
        removedMetricContext(((MetricContextCleanupNotification) notification).getMetricContext());
      }
      if (notification instanceof NewMetricContextNotification) {
        newMetricContext(((NewMetricContextNotification) notification).getMetricContext());
      }
    }
docs: Callback used to receive notifications from the {@link RootMetricContext}.