code: static void addAnnotatedFields(
        List<Monitor<?>> monitors, String id, TagList tags, Object obj) {
      final Class<com.netflix.servo.annotations.Monitor> annoClass =
          com.netflix.servo.annotations.Monitor.class;
      try {
        Set<Field> fields = getFieldsAnnotatedBy(obj.getClass(), annoClass);
        for (Field field : fields) {
          final com.netflix.servo.annotations.Monitor anno = field.getAnnotation(annoClass);
          if (anno != null) {
            final MonitorConfig config =
                newConfig(obj.getClass(), field.getName(), id, anno, tags);
            if (anno.type() == DataSourceType.INFORMATIONAL) {
              monitors.add(new AnnotatedStringMonitor(config, obj, field));
            } else {
              checkType(anno, field.getType(), field.getDeclaringClass());
              monitors.add(new AnnotatedNumberMonitor(config, obj, field));
            }
          }
        }
  
        Set<Method> methods = getMethodsAnnotatedBy(obj.getClass(), annoClass);
        for (Method method : methods) {
          final com.netflix.servo.annotations.Monitor anno = method.getAnnotation(annoClass);
          if (anno != null) {
            final MonitorConfig config =
                newConfig(obj.getClass(), method.getName(), id, anno, tags);
            if (anno.type() == DataSourceType.INFORMATIONAL) {
              monitors.add(new AnnotatedStringMonitor(config, obj, method));
            } else {
              checkType(anno, method.getReturnType(), method.getDeclaringClass());
              monitors.add(new AnnotatedNumberMonitor(config, obj, method));
            }
          }
        }
      } catch (Exception e) {
        throw Throwables.propagate(e);
      }
    }
docs: Extract all fields/methods of {@code obj} that have a monitor annotation and add them to
  {@code monitors}.