code: public static void registerMBean(final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry) {
  		metricRegistry.register(metricName, new Gauge<Object>() {
  			@Override
  			public Object getValue() {
  				return getValueFromMBean(objectInstance, mBeanAttributeName);
  			}
  		});
  	}
docs: Registers a MBean into the MetricRegistry
  
  @param objectInstance     The ObjectInstance
  @param mBeanAttributeName The attribute name of the MBean that should be collected
  @param metricName         The name of the metric in the MetricRegistry
  @param metricRegistry     The metric registry the values of the mbean should be registered at